[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/20649] [MIPS] Can't find matching LO16 reloc
From: |
cvs-commit at gcc dot gnu.org |
Subject: |
[Bug gas/20649] [MIPS] Can't find matching LO16 reloc |
Date: |
Wed, 18 Jan 2017 18:47:11 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=20649
--- Comment #10 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot
gnu.org> ---
The binutils-2_28-branch branch has been updated by Maciej W. Rozycki
<address@hidden>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=65060a78866f374e25f4668d12efc783235d19d1
commit 65060a78866f374e25f4668d12efc783235d19d1
Author: Maciej W. Rozycki <address@hidden>
Date: Wed Jan 18 18:18:21 2017 +0000
PR gas/20649: MIPS: Fix GOT16/LO16 reloc pairing with comdat sections
Correct a regression from commit 8614eeee67f9 ("Traditional MIPS
patches"), <https://sourceware.org/ml/binutils/2000-07/msg00018.html>,
which caused symbols in linkonce or what is these days known as comdat
sections to be treated as external for the purpose of PIC relocation
generation even if their binding remains STB_LOCAL. This in turn
disabled GOT16/LO16 relocation pairing with references to such symbols,
as no complementing LO16 relocation is expected for external GOT16
references in the o32 ABI, which ultimately leads to link errors, e.g.:
ld: comdat-reloc.o: Can't find matching LO16 reloc against `foo' for
R_MIPS_GOT16 at 0x24 in section `.text.bar[bar]'
as with the LD test case included with this change.
Revert the special case for symbols in comdat sections then, making code
actually match `adjust_reloc_syms' as indicated in its explanatory
comment, and adjust calling code accordingly. Also bring back the
corresponding description of what now is `s_is_linkonce', lost with
commit 5f0fe04bc550 ("Improved MIPS16/MIPS32 code intermixing for
gas."), <https://www.sourceware.org/ml/binutils/2006-07/msg00039.html>.
gas/
PR gas/20649
* config/tc-mips.c (pic_need_relax): Don't check for linkonce
symbols, remove the `segtype' parameter.
(mips_frob_file, md_estimate_size_before_relax): Adjust
accordingly.
(s_is_linkonce): Add an explanatory comment.
* testsuite/gas/mips/comdat-reloc.d: New test.
* testsuite/gas/mips/comdat-reloc.s: New test source.
* testsuite/gas/mips/mips.exp: Run the new test.
ld/
PR gas/20649
* testsuite/ld-mips-elf/mips-elf.exp: Add PIC comdat GOT16/LO16
relocation pairing link test.
(cherry picked from commit 9e009953a54bfbf79d83f37797f846c923aeea43)
--
You are receiving this mail because:
You are on the CC list for the bug.