]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - bfd/elf32-ppc.c
PowerPC readonly_dynrelocs
authorAlan Modra <amodra@gmail.com>
Wed, 1 Nov 2017 21:35:03 +0000 (08:05 +1030)
committerAlan Modra <amodra@gmail.com>
Sat, 4 Nov 2017 23:07:33 +0000 (09:37 +1030)
commit98bbb1b86180324b278842d8d73c79cb5d76d349
tree432703f6d0d970b0fc2ceb69009d71a50f281bc6
parent2e684e75ae3939f5f14fb89ca8a300b610d093dd
PowerPC readonly_dynrelocs

PowerPC64 lacked the mapfile textrel warning on finding dynamic relocs
in read-only sections.  This patch adds it, and tidies the
readonly_dynrelocs interface.  PowerPC doesn't need a SEC_ALLOC test
because !SEC_ALLOC sections are excluded by check_relocs so will never
have dyn_relocs.

* elf32-ppc.c (readonly_dynrelocs): Delete info param.  Update all
callers.  Don't bother with SEC_ALLOC test.  Return section pointer.
Move minfo call to..
(maybe_set_textrel): ..here.
* elf64-ppc.c (readonly_dynrelocs): Return section pointer.
(maybe_set_textrel): Call minfo to print textrel warning to map file.
bfd/ChangeLog
bfd/elf32-ppc.c
bfd/elf64-ppc.c