[lld] r316376 - Document a change of behavior in r315552.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 23 14:00:15 PDT 2017


Author: rafael
Date: Mon Oct 23 14:00:15 2017
New Revision: 316376

URL: http://llvm.org/viewvc/llvm-project?rev=316376&view=rev
Log:
Document a change of behavior in r315552.

We used to reject this, but we now accept. The output seems
reasonable, so this is probably an OK extension over bfd/gold.

Added:
    lld/trunk/test/ELF/got32-i386-pie-rw.s

Added: lld/trunk/test/ELF/got32-i386-pie-rw.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/got32-i386-pie-rw.s?rev=316376&view=auto
==============================================================================
--- lld/trunk/test/ELF/got32-i386-pie-rw.s (added)
+++ lld/trunk/test/ELF/got32-i386-pie-rw.s Mon Oct 23 14:00:15 2017
@@ -0,0 +1,17 @@
+# REQUIRES: x86
+# RUN: llvm-mc -filetype=obj -triple=i686-pc-linux %s -o %t.o
+# RUN: ld.lld %t.o -o %t -pie
+# RUN: llvm-readelf -r -s %t | FileCheck %s
+
+# Unlike bfd and gold we accept this.
+
+# CHECK: .foobar           PROGBITS        00001000
+# CHECK: .got              PROGBITS        [[GOT:[0-9a-z]*]]
+# CHECK: [[GOT]]   00000008 R_386_RELATIVE
+# CHECK: 00001002  00000008 R_386_RELATIVE
+foo:
+
+.section .foobar, "awx"
+.global _start
+_start:
+ movl foo at GOT, %ebx




More information about the llvm-commits mailing list