aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2014-08-30 15:02:49 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2014-09-08 17:54:20 +0100
commit74fffc39827629fb48c9e24a7d12ebbd5693df4b (patch)
treea419369e64e5b4bf5e61bf6fd8fc6c7b12ff2ca2 /binutils
parent2e4bb98a0e52acbb2da4ae441b89a568af26adf8 (diff)
downloadgdb-74fffc39827629fb48c9e24a7d12ebbd5693df4b.zip
gdb-74fffc39827629fb48c9e24a7d12ebbd5693df4b.tar.gz
gdb-74fffc39827629fb48c9e24a7d12ebbd5693df4b.tar.bz2
Change pe/coff build-id section name to '.buildid'
The section name used to store the build-id on pe/coff is arbitrary, as it's contents should be located using the pe/coff header's DataDirectory debug data entry, not by using the section name. But '.build-id' is not a good choice for that section name, as it is 9 characters long, and hence truncated to 8 characters when --disable-long-section-names is used (which is the default, when producing an executable with no dwarf debug sections, e.g. using ld --strip-all --build-id) This truncation then breaks 'objcopy --only-keep-debug', which does use the section name, due to concerns that keeping an arbitrary section which contains the debug directory is not sensible. binutils/ChangeLog 2014-09-01 Jon TURNEY <jon.turney@dronecode.org.uk> * objcopy.c (is_nondebug_keep_contents_section): Change pe/coff build-id section name from '.build-id' to '.buildid'. ld/ChangeLog 2014-09-01 Jon TURNEY <jon.turney@dronecode.org.uk> * emultempl/pe.em (write_build_id, setup_build_id): Change pe/coff build-id section name from '.build-id' to '.buildid'. * emultempl/pep.em (write_build_id, setup_build_id): Ditto. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/objcopy.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 19569d4..693e155 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2014-09-01 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * objcopy.c (is_nondebug_keep_contents_section): Change
+ '.build-id' to '.buildid'.
+
2014-08-22 Richard Henderson <rth@redhat.com>
* dwarf.h (init_dwarf_regnames_aarch64): Declare.
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index 46fd8bc..3b353ad 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -1148,13 +1148,13 @@ is_nondebug_keep_contents_section (bfd *ibfd, asection *isection)
if (ibfd->xvec->flavour == bfd_target_elf_flavour)
return (elf_section_type (isection) == SHT_NOTE);
- /* Always keep the .build-id section for PE/COFF.
+ /* Always keep the .buildid section for PE/COFF.
Strictly, this should be written "always keep the section storing the debug
directory", but that may be the .text section for objects produced by some
tools, which it is not sensible to keep. */
if (ibfd->xvec->flavour == bfd_target_coff_flavour)
- return (strcmp (bfd_get_section_name (ibfd, isection), ".build-id") == 0);
+ return (strcmp (bfd_get_section_name (ibfd, isection), ".buildid") == 0);
return FALSE;
}