This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PowerPC no small data build uses .sbss? (but sbss should notbe used, right?)


Alan Modra wrote:

>On Tue, Jun 07, 2005 at 09:40:49AM -0400, William. Rivet wrote:
>  
>
>>I have been trying to guarantee the lack of small data use in part of a
>>project I am working on (a minimal OS type product that itself will
>>leave small data registers for use by the application).
>>    
>>
>
>Pass -G 0 to the linker, ie. -Wl,-G,0 to gcc.
>
>  
>
Doh! I thoguht I replied to this ansawer yesterday...

Yes, of course I should have provided the command lines I used to
compile by sample code...I knew I was forgeting something!

Nonetheless, Alan I think gave me a workable answer. I would have sworn
I tried this, but I did it again, and it did what I needed.

Actually, it seems I needed to use both -G 0 and the
FORCE_COMMON_ALLOCATION features, so if I tried before, I probably
didn't set both before.

Thanks everyone!


For completeness, here are my compilation lines:

gcc -bpowerpc-eabi-elf -mcpu=505 -O1 -msdata  -ansi joe.c -o joe.o -c
gcc -bpowerpc-eabi-elf -mcpu=505 -O1 -mno-sdata -Wa,-a=fred.lst  -ansi
fred.c -o fred.o -c
powerpc-eabi-elf-ld.exe -d  -static -nostdlib -nostartfiles fred.o joe.o
-Map=sample.map -Tsample.ld -G 0




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]