If a relocation refers to _GLOBAL_OFFSET_TABLE_, we should always create
the .got. Otherwise, _GLOBAL_OFFSET_TABLE_ which implicitly points to
the start of .got section can't be resolved in some rare but do exist
scenarios (ppc32 seems has the same issue and have done the same fix).
ld regression OK on both cross and native environment.
OK for master?
2016-02-25 Jiong Wang <jiong.wang@arm.com>
bfd/
* elfnn-aarch64.c (elfNN_aarch64_check_relocs): Always create .got
section if
symbol _GLOBAL_OFFSET_TABLE_ referenced.
ld/testsuite/
* ld-aarch64/implicit_got_section_1.s: New test source file.
* ld-aarch64/implicit_got_section_1.d: New test expected result.
* ld-aarch64/aarch64-elf.exp: Run new test.