Summary: | [microblaze] ld fails with missing _GLOBAL_OFFSET_TABLE_ symbol when all relocs are @GOTOFF | ||
---|---|---|---|
Product: | binutils | Reporter: | Rich Felker <bugdal> |
Component: | ld | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | nickc, wbx |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Attachments: | patch to fix the bug |
Description
Rich Felker
2017-01-02 20:51:58 UTC
Created attachment 9735 [details]
patch to fix the bug
This seems to fix the issue, but there may be additional reloc types that should be checked to fully fix it.
The master branch has been updated by Nick Clifton <nickc@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=de1010f40884537cf0905ad134162cd2db71dc2a commit de1010f40884537cf0905ad134162cd2db71dc2a Author: Rich Felker <bugdal@aerifal.cx> Date: Tue Jan 3 16:18:41 2017 +0000 Fix generation of GOT table when only GOT-relative relocs are used. PR ld/21017 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry for R_MICROBLAZE_GOTOFF_64. Hi Rich, I have checked in your proposed patch. We can add further relocs later if need be. If you can create a test case to demonstrate the problem, that would be very helpful as I could then add it to the linker testsuite. Cheers Nick The master branch has been updated by Alan Modra <amodra@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=206c9c79ee24759c0e0af96e6722298b413f2716 commit 206c9c79ee24759c0e0af96e6722298b413f2716 Author: Alan Modra <amodra@gmail.com> Date: Tue Aug 8 14:05:33 2017 +0930 PR21017, microblaze missing _GLOBAL_OFFSET_TABLE_ symbol PR 21017 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump got.refcount for GOTOFF relocs, just create .got section. The binutils-2_29-branch branch has been updated by Alan Modra <amodra@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=51bd0f967a9a9dfddaa267b4b6fb2e653d252026 commit 51bd0f967a9a9dfddaa267b4b6fb2e653d252026 Author: Alan Modra <amodra@gmail.com> Date: Tue Aug 8 14:05:33 2017 +0930 PR21017, microblaze missing _GLOBAL_OFFSET_TABLE_ symbol PR 21017 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump got.refcount for GOTOFF relocs, just create .got section. |