diff options
author | Mark Mitchell <mark@codesourcery.com> | 1999-07-07 17:50:56 +0000 |
---|---|---|
committer | Mark Mitchell <mark@codesourcery.com> | 1999-07-07 17:50:56 +0000 |
commit | c7ac6ff835615a523fe86575cd5fae3f93f88430 (patch) | |
tree | b3b6c2a0430fa8c023ab019d2e7e0efa8cb141f9 /bfd/elf-bfd.h | |
parent | 9846de1bb5d61521885ef51fa6b99121ec1be577 (diff) | |
download | gdb-c7ac6ff835615a523fe86575cd5fae3f93f88430.zip gdb-c7ac6ff835615a523fe86575cd5fae3f93f88430.tar.gz gdb-c7ac6ff835615a523fe86575cd5fae3f93f88430.tar.bz2 |
* elflink.h (elf_link_create_dynamic_sections): Handle non-standard
hash-entry sizes.
(size_dynamic_sections): Likewise.
(elf_link_output_extsym): Likewise.
* elf.c: (elf_fake_sections): Likewise.
* libbfd.c (bfd_get): New macro.
(bfd_put): Likewise.
* bfd-in2.h: Regenerated.
* elf-bfd.h (elf_size_info): Add hash_entry_size,
int_rels_per_ext_rel, swap_dyn_out, swap_reloc_in, swap_reloc_out,
wap_reloca_in, and swap_reloca_out.
* elflink.h (elf_link_read_relocs_from_section): Adjust to handle
multiple internal relocations per external relocation.
(link_read_relocs): Likewise.
(elf_bfd_final_link): Likewise.
(elf_link_input_bfd): Likewise.
(elf_gc_mark): Likewise.
(elf_gc_smash_unused_vtentry_relocs): Likewise.
* elfcode.h (elf_swap_dyn_out): Adjust type to match
elf_swap_dyn_in.
(size_info): Add entries for new fields.
* elf64-mips.c (mips_elf64_swap_reloc_out): Enable.
(mips_elf64_be_swap_reloc_in): New function.
(mips_elf64_be_swap_reloc_out): Likewise.
(mips_elf64_be_swap_reloca_in): Likewise.
(mips_elf64_be_swap_reloca_out): Likewise.
(mips_elf64_size_info): Add entries for new fields.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r-- | bfd/elf-bfd.h | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index 05667bd..303f0a8 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -236,6 +236,13 @@ struct elf_size_info { unsigned char sizeof_ehdr, sizeof_phdr, sizeof_shdr; unsigned char sizeof_rel, sizeof_rela, sizeof_sym, sizeof_dyn, sizeof_note; + /* The size of entries in the .hash section. */ + unsigned char sizeof_hash_entry; + + /* The number of internal relocations to allocate per external + relocation entry. */ + unsigned char int_rels_per_ext_rel; + unsigned char arch_size, file_align; unsigned char elfclass, ev_current; int (*write_out_phdrs) PARAMS ((bfd *, const Elf_Internal_Phdr *, int)); @@ -246,6 +253,32 @@ struct elf_size_info { PARAMS ((bfd *, asection *, asymbol **, boolean)); long (*slurp_symbol_table) PARAMS ((bfd *, asymbol **, boolean)); void (*swap_dyn_in) PARAMS ((bfd *, const PTR, Elf_Internal_Dyn *)); + void (*swap_dyn_out) PARAMS ((bfd *, const Elf_Internal_Dyn *, PTR)); + + /* This function, if defined, is called to swap in a REL + relocation. If an external relocation corresponds to more than + one internal relocation, then all relocations are swapped in at + once. */ + void (*swap_reloc_in) + PARAMS ((bfd *, const bfd_byte *, Elf_Internal_Rel *)); + + /* This function, if defined, is called to swap out a REL + relocation. */ + void (*swap_reloc_out) + PARAMS ((bfd *, const Elf_Internal_Rel *, bfd_byte *)); + + /* This function, if defined, is called to swap in a RELA + relocation. If an external relocation corresponds to more than + one internal relocation, then all relocations are swapped in at + once. */ + void (*swap_reloca_in) + PARAMS ((bfd *, const bfd_byte *, Elf_Internal_Rela *)); + + /* This function, if defined, is called to swap out a RELA + relocation. */ + void (*swap_reloca_out) + PARAMS ((bfd *, const Elf_Internal_Rela *, bfd_byte *)); + }; #define elf_symbol_from(ABFD,S) \ @@ -1024,7 +1057,7 @@ extern void bfd_elf32_swap_phdr_out extern void bfd_elf32_swap_dyn_in PARAMS ((bfd *, const PTR, Elf_Internal_Dyn *)); extern void bfd_elf32_swap_dyn_out - PARAMS ((bfd *, const Elf_Internal_Dyn *, Elf32_External_Dyn *)); + PARAMS ((bfd *, const Elf_Internal_Dyn *, PTR)); extern long bfd_elf32_slurp_symbol_table PARAMS ((bfd *, asymbol **, boolean)); extern boolean bfd_elf32_write_shdrs_and_ehdr PARAMS ((bfd *)); @@ -1067,7 +1100,7 @@ extern void bfd_elf64_swap_phdr_out extern void bfd_elf64_swap_dyn_in PARAMS ((bfd *, const PTR, Elf_Internal_Dyn *)); extern void bfd_elf64_swap_dyn_out - PARAMS ((bfd *, const Elf_Internal_Dyn *, Elf64_External_Dyn *)); + PARAMS ((bfd *, const Elf_Internal_Dyn *, PTR)); extern long bfd_elf64_slurp_symbol_table PARAMS ((bfd *, asymbol **, boolean)); extern boolean bfd_elf64_write_shdrs_and_ehdr PARAMS ((bfd *)); |