aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-x86-64/pr19969.d
AgeCommit message (Collapse)AuthorFilesLines
2017-08-23x86-64: Properly report output type when PIC is neededH.J. Lu1-1/+1
-fPIC may be needed to compile PIE or PDE objects, not just shared object. bfd/ * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for bfd_link_info. Report shared, PIE or PDE object based on bfd_link_info. (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call. (elf_x86_64_relocate_section): Likewise. ld/ * testsuite/ld-x86-64/pie2.d: Updated. * testsuite/ld-x86-64/pr19719.d: Likewise. * testsuite/ld-x86-64/pr19807-2a.d: Likewise. * testsuite/ld-x86-64/pr19969.d: Likewise.
2016-04-20Check run-time R_X86_64_32 relocation overflowH.J. Lu1-0/+4
Since elf_x86_64_check_relocs is called after opening all input files, we can detect dynamic R_X86_64_32 relocation overflow there. bfd/ PR ld/19969 * elf64-x86-64.c (check_relocs_failed): New. (elf_x86_64_need_pic): Moved before elf_x86_64_check_relocs. Support relocation agaist local symbol. Set check_relocs_failed. (elf_x86_64_check_relocs): Use elf_x86_64_need_pic. Check R_X86_64_32 relocation overflow. (elf_x86_64_relocate_section): Skip if check_relocs failed. Update one elf_x86_64_need_pic and remove one elf_x86_64_need_pic. ld/ PR ld/19969 * testsuite/ld-x86-64/pr19969.d: New file. * testsuite/ld-x86-64/pr19969a.S: Likewise. * testsuite/ld-x86-64/pr19969b.S: Likewise. * testsuite/ld-x86-64/x86-64.exp: Run pr19969 tests.