[lld] r281496 - Add a test showing we handle .tbss sections in linker scripts.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 14 09:40:33 PDT 2016
Author: rafael
Date: Wed Sep 14 11:40:33 2016
New Revision: 281496
URL: http://llvm.org/viewvc/llvm-project?rev=281496&view=rev
Log:
Add a test showing we handle .tbss sections in linker scripts.
Added:
lld/trunk/test/ELF/linkerscript/tbss.s
Added: lld/trunk/test/ELF/linkerscript/tbss.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/linkerscript/tbss.s?rev=281496&view=auto
==============================================================================
--- lld/trunk/test/ELF/linkerscript/tbss.s (added)
+++ lld/trunk/test/ELF/linkerscript/tbss.s Wed Sep 14 11:40:33 2016
@@ -0,0 +1,37 @@
+# REQUIRES: x86
+# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
+# RUN: echo "SECTIONS { foo : { *(foo) } bar : { *(bar) } }" > %t.script
+# RUN: ld.lld -T %t.script %t.o -o %t
+# RUN: llvm-readobj -s %t | FileCheck %s
+
+# test that a tbss section doesn't use address space.
+
+# CHECK: Name: foo
+# CHECK-NEXT: Type: SHT_NOBITS
+# CHECK-NEXT: Flags [
+# CHECK-NEXT: SHF_ALLOC
+# CHECK-NEXT: SHF_TLS
+# CHECK-NEXT: SHF_WRITE
+# CHECK-NEXT: ]
+# CHECK-NEXT: Address: 0x190
+# CHECK-NEXT: Offset: 0x190
+# CHECK-NEXT: Size: 4
+# CHECK-NEXT: Link: 0
+# CHECK-NEXT: Info: 0
+# CHECK-NEXT: AddressAlignment: 1
+# CHECK-NEXT: EntrySize: 0
+# CHECK-NEXT: }
+# CHECK-NEXT: Section {
+# CHECK-NEXT: Index:
+# CHECK-NEXT: Name: bar
+# CHECK-NEXT: Type: SHT_PROGBITS
+# CHECK-NEXT: Flags [
+# CHECK-NEXT: SHF_ALLOC
+# CHECK-NEXT: SHF_WRITE
+# CHECK-NEXT: ]
+# CHECK-NEXT: Address: 0x190
+
+ .section foo,"awT", at nobits
+ .long 0
+ .section bar, "aw"
+ .long 0
More information about the llvm-commits
mailing list