summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJake Ehrlich <jakehehrlich@google.com>2017-11-03 19:15:06 +0000
committerJake Ehrlich <jakehehrlich@google.com>2017-11-03 19:15:06 +0000
commit06dbf5ad00617e8f526e9ed55343fc88fafef6a8 (patch)
tree75b1ed2cf16c8e22393dbedb8a28e3fd4a68e8f5 /test
parent1b91c5e8aad019b3b3649db6c496b74739b4e5d2 (diff)
Reland "Add support for writing 64-bit symbol tables for archives when offsets become too large for 32-bit"
Tests were failing because some bots were running out of address space and memory. Additionally the test was very slow. These issues were solved by changing the test to take advantage of sparse filse and restricting the test to run only on 64-bit systems. This should fix https://bugs.llvm.org//show_bug.cgi?id=34189 This change makes it so that if writing a K_GNU style archive, you need to output a > 32-bit offset it should output in K_GNU64 style instead. Differential Revision: https://reviews.llvm.org/D36812 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317352 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Object/archive-SYM64-write.test35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/Object/archive-SYM64-write.test b/test/Object/archive-SYM64-write.test
new file mode 100644
index 00000000000..d03b54c58b3
--- /dev/null
+++ b/test/Object/archive-SYM64-write.test
@@ -0,0 +1,35 @@
+# REQUIRES: llvm-64-bits
+# REQUIRES: system-linux
+
+# RUN: yaml2obj %s > %t
+# RUN: dd if=%t of=%t bs=1 count=0 seek=2200M
+# RUN: rm -f %t.lib
+# RUN: cp %t %t2
+# RUN: llvm-ar cr %t.lib %t %t2 %p/Inputs/trivial-object-test.elf-x86-64
+# RUN: llvm-nm --print-armap %t.lib | FileCheck %s
+
+!ELF
+FileHeader:
+ Class: ELFCLASS64
+ Data: ELFDATA2LSB
+ Type: ET_EXEC
+ Machine: EM_X86_64
+Sections:
+ - Name: .data
+ Type: SHT_PROGBITS
+ Flags: [ SHF_ALLOC ]
+ AddressAlign: 0x0000000000000001
+ Content: "00"
+ Size: 32
+
+# CHECK: Archive map
+# CHECK-NEXT: main in trivial-object-test.elf-x86-64
+
+# CHECK: archive-SYM64-write.test.tmp:
+
+# CHECK: archive-SYM64-write.test.tmp2:
+
+# CHECK: trivial-object-test.elf-x86-64:
+# CHECK-NEXT: U SomeOtherFunction
+# CHECK-NEXT: 0000000000000000 T main
+# CHECK-NEXT: U puts