diff options
| author | Jake Ehrlich <jakehehrlich@google.com> | 2017-10-27 22:26:37 +0000 |
|---|---|---|
| committer | Jake Ehrlich <jakehehrlich@google.com> | 2017-10-27 22:26:37 +0000 |
| commit | 9d5a7c3b8c772f07dd3b41541e50eb303f2e7fd0 (patch) | |
| tree | 27788758b3db64c2aba79c6b6839b2c93db8f50b /llvm/test/Object | |
| parent | 4dc04e6a701a4a033d348c5ca6edb045de5a1cf4 (diff) | |
| download | bcm5719-llvm-9d5a7c3b8c772f07dd3b41541e50eb303f2e7fd0.tar.gz bcm5719-llvm-9d5a7c3b8c772f07dd3b41541e50eb303f2e7fd0.zip | |
Add support for writing 64-bit symbol tables for archives when offsets become too large for 32-bit
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
llvm-svn: 316805
Diffstat (limited to 'llvm/test/Object')
| -rw-r--r-- | llvm/test/Object/archive-SYM64-write.test | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/llvm/test/Object/archive-SYM64-write.test b/llvm/test/Object/archive-SYM64-write.test new file mode 100644 index 00000000000..1cccc1d06ba --- /dev/null +++ b/llvm/test/Object/archive-SYM64-write.test @@ -0,0 +1,31 @@ +# RUN: yaml2obj %s > %t +# 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: 2147483648 + +# 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 |

