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: BFD Question ?


   Date: Fri, 10 Mar 2000 11:40:11 -0700
   From: Koundinya K <knk@dde.dk>

       I would like to know, if there is any BFD function already available
   to read the relocation table from a bfd. Basically I am trying to sort
   the entries of the dynamic relocation section in *_final_link() . I have
   all other information on hand required for qsort() like no of elements
   to sort, width of each element , comparison function. The only thing
   that I am not getting to know is how to read the relocation table.

   I have tried many approaches, but I am still not able to get through
   this for the past 2 days. I have even tried to use
   _bfd_elf32_link_read_relocs(), but had no luck with that too !!.

You can read the dynamic relocations using
bfd_canonicalize_dynamic_reloc.  However, in your case, you are in the
middle of a link.  You don't want to read the dynamic relocations of
an existing file.  You want to manipulate the dynamic relocations in
the file which you are creating.  Those relocations are stored in
memory, as I mentioned in a message which presumably crossed paths
with this one.

Ian

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