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: Linux/PPC 32 bit problem with .data > 64M?


Unfortunately, I can't just place the GOT before .data, because it has to
be contiguous with .sbss (in order to use the same base register).
How do I arrange for multiple PDHR entries, and how much does it slow
things down?

Mar Mendell



                                                                           
             Geoff Keating                                                 
             <geoffk@geoffk.                                               
             org>                                                       To 
             Sent by:               Mark Mendell/Toronto/IBM@IBMCA         
             geoffk@geoffk.o                                            cc 
             rg                     binutils@sources.redhat.com            
                                                                       bcc 
                                                                           
             09/11/2002                                            Subject 
             12:22 AM               Re: Linux/PPC 32 bit problem with      
                                    .data > 64M?                           
                                                                           
                                                                           





mendell@ca.ibm.com writes:

....
> The problem is that .plt is placed after .data, and the really big .data
(>
> 2**26) prevents the relocations from fitting.  Is there any fix for this?
> I understand from looking at the linker script, that the .plt section
wants
> to go with the bss section, and it is put near the .got section.  Is
there
> any way to take advantage of the latter?  Anything else I can do?  I
tried
> moving the .plt section in elf32ppclinux.x to after .rodata1, but got:
> /usr/lib/crti.o: In function `call_gmon_start':
> /usr/lib/crti.o(.text+0x14): relocation truncated to fit: R_PPC_LOCAL24PC
> _GLOBAL_OFFSET_TABLE_
>
> which makes sense, since the GOTis now too far from the .text section.
>
> Does ELF really only support 64M of .data on Linux/PPC?

Yes, but you have to arrange things so that .data is placed after .plt
and .got.  This is not done by default because very few (approximately
zero) objects are this large and there is an efficiency penalty; you
have to either include .plt in the object file, wasting space there,
or have to have multiple PHDR entries which slows down loading.

--
- Geoffrey Keating <geoffk@geoffk.org>



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