[lld] r291501 - [ELF] Fix `_gp` linker script test
Meador Inge via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 9 15:16:02 PST 2017
Author: meadori
Date: Mon Jan 9 17:16:01 2017
New Revision: 291501
URL: http://llvm.org/viewvc/llvm-project?rev=291501&view=rev
Log:
[ELF] Fix `_gp` linker script test
Rafael suggested in review to wrap the `.` in an
`ABSOLUTE` op to force the section to be in the
*ABS* "section":
* http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20170109/417865.html
Modified:
lld/trunk/test/ELF/mips-gp-ext.s
Modified: lld/trunk/test/ELF/mips-gp-ext.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-gp-ext.s?rev=291501&r1=291500&r2=291501&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-gp-ext.s (original)
+++ lld/trunk/test/ELF/mips-gp-ext.s Mon Jan 9 17:16:01 2017
@@ -1,17 +1,11 @@
# Check that the linker use a value of _gp symbol defined
# in a linker script to calculate GOT relocations.
-# FIXME: This test is xfailed because there is currently a bug
-# that causes symbols defined by linker scripts to be put in the
-# wrong sections. In particular, `_gp = . + 0x100` ends up in
-# `.text` when it should be in `*ABS*`.
-# XFAIL: *
-
# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o
# RUN: echo "SECTIONS { \
# RUN: .text : { *(.text) } \
-# RUN: _gp = . + 0x100; \
+# RUN: _gp = ABSOLUTE(.) + 0x100; \
# RUN: .got : { *(.got) } }" > %t.rel.script
# RUN: ld.lld -shared -o %t.rel.so --script %t.rel.script %t.o
# RUN: llvm-objdump -s -t %t.rel.so | FileCheck --check-prefix=REL %s
More information about the llvm-commits
mailing list