[AArch64] Only override the symbol dynamic decision on undefined weak symbol
authorJiong Wang <jiong.wang@arm.com>
Thu, 29 Jun 2017 10:47:43 +0000 (11:47 +0100)
committerJiong Wang <jiong.wang@arm.com>
Thu, 29 Jun 2017 10:47:43 +0000 (11:47 +0100)
commitff07562f1e369b6e37eafb2a888dc48fa2453e86
tree02a834f2d636d5382e44a33e6c6b854cd1c66366
parent2aff25ba76035d2f1f48ea8a6c4b7e498ee31790
[AArch64] Only override the symbol dynamic decision on undefined weak symbol

This fix is an adaption of the x86-64 PR ld/21402 fix to AArch64.

After the generic code deciding one symbol is not dynamic, AArch64 backend
only overrides the decision on undefined weak symbols.

bfd/
PR ld/21402
* elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
undefined weak symbols into dynamic.
(elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
relocation for non-dynamic symbols.
(elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
bfd/ChangeLog
bfd/elfnn-aarch64.c