This is the mail archive of the binutils@sourceware.cygnus.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]

Re: Sorting entries in dynamic relocation


   Date: Wed, 08 Mar 2000 17:09:07 -0700
   From: Koundinya K <knk@dde.dk>

   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 ?.

Off hand I can't think of anything that points to dynamic relocations,
so I think this should be more or less straightforward.  Unless I've
forgotten something.  Do the sort somewhere near the end of
_bfd_mips_elf_final_link.

   Are any other targets doing this ??.

Not that I know of.

   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 ??.

I don't know off hand.  I don't have my copy of the MIPS ELF ABI with
me.  The desired result is clear enough; whatever calculation causes
that result is the right one.

Ian

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