nios2: Don't check relocations in non-loaded, non-alloced sections
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 3 Jun 2020 16:21:03 +0000 (09:21 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 3 Jun 2020 16:21:14 +0000 (09:21 -0700)
commit58ee44efbc3798a8224e685aa47b224dc67efe7d
tree1146bfed3c6169097d7069ef96c3b47a9c2f9a4c
parent9a6896021df5997a1ea5d52b86b833920005e652
nios2: Don't check relocations in non-loaded, non-alloced sections

Don't do anything special with non-loaded, non-alloced sections.
In particular, any relocs in such sections should not affect GOT
and PLT reference counting (ie. we don't allow them to create GOT
or PLT entries), there's no possibility or desire to optimize TLS
relocs, and there's not much point in propagating relocs to shared
libs that the dynamic linker won't relocate.

PR ld/26066
* elf32-nios2.c (nios2_elf32_check_relocs): Skip non-loaded,
non-alloced sections.
bfd/ChangeLog
bfd/elf32-nios2.c