aboutsummaryrefslogtreecommitdiff
path: root/gdb/elfread.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2013-02-21 04:35:22 +0000
committerAlan Modra <amodra@gmail.com>2013-02-21 04:35:22 +0000
commitc03551323c0425db9b677ac2618e43854ac56064 (patch)
tree1ebc99fe420dae1ce441fd715fd4bc8855a10d5a /gdb/elfread.c
parent228e534f16219c61a3f2d1aea96cc5d78215b2d4 (diff)
downloadgdb-c03551323c0425db9b677ac2618e43854ac56064.zip
gdb-c03551323c0425db9b677ac2618e43854ac56064.tar.gz
gdb-c03551323c0425db9b677ac2618e43854ac56064.tar.bz2
bfd/
* elf-bfd.h (struct elf_build_id): Extracted from.. (struct elf_build_id_info): ..here. Delete. (struct output_elf_obj_tdata): New, extracted from.. (struct elf_obj_tdata): ..here. Reorganize for better packing. Add "o" field. (elf_program_header_size): Reference tdata->o. (elf_seg_map, elf_next_file_pos, elf_eh_frame_hdr, elf_linker, elf_stack_flags, elf_shstrtab, elf_strtab_sec, elf_shstrtab_sec, elf_section_syms, elf_num_section_syms, elf_flags_init): Likewise. * elf.c (bfd_elf_allocate_object): Allocate output_elf_obj_tdata when opening bfd in any mode that might write. (_bfd_elf_write_object_contents): Use build_id field in output_elf_obj_tdata. (_bfd_elf_close_and_cleanup): Tweak elf_shstrtab test. (elfobj_grok_gnu_build_id): Adjust for elf_tdata changes. gdb/ * elfread.c (build_id_bfd_get): Adjust for elf_tdata changes. ld/ * emultempl/elf32.em (write_build_id, setup_build_id): Adjust for elf_tdata changes.
Diffstat (limited to 'gdb/elfread.c')
-rw-r--r--gdb/elfread.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 85e408f..4520209 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -1081,11 +1081,10 @@ build_id_bfd_get (bfd *abfd)
{
if (!bfd_check_format (abfd, bfd_object)
|| bfd_get_flavour (abfd) != bfd_target_elf_flavour
- || elf_tdata (abfd)->build_id == NULL
- || elf_tdata (abfd)->build_id->u.i.size == 0)
+ || elf_tdata (abfd)->build_id == NULL)
return NULL;
- return &elf_tdata (abfd)->build_id->u.i;
+ return elf_tdata (abfd)->build_id;
}
/* Return if FILENAME has NT_GNU_BUILD_ID matching the CHECK value. */