This is the mail archive of the bfd@sourceware.cygnus.com mailing list for the bfd project.


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

Re: patch was: dwarf2 debug dependent upon GAS?


   From: Jason Merrill <jason@cygnus.com>
   Date: 11 Mar 1999 11:20:22 -0800

    >    I assume that fixing this would dramatically improve link time for
    >    DWARF2?

    > I would not expect to see a dramatic improvement, but maybe there is
    > something I am overlooking.

   I was thinking that a bunch of relocs to the same symbol would resolve
   faster than relocs to different symbols; perhaps that's not the case.

No, it isn't.  Each reloc contains a symbol index.  When the linker
performs the relocations, it first computes a table of all the symbol
values; the linker must perform this operation anyhow in order to
generate the symbol table of the output file.  Then the linker loops
through the relocs, resolving them.  Calculating the value of a symbol
is just a table lookup.

Ian