public inbox for gdb-testers@sourceware.org help / color / mirror / Atom feed
From: sergiodj+buildbot@sergiodj.net To: gdb-testers@sourceware.org Subject: [binutils-gdb] PowerPC/BFD: Convert `%P: %H:' to `%H:' in error messages Date: Wed, 15 Feb 2017 14:09:00 -0000 [thread overview] Message-ID: <174d0a74a2e631d7303fe00b517bcee75003a4a6@gdb-build> (raw) *** TEST RESULTS FOR COMMIT 174d0a74a2e631d7303fe00b517bcee75003a4a6 *** Author: Maciej W. Rozycki <macro@imgtec.com> Branch: master Commit: 174d0a74a2e631d7303fe00b517bcee75003a4a6 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.
next reply other threads:[~2017-02-15 14:09 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-02-15 14:09 sergiodj+buildbot [this message] 2017-02-15 14:09 ` Failures on Ubuntu-AArch32-native-gdbserver-m32, branch master sergiodj+buildbot 2017-02-15 14:29 ` Failures on Debian-s390x-native-gdbserver-m64, " sergiodj+buildbot 2017-02-15 14:30 ` Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, " sergiodj+buildbot 2017-02-17 21:47 ` Failures on Fedora-ppc64le-native-gdbserver-m64, " sergiodj+buildbot 2017-02-17 23:43 ` Failures on Fedora-ppc64le-native-extended-gdbserver-m64, " sergiodj+buildbot 2017-02-18 8:17 ` Failures on Fedora-ppc64be-native-extended-gdbserver-m64, " sergiodj+buildbot 2017-02-18 8:58 ` Failures on Fedora-ppc64be-cc-with-index, " sergiodj+buildbot
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=174d0a74a2e631d7303fe00b517bcee75003a4a6@gdb-build \ --to=sergiodj+buildbot@sergiodj.net \ --cc=gdb-testers@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).