This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: GOT Section Indexes
- From: B Dorairaj <bdorairaj at yahoo dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Fri, 8 Nov 2002 12:21:42 -0800 (PST)
- Subject: Re: GOT Section Indexes
Hi
The problem in my case is that I dont know the GOT
symbol count before hand. So if I start from GOT index
0 to 1023 and if I encounter 1024,1025... GOT symbols,
how can I go to the negative index?
Should I start first GOT entry from negative Index in
that case?? In that case I need to rewrite the .got.
Am also wondering how about starting from -1024 itself
and growing to 1023, there by avoiding this problem.
But the linkers and libraries guide says,
"_GLOBAL_OFFSET_TABLE_ can reside in the middle of
the .got section, allowing both negative and
nonnegative subscripts"
Is there a feasible solution available for this
problem.
Thanks
Dorai
--- Jakub Jelinek <jakub@redhat.com> wrote:
> On Tue, Nov 05, 2002 at 03:09:04PM -0800, B Dorairaj
> wrote:
> > Hi
> >
> > I am working on Sun Sparc Linker. I have created
> the
> > GOT Table and i am using the index from 0. I am
> not
> > using negative indexes for GOT.
> > When i run the executable having my custom .got
> > section having more than 1024 got entries, i get
> > segmentation fault after 1024.
>
> You cannot have more than 1024 GOT entries (resp.
> 2048
> if you allow negative) on sparc32, if there are any
> R_SPARC_GOT13 relocations which don't fit in the
> first
> 1024 entries (resp 2048 with negative entries).
> Similarly, you cannot have more than 512 GOT entries
> if there are any R_SPARC_GOT13 relocs against other
> GOT
> entries on sparc64 (where _GLOBAL_OFFSET_TABLE_
> cannot reside
> in the middle of the .got section).
>
> Jakub
__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2