diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2005-07-25 15:35:37 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2005-07-25 15:35:37 +0000 |
commit | a4d8e49b5087fc4ed7392b451d506ee6a643bae1 (patch) | |
tree | b2de2ea046dabfa4f6b57cccb2fedf770106e506 /bfd/elf-bfd.h | |
parent | 40afd879302a087103c408f437bdccd1f5f86d63 (diff) | |
download | gdb-a4d8e49b5087fc4ed7392b451d506ee6a643bae1.zip gdb-a4d8e49b5087fc4ed7392b451d506ee6a643bae1.tar.gz gdb-a4d8e49b5087fc4ed7392b451d506ee6a643bae1.tar.bz2 |
2005-07-25 H.J. Lu <hongjiu.lu@intel.com>
* elf-bfd.h (elf_backend_data): Add common_definition,
common_section_index, common_section, and merge_symbol.
(_bfd_elf_common_definition): New.
(_bfd_elf_common_section_index): New.
(_bfd_elf_common_section): New.
* elf.c (elf_fake_sections): Don't clear sh_flags.
* elflink.c (_bfd_elf_merge_symbol): Call backend merge_symbol
if it is available.
(is_global_data_symbol_definition): Call backend
common_definition instead of checking SHN_COMMON.
(elf_link_add_object_symbols): Likewise.
(elf_link_output_extsym): Call backend common_section_index
for common section index.
(_bfd_elf_common_definition): New.
(_bfd_elf_common_section_index): New.
(_bfd_elf_common_section): New.
* elfxx-target.h (elf_backend_common_definition): New.
(elf_backend_common_section_index): New.
(elf_backend_common_section): New.
(elf_backend_merge_symbol): New.
(elfNN_bed): Initialize common_definition, common_section_index,
common_section, and merge_symbol.
* section.c (BFD_FAKE_SECTION): New.
(STD_SECTION): Use it.
* bfd-in2.h: Regenerated.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r-- | bfd/elf-bfd.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index 2bbc1c9..f7bab5c 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -969,6 +969,30 @@ struct elf_backend_data see elf.c. */ bfd_vma (*plt_sym_val) (bfd_vma, const asection *, const arelent *); + /* Is symbol defined in common section? */ + bfd_boolean (*common_definition) (Elf_Internal_Sym *); + + /* Return a common section index for section. */ + unsigned int (*common_section_index) (asection *); + + /* Return a common section for section. */ + asection *(*common_section) (asection *); + + /* Return TRUE if we can merge 2 definitions. */ + bfd_boolean (*merge_symbol) (struct bfd_link_info *, + struct elf_link_hash_entry **, + struct elf_link_hash_entry *, + Elf_Internal_Sym *, asection **, + bfd_vma *, unsigned int *, + bfd_boolean *, bfd_boolean *, + bfd_boolean *, bfd_boolean *, + bfd_boolean *, bfd_boolean *, + bfd_boolean *, bfd_boolean *, + bfd *, asection **, + bfd_boolean *, bfd_boolean *, + bfd_boolean *, bfd_boolean *, + bfd *, asection **); + /* Used to handle bad SHF_LINK_ORDER input. */ bfd_error_handler_type link_order_error_handler; @@ -1741,6 +1765,15 @@ extern int bfd_elf_link_record_local_dynamic_symbol extern bfd_boolean _bfd_elf_close_and_cleanup (bfd *); +extern bfd_boolean _bfd_elf_common_definition + (Elf_Internal_Sym *); + +extern unsigned int _bfd_elf_common_section_index + (asection *); + +extern asection *_bfd_elf_common_section + (asection *); + extern void _bfd_dwarf2_cleanup_debug_info (bfd *); |