Skip relocations in non-loaded, non-alloced sections
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 16 Jun 2016 12:52:34 +0000 (05:52 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 16 Jun 2016 12:52:34 +0000 (05:52 -0700)
commit081b1afe5a8cfa02bf3b3cdefb80c266705c17d1
tree6c6ff3dec59dc5748448b89a0861023f45debdf8
parent4c23f2ffa8fbd467bca51956130a1f30cfe34371
Skip 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.

* elf32-i386.c (elf_i386_check_relocs): Skip relocations in
non-loaded, non-alloced sections.
* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
bfd/ChangeLog
bfd/elf32-i386.c
bfd/elf64-x86-64.c