This fixes a few issues with pe/coff build-ids that were discovered since the
authorJon Turney <jon.turney@dronecode.org.uk>
Fri, 16 May 2014 14:34:13 +0000 (15:34 +0100)
committerNick Clifton <nickc@redhat.com>
Fri, 16 May 2014 14:34:13 +0000 (15:34 +0100)
commit6e6e7cfc78e3ae1f4b670fc42d3b4e113d57a62b
treea793c7a01c0387aebbb964c4d3bda9c156bf8cb1
parent856ea05ccf051d4d86f422552f5cdfa83659dd6b
This fixes a few issues with pe/coff build-ids that were discovered since the
original patches were posted:

  pe/coff: Display GUID build-id in the conventional way
  pe/coff: Don't interpret debug directory in section with no contents
  pe/coff: Keep .build-id with --only-keep-debug
  pe/coff: Don't break .build-id with objcopy/strip

* peXXigen.c (pe_print_debugdata): Don't interpret debug directory
in a section with no contents.
(is_vma_in_section, find_section_by_vma): New functions.
(_bfd_XX_bfd_copy_private_bfd_data_common): Recalculate file
offsets in the debug directory.
(_bfd_XXi_slurp_codeview_record, _bfd_XXi_write_codeview_record):
Byte-swap GUID from little-endian to big-endian order for
consistent and conventional display.

* objcopy.c (is_nondebug_keep_contents_section): New function.
(setup_section): Use it.
bfd/ChangeLog
bfd/peXXigen.c
binutils/ChangeLog
binutils/objcopy.c