aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-bfd.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2007-07-09 21:23:39 +0000
committerRoland McGrath <roland@gnu.org>2007-07-09 21:23:39 +0000
commit20a761b5e938488128342ab0f12244b5eadd8d35 (patch)
tree070301a4b7cdad95e120e506bb948ab135c0fd0f /bfd/elf-bfd.h
parentd94838b10225a1444ce294b342b75c7729fddeac (diff)
downloadgdb-20a761b5e938488128342ab0f12244b5eadd8d35.zip
gdb-20a761b5e938488128342ab0f12244b5eadd8d35.tar.gz
gdb-20a761b5e938488128342ab0f12244b5eadd8d35.tar.bz2
2007-07-09 Roland McGrath <roland@redhat.com>
* elf-bfd.h (struct elf_obj_tdata): Add members emit_note_gnu_build_id and note_gnu_build_id_sec. * elf.c (_bfd_id_note_section_size): New global function. (read_hex, _bfd_elf_write_build_id_section): New static functions. (_bfd_elf_write_object_contents): Call _bfd_elf_write_build_id_section if emit_note_gnu_build_id is set. * Makefile.am (elf.lo): Update dependencies. * elf-bfd.h (struct elf_size_info): Add checksum_contents hook. (bfd_elf32_checksum_contents, bfd_elf64_checksum_contents): Declare. * elfcode.h (elf_checksum_contents): New macro and function. (NAME(_bfd_elf,size_info)): Initialize checksum_contents hook.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r--bfd/elf-bfd.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index f7fba9d..7e3592e 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -448,6 +448,8 @@ struct elf_size_info {
(bfd *, const Elf_Internal_Phdr *, unsigned int);
bfd_boolean
(*write_shdrs_and_ehdr) (bfd *);
+ bfd_boolean (*checksum_contents)
+ (bfd * , void (*) (const void *, size_t, void *), void *);
void (*write_relocs)
(bfd *, asection *, void *);
bfd_boolean (*swap_symbol_in)
@@ -1466,6 +1468,10 @@ struct elf_obj_tdata
obj_attribute known_obj_attributes[2][NUM_KNOWN_OBJ_ATTRIBUTES];
obj_attribute_list *other_obj_attributes[2];
+
+ /* The .note.gnu.build-id section and --build-id option setting, or NULL. */
+ char *emit_note_gnu_build_id;
+ asection *note_gnu_build_id_sec;
};
#define elf_tdata(bfd) ((bfd) -> tdata.elf_obj_data)
@@ -1869,6 +1875,8 @@ extern bfd_boolean bfd_elf32_write_shdrs_and_ehdr
(bfd *);
extern int bfd_elf32_write_out_phdrs
(bfd *, const Elf_Internal_Phdr *, unsigned int);
+extern bfd_boolean bfd_elf32_checksum_contents
+ (bfd * , void (*) (const void *, size_t, void *), void *);
extern void bfd_elf32_write_relocs
(bfd *, asection *, void *);
extern bfd_boolean bfd_elf32_slurp_reloc_table
@@ -1911,6 +1919,8 @@ extern bfd_boolean bfd_elf64_write_shdrs_and_ehdr
(bfd *);
extern int bfd_elf64_write_out_phdrs
(bfd *, const Elf_Internal_Phdr *, unsigned int);
+extern bfd_boolean bfd_elf64_checksum_contents
+ (bfd * , void (*) (const void *, size_t, void *), void *);
extern void bfd_elf64_write_relocs
(bfd *, asection *, void *);
extern bfd_boolean bfd_elf64_slurp_reloc_table
@@ -2036,6 +2046,9 @@ extern int _bfd_elf_obj_attrs_arg_type (bfd *, int, int);
extern void _bfd_elf_parse_attributes (bfd *, Elf_Internal_Shdr *);
extern bfd_boolean _bfd_elf_merge_object_attributes (bfd *, bfd *);
+extern bfd_size_type _bfd_id_note_section_size
+ (bfd *abfd, struct bfd_link_info *link_info);
+
/* Large common section. */
extern asection _bfd_elf_large_com_section;