aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd-in2.h
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2005-07-25 15:35:37 +0000
committerH.J. Lu <hjl.tools@gmail.com>2005-07-25 15:35:37 +0000
commita4d8e49b5087fc4ed7392b451d506ee6a643bae1 (patch)
treeb2de2ea046dabfa4f6b57cccb2fedf770106e506 /bfd/bfd-in2.h
parent40afd879302a087103c408f437bdccd1f5f86d63 (diff)
downloadgdb-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/bfd-in2.h')
-rw-r--r--bfd/bfd-in2.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index c9c75c2..7dbfe95 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -1551,6 +1551,47 @@ extern const struct bfd_symbol * const bfd_ind_symbol;
#define bfd_section_removed_from_list(ABFD, S) \
((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S))
+#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, SYM_PTR, NAME, IDX) \
+ /* name, id, index, next, prev, flags, user_set_vma, */ \
+ { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \
+ \
+ /* linker_mark, linker_has_input, gc_mark, gc_mark_from_eh, */ \
+ 0, 0, 1, 0, \
+ \
+ /* segment_mark, sec_info_type, use_rela_p, has_tls_reloc, */ \
+ 0, 0, 0, 0, \
+ \
+ /* has_gp_reloc, need_finalize_relax, reloc_done, */ \
+ 0, 0, 0, \
+ \
+ /* vma, lma, size, rawsize */ \
+ 0, 0, 0, 0, \
+ \
+ /* output_offset, output_section, alignment_power, */ \
+ 0, (struct bfd_section *) &SEC, 0, \
+ \
+ /* relocation, orelocation, reloc_count, filepos, rel_filepos, */ \
+ NULL, NULL, 0, 0, 0, \
+ \
+ /* line_filepos, userdata, contents, lineno, lineno_count, */ \
+ 0, NULL, NULL, NULL, 0, \
+ \
+ /* entsize, kept_section, moving_line_filepos, */ \
+ 0, NULL, 0, \
+ \
+ /* target_index, used_by_bfd, constructor_chain, owner, */ \
+ 0, NULL, NULL, NULL, \
+ \
+ /* symbol, */ \
+ (struct bfd_symbol *) SYM, \
+ \
+ /* symbol_ptr_ptr, */ \
+ (struct bfd_symbol **) SYM_PTR, \
+ \
+ /* map_head, map_tail */ \
+ { NULL }, { NULL } \
+ }
+
void bfd_section_list_clear (bfd *);
asection *bfd_get_section_by_name (bfd *abfd, const char *name);