summaryrefslogtreecommitdiff
path: root/bfd/elf-bfd.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2013-02-18 23:50:26 +0000
committerAlan Modra <amodra@bigpond.net.au>2013-02-18 23:50:26 +0000
commitcb96b680825c6c5dd51fe8149c7adeecf8b82d8b (patch)
tree5a4bf2c053e93e1a61345b5ee8ca3474ff2cc6ef /bfd/elf-bfd.h
parent1404181eb634e539c00ffac210e66f93123f2168 (diff)
downloadbinutils-redhat-cb96b680825c6c5dd51fe8149c7adeecf8b82d8b.tar.gz
include/
* bfdlink.h (struct bfd_link_info): Delete emit_note_gnu_build_id. bfd/ * configure.in: Bump version to 2.23.52. * elf-bfd.h (struct elf_build_id_info): New. (struct elf_obj_tdata): Delete after_write_object_contents, after_write_object_contents_info and build_id_size. Make build_id a pointer to struct elf_build_id_info. * elf.c (_bfd_elf_write_object_contents): Style. Update after_write_ibject_contents invocation. (elfobj_grok_gnu_build_id): Update for new build_id struct. Don't allow zero size notes. * configure: Regenerate. gdb/ * elfread.c (struct build_id): Delete. Use struct elf_build_id throughout file instead. (build_id_bfd_get): Update to use new elf_tdata build_id field. Don't xmalloc return value. (build_id_verify): Similarly. Don't xfree. (build_id_to_debug_filename): Update. (find_separate_debug_file_by_buildid): Update, don't xfree. ld/ * emultempl/elf32.em (emit_note_gnu_build_id): New static var. Replace all info->emit_note_gnu_build_id refs. (id_note_section_size): Rename from gld${EMULATION_NAME}_id_note_section_size. (struct build_id_info): Delete. (write_build_id): Rename from gld${EMULATION_NAME}_write_build_id_section. Update elf_tdata usage. Style, formatting. (setup_build_id): New function. (gld${EMULATION_NAME}_after_open): Use setup_build_id.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r--bfd/elf-bfd.h29
1 files changed, 23 insertions, 6 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index c8d2957e2d..d2f62f5bf7 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -1512,6 +1512,28 @@ struct sdt_note
bfd_byte data[1];
};
+/* NT_GNU_BUILD_ID note type info. */
+struct elf_build_id_info
+{
+ union
+ {
+ /* Used on output bfd by linker. */
+ struct elf_build_id_out
+ {
+ size_t zero; /* Always zero */
+ bfd_boolean (*after_write_object_contents) (bfd *);
+ const char *style;
+ asection *sec;
+ } o;
+ /* Used for input bfd. */
+ struct elf_build_id
+ {
+ size_t size; /* Always non-zero */
+ bfd_byte data[1];
+ } i;
+ } u;
+};
+
/* Some private data is stashed away for future use using the tdata pointer
in the bfd structure. */
@@ -1645,13 +1667,8 @@ struct elf_obj_tdata
obj_attribute known_obj_attributes[2][NUM_KNOWN_OBJ_ATTRIBUTES];
obj_attribute_list *other_obj_attributes[2];
- /* Called at the end of _bfd_elf_write_object_contents if not NULL. */
- bfd_boolean (*after_write_object_contents) (bfd *);
- void *after_write_object_contents_info;
-
/* NT_GNU_BUILD_ID note type. */
- bfd_size_type build_id_size;
- bfd_byte *build_id;
+ struct elf_build_id_info *build_id;
/* Linked-list containing information about every Systemtap section
found in the object file. Each section corresponds to one entry