This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

Re: Need some help with bfd_elf_link_record_dynamic_symbol


Alan Modra wrote:

This code is similar to the following idiom
          /* Make sure this symbol is output as a dynamic symbol.  */
          if (h->dynindx == -1 && !h->forced_local)
            {
              if (!bfd_elf_link_record_dynamic_symbol (info, h))
                return FALSE;
            }
[snip]
Why isn't this kind of thing done in the target-independent code, anyway? It seems wasteful to have near-identical but subtly out-of-sync code in all the backends.

weak symbol behaviour isn't properly defined in the ELF spec. Some people think undefined weak should become dynamic, others disagree.. If you belong in the latter camp, then you might not want or need your allocate_dynrelocs.

I've tried simply removing the code from check_relocs, but that caused segfaults elsewhere. Under what conditions should I be calling bfd_elf_link_record_dynamic_symbol if I add an allocate_dynrelocs function?



Bernd -- This footer brought to you by insane German lawmakers. Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 40368 Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif


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