diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2014-08-30 15:02:49 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2014-09-08 17:54:20 +0100 |
commit | 74fffc39827629fb48c9e24a7d12ebbd5693df4b (patch) | |
tree | a419369e64e5b4bf5e61bf6fd8fc6c7b12ff2ca2 /ld/emultempl | |
parent | 2e4bb98a0e52acbb2da4ae441b89a568af26adf8 (diff) | |
download | gdb-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 'ld/emultempl')
-rw-r--r-- | ld/emultempl/pe.em | 10 | ||||
-rw-r--r-- | ld/emultempl/pep.em | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index 7a5b77b..979cc8b 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -1297,7 +1297,7 @@ write_build_id (bfd *abfd) bfd_size_type build_id_size; unsigned char *build_id; - /* Find the section the .build-id output section has been merged info. */ + /* Find the section the .buildid output section has been merged info. */ for (asec = abfd->sections; asec != NULL; asec = asec->next) { struct bfd_link_order *l = NULL; @@ -1319,7 +1319,7 @@ write_build_id (bfd *abfd) if (!link_order) { - einfo (_("%P: warning: .build-id section discarded," + einfo (_("%P: warning: .buildid section discarded," " --build-id ignored.\n")); return TRUE; } @@ -1383,7 +1383,7 @@ write_build_id (bfd *abfd) return TRUE; } -/* Make .build-id section, and set up coff_tdata->build_id. */ +/* Make .buildid section, and set up coff_tdata->build_id. */ static bfd_boolean setup_build_id (bfd *ibfd) { @@ -1398,7 +1398,7 @@ setup_build_id (bfd *ibfd) flags = (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_IN_MEMORY | SEC_LINKER_CREATED | SEC_READONLY | SEC_DATA); - s = bfd_make_section_anyway_with_flags (ibfd, ".build-id", flags); + s = bfd_make_section_anyway_with_flags (ibfd, ".buildid", flags); if (s != NULL) { struct pe_tdata *t = pe_data (link_info.output_bfd); @@ -1416,7 +1416,7 @@ setup_build_id (bfd *ibfd) return TRUE; } - einfo ("%P: warning: Cannot create .build-id section," + einfo ("%P: warning: Cannot create .buildid section," " --build-id ignored.\n"); return FALSE; } diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em index 6d56bc3..b24a608 100644 --- a/ld/emultempl/pep.em +++ b/ld/emultempl/pep.em @@ -1261,7 +1261,7 @@ write_build_id (bfd *abfd) bfd_size_type build_id_size; unsigned char *build_id; - /* Find the section the .build-id output section has been merged info. */ + /* Find the section the .buildid output section has been merged info. */ for (asec = abfd->sections; asec != NULL; asec = asec->next) { struct bfd_link_order *l = NULL; @@ -1283,7 +1283,7 @@ write_build_id (bfd *abfd) if (!link_order) { - einfo (_("%P: warning: .build-id section discarded," + einfo (_("%P: warning: .buildid section discarded," " --build-id ignored.\n")); return TRUE; } @@ -1347,7 +1347,7 @@ write_build_id (bfd *abfd) return TRUE; } -/* Make .build-id section, and set up coff_tdata->build_id. */ +/* Make .buildid section, and set up coff_tdata->build_id. */ static bfd_boolean setup_build_id (bfd *ibfd) { @@ -1362,7 +1362,7 @@ setup_build_id (bfd *ibfd) flags = (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_IN_MEMORY | SEC_LINKER_CREATED | SEC_READONLY | SEC_DATA); - s = bfd_make_section_anyway_with_flags (ibfd, ".build-id", flags); + s = bfd_make_section_anyway_with_flags (ibfd, ".buildid", flags); if (s != NULL) { struct pe_tdata *t = pe_data (link_info.output_bfd); @@ -1380,7 +1380,7 @@ setup_build_id (bfd *ibfd) return TRUE; } - einfo ("%P: warning: Cannot create .build-id section," + einfo ("%P: warning: Cannot create .buildid section," " --build-id ignored.\n"); return FALSE; } |