bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Always use _bfd_elf_link_hash_table_create


From: Nick Clifton
Subject: Always use _bfd_elf_link_hash_table_create
Date: 20 Aug 2001 15:24:45 +0100

Hi Guys,

  Joern recently pointed out to me that elfxx-target.h is only
  defining bfd_elfNN_bfd_link_hash_table_create as the elf specific
  version if elf_backend_relocate_section is defined.

  Presumably it used to be true that elf specific fields in the hash
  table were only needed if the backend was going to perform its own
  relocations.  This is no longer true however, as for example the
  'dynobj' field is used by size_dynamic_sections even if the generic
  section relocator is being used.

  Fixed by applying the following patch.  Tested against Linux native
  and sh-elf cross targets.

Cheers
        Nick

2001-08-20  Nick Clifton  <address@hidden>

        * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
        select the generic has table creator.  All eld backends need elf
        specific fields in the hash table.

Index: bfd/elfxx-target.h
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-target.h,v
retrieving revision 1.25
diff -p -r1.25 elfxx-target.h
*** elfxx-target.h      2001/08/11 16:48:15     1.25
--- elfxx-target.h      2001/08/20 14:20:30
*************** Foundation, Inc., 59 Temple Place - Suit
*** 162,177 ****
    _bfd_elf_canonicalize_dynamic_reloc
  #endif
  
- #ifdef elf_backend_relocate_section
  #ifndef bfd_elfNN_bfd_link_hash_table_create
  #define bfd_elfNN_bfd_link_hash_table_create _bfd_elf_link_hash_table_create
  #endif
! #else /* ! defined (elf_backend_relocate_section) */
  /* If no backend relocate_section routine, use the generic linker.  */
- #ifndef bfd_elfNN_bfd_link_hash_table_create
- #define bfd_elfNN_bfd_link_hash_table_create \
-   _bfd_generic_link_hash_table_create
- #endif
  #ifndef bfd_elfNN_bfd_link_add_symbols
  #define bfd_elfNN_bfd_link_add_symbols        _bfd_generic_link_add_symbols
  #endif
--- 162,172 ----
    _bfd_elf_canonicalize_dynamic_reloc
  #endif
  
  #ifndef bfd_elfNN_bfd_link_hash_table_create
  #define bfd_elfNN_bfd_link_hash_table_create _bfd_elf_link_hash_table_create
  #endif
! #ifndef elf_backend_relocate_section
  /* If no backend relocate_section routine, use the generic linker.  */
  #ifndef bfd_elfNN_bfd_link_add_symbols
  #define bfd_elfNN_bfd_link_add_symbols        _bfd_generic_link_add_symbols
  #endif




reply via email to

[Prev in Thread] Current Thread [Next in Thread]