mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-14 23:29:51 +00:00
cf73d03a1b
Even with the sparse file optimizations the SYM64 test can still be painfully slow. This unnecessarily slows down devs. It's critical that we test that the switch to the SYM64 format occurs at 4GB but there isn't any better of a way to fake the size of the file than sparse files. This change introduces a flag that allows the cutoff to be arbitrarily set to whatever power of two is desired. The flag is hidden as it really isn't meant to be used outside this one test. This is unfortunate but appears necessary, at least until the average hard drive is much faster. The changes to the test require some explanation. Prior to this change we knew that the SYM64 format was being used because the file was simply too large to have validly handled this case if the SYM64 format were not used. To ensure that the SYM64 format is still being used I am grepping the file for "SYM64". Without changing the filename however this would be pointless because "SYM64" would occur in the file either way. So the filename of the test is also changed in order to avoid this issue. Differential Revision: https://reviews.llvm.org/D40632 llvm-svn: 319507
40 lines
1.0 KiB
Plaintext
40 lines
1.0 KiB
Plaintext
# REQUIRES: llvm-64-bits
|
|
# REQUIRES: system-linux
|
|
|
|
# RUN: yaml2obj %s > %t
|
|
# RUN: dd if=%t of=%t bs=1 count=0 seek=1M
|
|
# RUN: rm -f %t.lib
|
|
# RUN: cp %t %t2
|
|
# RUN: llvm-ar -sym64-threshold=19 cr %t.lib %t %t2 %p/Inputs/trivial-object-test.elf-x86-64
|
|
# RUN: llvm-nm --print-armap %t.lib | FileCheck %s
|
|
# RUN: grep SYM64 %t.lib
|
|
|
|
# Delete temp files. They are too large.
|
|
# RUN: rm -f %t %t2 %t.lib
|
|
|
|
!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-GNU64-write.test.tmp:
|
|
|
|
# CHECK: archive-GNU64-write.test.tmp2:
|
|
|
|
# CHECK: trivial-object-test.elf-x86-64:
|
|
# CHECK-NEXT: U SomeOtherFunction
|
|
# CHECK-NEXT: 0000000000000000 T main
|
|
# CHECK-NEXT: U puts
|