aboutsummaryrefslogtreecommitdiff
path: root/bfd/ChangeLog
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@imgtec.com>2017-02-07 02:07:21 +0000
committerMaciej W. Rozycki <macro@imgtec.com>2017-02-15 13:40:43 +0000
commit174d0a74a2e631d7303fe00b517bcee75003a4a6 (patch)
tree349eb2f6d68f05099033762cf85be89d9ca2e6da /bfd/ChangeLog
parentbefe814dd9ac6489c84ecd5c839b3b48aca95280 (diff)
downloadgdb-174d0a74a2e631d7303fe00b517bcee75003a4a6.zip
gdb-174d0a74a2e631d7303fe00b517bcee75003a4a6.tar.gz
gdb-174d0a74a2e631d7303fe00b517bcee75003a4a6.tar.bz2
PowerPC/BFD: Convert `%P: %H:' to `%H:' in error messages
Remove an inconsistency in BFD linker error messages across the PowerPC backends, where in the presence of line information the `%P: %H:' format sequence makes the first error message produced for any given function different from subsequent ones. Taking the `ld/testsuite/ld-powerpc/tocopt7.s' test case source as an example and the `powerpc-linux' target we have: $ as -gdwarf2 -o tocopt.o -a64 tocopt.s $ ld -o tocopt -melf64ppc tocopt.o ld: tocopt.o: In function `_start': tocopt.s:35:(.text+0x14): toc optimization is not supported for 0x3fa00000 instruction. ld: tocopt.s:49:(.text+0x34): toc optimization is not supported for 0x3fa00000 instruction. $ where the first error message does not have the source file name prefixed with the linker program executable's name, i.e. `ld:', whereas the second error message does, as would any subsequent. This is because with a multiple-line error message such as `%H' produces `%P' only prints the program executable's name on the first line and not any later ones. Also the PowerPC backend is the only part of BFD which uses `%P' along with one of the clever `%C', `%D', `%G', `%H' format specifiers. And last but not least this breaks a GNU Coding Standard's requirement that error messages from compilers should look like this: source-file-name:lineno: message also quoted in `vfinfo' code handling these specifiers. Convert `%P: %H:' to `%H:' in error messages across the PowerPC backends then, yielding: $ as -gdwarf2 -o tocopt.o -a64 tocopt.s $ ld -o tocopt -melf64ppc tocopt.o tocopt.o: In function `_start': tocopt.s:35:(.text+0x14): toc optimization is not supported for 0x3fa00000 instruction. tocopt.s:49:(.text+0x34): toc optimization is not supported for 0x3fa00000 instruction. $ instead, making it consistent and matching the GNU Coding Standard's requirement. bfd/ * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than `%P: %H:' with `info->callbacks->einfo'. (ppc_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_check_relocs): Likewise. (ppc64_elf_edit_toc): Likewise. (ppc64_elf_relocate_section): Likewise.
Diffstat (limited to 'bfd/ChangeLog')
-rw-r--r--bfd/ChangeLog9
1 files changed, 9 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 252c1d5..edd7633 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,12 @@
+2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
+
+ * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
+ `%P: %H:' with `info->callbacks->einfo'.
+ (ppc_elf_relocate_section): Likewise.
+ * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
+ (ppc64_elf_edit_toc): Likewise.
+ (ppc64_elf_relocate_section): Likewise.
+
2017-02-14 Alan Modra <amodra@gmail.com>
* elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support