This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Sorting entries in dynamic relocation
- To: ian at zembu dot com, binutils at sourceware dot cygnus dot com
- Subject: Sorting entries in dynamic relocation
- From: Koundinya K <knk at dde dot dk>
- Date: Wed, 08 Mar 2000 17:09:07 -0700
- Organization: DDE
Hi Ian,
The current mips code, It looks like the sorting of the entries in
the dynamic relocation section is not being done. This is important for
the dynamic linker I suppose. Especially when shared libs are generated
that contain dynamic relocations.
The MIPS ABI says that:
(Chapter 5, Pg 5-14)
The entries in the dynamic relocation section must be ordered by
increasing r_symndx value.
In case I need to put some code for this, where could this probably fit
into ?.
Are any other targets doing this ??.
I do also have another doubt with respect to the R_MIPS_REL32 relocation
done by the dynamic linker.
The MIPS ABI says that:
(Chapter 4,Pg 4-20)
The R_MIPS_REL32 relocation type is the only relocation performed by the
dynamic linker. The value EA used by the dynamic linker to relocate an
R_MIPS_REL32 relocation depends on its r_symndx value. If the relocation
entry r_symndx is less then DT_MIPS_GOTSYM, the value of EA is the
symbol st_value plus displacement. Otherwise the value of EA is the
value in the GOT entry corresponding to the relocation entry r_symndx.
I am not getting what this "displacement" is. Can you please clarify ??.
Thanks a lot.
With best regards
Koundinya