Module Name: src Committed By: christos Date: Sun May 12 22:42:34 UTC 2019
Modified Files: src/external/gpl3/binutils/dist/bfd: elf32-ppc.c elf64-ppc.c Log Message: Modernize the error printing for text relocations by syncing it to the "more maintained" platforms. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/binutils/dist/bfd/elf32-ppc.c \ src/external/gpl3/binutils/dist/bfd/elf64-ppc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/gpl3/binutils/dist/bfd/elf32-ppc.c diff -u src/external/gpl3/binutils/dist/bfd/elf32-ppc.c:1.13 src/external/gpl3/binutils/dist/bfd/elf32-ppc.c:1.14 --- src/external/gpl3/binutils/dist/bfd/elf32-ppc.c:1.13 Sun Dec 30 17:48:31 2018 +++ src/external/gpl3/binutils/dist/bfd/elf32-ppc.c Sun May 12 18:42:33 2019 @@ -6616,9 +6616,16 @@ maybe_set_textrel (struct elf_link_hash_ struct bfd_link_info *info = (struct bfd_link_info *) info_p; info->flags |= DF_TEXTREL; - info->callbacks->minfo - (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"), - sec->owner, h->root.root.string, sec); + /* xgettext:c-format */ + info->callbacks->minfo (_("%pB: dynamic relocation against `%pT' " + "in read-only section `%pA'\n"), + sec->owner, h->root.root.string, sec); + if ((info->warn_shared_textrel && bfd_link_pic (info)) + || info->error_textrel) + /* xgettext:c-format */ + info->callbacks->einfo (_("%P: %pB: warning: relocation against `%s' " + "in read-only section `%pA'\n"), + sec->owner, h->root.root.string, sec); /* Not an error, just cut short the traversal. */ return FALSE; Index: src/external/gpl3/binutils/dist/bfd/elf64-ppc.c diff -u src/external/gpl3/binutils/dist/bfd/elf64-ppc.c:1.13 src/external/gpl3/binutils/dist/bfd/elf64-ppc.c:1.14 --- src/external/gpl3/binutils/dist/bfd/elf64-ppc.c:1.13 Tue Nov 6 20:13:52 2018 +++ src/external/gpl3/binutils/dist/bfd/elf64-ppc.c Sun May 12 18:42:33 2019 @@ -10260,9 +10260,17 @@ maybe_set_textrel (struct elf_link_hash_ struct bfd_link_info *info = (struct bfd_link_info *) inf; info->flags |= DF_TEXTREL; - info->callbacks->minfo - (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"), - sec->owner, h->root.root.string, sec); + /* xgettext:c-format */ + info->callbacks->minfo (_("%pB: dynamic relocation against `%pT' " + "in read-only section `%pA'\n"), + sec->owner, h->root.root.string, sec); + + if ((info->warn_shared_textrel && bfd_link_pic (info)) + || info->error_textrel) + /* xgettext:c-format */ + info->callbacks->einfo (_("%P: %pB: warning: relocation against `%s' " + "in read-only section `%pA'\n"), + sec->owner, h->root.root.string, sec); /* Not an error, just cut short the traversal. */ return FALSE;