PPC SDA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello GCC Users,
 
I have fundamental question with regard to GCC for PowerPC. Does it or
does it not fully support EABI specified 
SDA sections. I use :
 
$ powerpc-elf-gcc -v
Reading specs from /usr/local/lib/gcc/powerpc-elf/3.4.0-macraigor1/specs
Configured with: /rel/share/gnu/src/gcc-3.4.0-macraigor1/configure
--host=i686-p
c-cygwin --target=powerpc-elf --disable-nls --with-stabs
--disable-install-libib
erty --disable-install-libbfd --disable-dependency-tracking
--enable-languages=c
,c++ --with-gnu-as --with-gnu-ld
Thread model: single
gcc version 3.4.0-macraigor1
 

There are two problems with this version of GCC:
 
1) The compiler is assigining a wrong relocation entry for a function.
2) Instead of using .sbss for uninitialized small variables, it uses the
.comm section and thus the final link fails.
 
I give here the example:
 
powerpc-elf-ld: ./objs/main.o: the target (func3) of a R_PPC_EMB_SDA21
relocatio : 
n is in the wrong output section (.text)
powerpc-elf-ld: ./objs/main.o: the target (.rodata.str1.4) of a
R_PPC_EMB_SDA21
relocation is in the wrong output section (.rodata)
powerpc-elf-ld: final link failed: Bad value
make: *** [bin/pipeline_test.elf] Error 1
 
Here is the relocation info:
0000085c  0000136d R_PPC_EMB_SDA21   00000000   .rodata.str1.4 + 0 =>
Small Data addressed, but not in .sdata2
000007c4  00000d6d R_PPC_EMB_SDA21   000000d0   func3 + 0 => A function
addressed through SDA !?
 

>From Assembly:
 
 .section .rodata.str1.4,"aMS",@progbits,1
 .align 2
.LC2:
 .string "abc"
 

char vchar;
short vshort;
int vint;
long vlong;
 
char * vpchar;
short * vpshort;
int * vpint;
long * vplong;
 
unsigned char vuchar;
unsigned short vushort;
unsigned int vuint;
unsigned long vulong;
 
unsigned char * vpuchar;
unsigned short * vpushort;
unsigned int * vpuint;
unsigned long * vpulong;
 
unsigned char * * vppuchar;
unsigned short * * vppushort;
unsigned int * * vppuint;
unsigned long * * vppulong;
 
 .comm vchar,1,1
 .comm vshort,2,2
 .comm vint,4,4
 .comm vlong,4,4
 .comm vpchar,4,4
 .comm vpshort,4,4
 .comm vpint,4,4
 .comm vplong,4,4
 
00000020 C vbfield
00000001 C vchar
00000005 C vdarray
0000001e C vdblarray
00000004 C vint
00000004 C vlong
00000004 C vpchar
00000004 C vpint
00000004 C vplong
00000004 C vppuchar
 

My compiler options:
 
CCOPTS = -O2 -meabi -G 256 -msdata=eabi -mbig -mregnames -mstrict-align
-mupdate -mmultiple -nostdinc -nostdlib
 
 
 
Is there any problem in this version of GCC ?
Has it been fixed ?
Or am  missing some information ?
 

Many thanks for your help!
 

Regards,
Ravishankar
 


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux