public inbox for gdb-testers@sourceware.org help / color / mirror / Atom feed
From: gdb-buildbot@sergiodj.net To: gdb-testers@sourceware.org Subject: [binutils-gdb] m68hc1x: better arg checking for reloc_warning Date: Sun, 20 Oct 2019 23:14:00 -0000 [thread overview] Message-ID: <9b142ddb4a115b6e58fabb05920bdd94811fda98@gdb-build> (raw) *** TEST RESULTS FOR COMMIT 9b142ddb4a115b6e58fabb05920bdd94811fda98 *** commit 9b142ddb4a115b6e58fabb05920bdd94811fda98 Author: Alan Modra <amodra@gmail.com> AuthorDate: Tue Oct 15 19:33:17 2019 +1030 Commit: Alan Modra <amodra@gmail.com> CommitDate: Tue Oct 15 23:25:11 2019 +1030 m68hc1x: better arg checking for reloc_warning * elf32-m68hc1x.c (reloc_warning): Add printf attribute. (elf32_m68hc11_relocate_section): Don't use a variable for format strings. Delete some unnecessary xgettext:c-format comments. diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 72fb5eea97..5a9bfd7270 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2019-10-15 Alan Modra <amodra@gmail.com> + + * elf32-m68hc1x.c (reloc_warning): Add printf attribute. + (elf32_m68hc11_relocate_section): Don't use a variable for format + strings. Delete some unnecessary xgettext:c-format comments. + 2019-10-15 Alan Modra <amodra@gmail.com> PR 24955 diff --git a/bfd/elf32-m68hc1x.c b/bfd/elf32-m68hc1x.c index 915f3b7a9a..b8aeeae6b9 100644 --- a/bfd/elf32-m68hc1x.c +++ b/bfd/elf32-m68hc1x.c @@ -899,7 +899,7 @@ elf32_m68hc11_check_relocs (bfd *abfd, struct bfd_link_info *info, return TRUE; } -static bfd_boolean +static bfd_boolean ATTRIBUTE_PRINTF (6, 7) reloc_warning (struct bfd_link_info *info, const char *name, bfd *input_bfd, asection *input_section, const Elf_Internal_Rela *rel, const char *fmt, ...) @@ -1132,10 +1132,10 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, case R_M68HC11_16: if (is_far) { - msg = _("reference to the far symbol `%s' using a wrong " - "relocation may result in incorrect execution"); if (!reloc_warning (info, name, input_bfd, input_section, rel, - msg, name)) + _("reference to the far symbol `%s' using a " + "wrong relocation may result in incorrect " + "execution"), name)) return FALSE; } @@ -1163,12 +1163,12 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, } else { - msg = _("XGATE address (%lx) is not within shared RAM" - "(0xE000-0xFFFF), therefore you must manually offset " - "the address, and possibly manage the page, in your " - "code."); if (!reloc_warning (info, name, input_bfd, input_section, rel, - msg, (long) phys_addr)) + _("XGATE address (%lx) is not within " + "shared RAM(0xE000-0xFFFF), therefore " + "you must manually offset the address, " + "and possibly manage the page, in your " + "code."), (long) phys_addr)) return FALSE; break; } @@ -1179,11 +1179,11 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, && phys_page != insn_page && !(e_flags & E_M68HC11_NO_BANK_WARNING)) { - /* xgettext:c-format */ - msg = _("banked address [%lx:%04lx] (%lx) is not in the same " - "bank as current banked address [%lx:%04lx] (%lx)"); if (!reloc_warning (info, name, input_bfd, input_section, rel, - msg, (long) phys_page, (long) phys_addr, + _("banked address [%lx:%04lx] (%lx) is not " + "in the same bank as current banked " + "address [%lx:%04lx] (%lx)"), + (long) phys_page, (long) phys_addr, (long) (relocation + rel->r_addend), (long) insn_page, (long) m68hc11_phys_addr (pinfo, insn_addr), @@ -1194,11 +1194,10 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, if (phys_page != 0 && insn_page == 0) { - /* xgettext:c-format */ - msg = _("reference to a banked address [%lx:%04lx] in the " - "normal address space at %04lx"); if (!reloc_warning (info, name, input_bfd, input_section, rel, - msg, (long) phys_page, (long) phys_addr, + _("reference to a banked address [%lx:%04lx] " + "in the normal address space at %04lx"), + (long) phys_page, (long) phys_addr, (long) insn_addr)) return FALSE; relocation = phys_addr; @@ -1231,11 +1230,11 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, relocation += 0xC000; else { - msg = _("S12 address (%lx) is not within shared RAM" - "(0x2000-0x4000), therefore you must manually " - "offset the address in your code"); if (!reloc_warning (info, name, input_bfd, input_section, rel, - msg, (long) phys_addr)) + _("S12 address (%lx) is not within " + "shared RAM(0x2000-0x4000), therefore " + "you must manually offset the address " + "in your code"), (long) phys_addr)) return FALSE; break; }
next reply other threads:[~2019-10-20 23:14 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-10-20 23:14 gdb-buildbot [this message] 2019-10-20 23:14 ` Failures on Ubuntu-Aarch64-native-extended-gdbserver-m64, branch master gdb-buildbot 2019-10-21 0:03 ` Failures on Ubuntu-Aarch64-native-gdbserver-m64, " gdb-buildbot 2019-10-29 4:14 ` Failures on Fedora-i686, " gdb-buildbot 2019-10-29 4:51 ` Failures on Fedora-x86_64-cc-with-index, " gdb-buildbot 2019-10-29 4:52 ` Failures on Fedora-x86_64-m32, " gdb-buildbot 2019-10-29 5:26 ` Failures on Fedora-x86_64-m64, " gdb-buildbot 2019-10-29 5:34 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot 2019-10-29 6:09 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot 2019-10-29 6:47 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-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=9b142ddb4a115b6e58fabb05920bdd94811fda98@gdb-build \ --to=gdb-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).