[Fwd: ARM char array on stack]
--- Begin Message --- Hi, if I define this type: typedef unsigned char UCHAR __attribute__((aligned(32))); void func(void) { char example; UCHAR vector[40]; ... } The vector array is 4 byte alignment in any case? Regards Michael --- End Message ---
.rodata gcc 3.3.3 gcc 2.95.2
Hi all, I have different assembler code and I notice that the gcc 3.3.3 add this information in the asm code: .section.rodata.str1.4,"aMS",%progbits,1 align 2 .LC0: .ascii "filename\000" Generated by gcc 2.95.2 19991024 (release) for ARM/elf doesn't have this section So when I build the library from different object I have char array not align. It is possible to remove at compilation time? Regards Michael
smart memcpy
Hi all, is it possible to map a region on memory copy on write using this idea? I have an invalid argument in the mmap call. Why? #include #include #include #include #include #include #include #include #include #define MAXPATH 255 int main (int argc, char **argv) { char *s,*x; int i; int addr; int fd; int size=40960; char file_memory[MAXPATH]; pid_t p=getpid(); s=malloc(size); sprintf(file_memory,"/proc/%d/mem",(int)p); fd = open(file_memory,O_RDONLY); if (fd < 0) { perror(file_memory); exit(-1); } printf ("start %s\n",file_memory); printf("s = %p\n",s); memset(s, 'X', size); //lseek(fd,(int)s,SEEK_SET); //read(fd,&addr,1); //printf("%c", addr); x = mmap(0,size,PROT_READ|PROT_WRITE,MAP_PRIVATE,fd,(int)s); if ((int)(x)>0) { printf("x = %p\n",x); *x='P'; for (i=0;i<40; i++) printf("sval=%c;xval=%c;",*(x+i),*(s+i)); } else { printf("%s\n",strerror(errno)); } return 0; }
arm sof float
Hi all, I have this function defined twice. One in the libgcc2.c file and one in gcc/config/arm/ieee754-df.S __floatdisf I have problem during compilation of a arm soft float toolchain. Is there any fix? Regards Michael
Re: arm sof float
Richard Earnshaw wrote: On Mon, 2005-11-14 at 16:52, Michael Trimarchi wrote: Hi all, I have this function defined twice. One in the libgcc2.c file and one in gcc/config/arm/ieee754-df.S __floatdisf I have problem during compilation of a arm soft float toolchain. Is there any fix? Regards Michael The build system should only be using the latter. What configuration are you using? And what version of gcc? R. /home/luigi/crosstool-0.38/build/arm-9tdmi-linux-gnu/gcc-4.0.1-glibc-2.3.5/gcc-4.0.1/configure --target=arm-9tdmi-linux-gnu --host=i686-host_pc-linux-gnu --prefix=/opt/crosstool/gcc-4.0.1-glibc-2.3.5/arm-9tdmi-linux-gnu --with-float=soft --with-cpu=arm9tdmi --enable-cxx-flags=-mcpu=arm9tdmi --with-headers=/opt/crosstool/gcc-4.0.1-glibc-2.3.5/arm-9tdmi-linux-gnu/arm-9tdmi-linux-gnu/include --with-local-prefix=/opt/crosstool/gcc-4.0.1-glibc-2.3.5/arm-9tdmi-linux-gnu/arm-9tdmi-linux-gnu --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit --enable-shared --enable-c99 --enable-long-long --with-gcc-version-trigger=/home/luigi/crosstool-0.38/build/arm-9tdmi-linux-gnu/gcc-4.0.1-glibc-2.3.5/gcc-4.0.1/gcc/version.c --enable-languages=c,c++ Linking error libgcc/./_floatdidf_s.o: In function `__floatdidf': libgcc2.c:(.text+0x0): multiple definition of `__floatdidf' libgcc/./_addsubdf3_s.o:/home/luigi/crosstool-0.38/build/arm-9tdmi-linux-gnu/gcc-4.0.1-glibc-2.3.5/gcc-4.0.1/gcc/config/arm/ieee754-df.S:474: first defined here/opt/crosstool/gcc-4.0.1-glibc-2.3.5/arm-9tdmi-linux-gnu/arm-9tdmi-linux-gnu/bin/ld: Warning: size of symbol `__floatdidf' changed from 108 in libgcc/./_addsubdf3_s.o to 140 in libgcc/./_floatdidf_s.o libgcc/./_floatdisf_s.o: In function `__floatdisf': libgcc2.c:(.text+0x0): multiple definition of `__floatdisf' libgcc/./_addsubsf3_s.o:/home/luigi/crosstool-0.38/build/arm-9tdmi-linux-gnu/gcc-4.0.1-glibc-2.3.5/gcc-4.0.1/gcc/config/arm/ieee754-sf.S:315: first defined here/opt/crosstool/gcc-4.0.1-glibc-2.3.5/arm-9tdmi-linux-gnu/arm-9tdmi-linux-gnu/bin/ld: Warning: size of symbol `__floatdisf' changed from 172 in libgcc/./_addsubsf3_s.o to 252 in libgcc/./_floatdisf_s.o collect2: ld returned 1 exit status Regards Michael