diff options
author | Kevin Enderby <enderby@apple.com> | 2014-06-18 22:04:40 +0000 |
---|---|---|
committer | Kevin Enderby <enderby@apple.com> | 2014-06-18 22:04:40 +0000 |
commit | fb2b9fb894b6c9be8a290bdf69c29f0f5511ba3c (patch) | |
tree | 870821c76b4ffa05d6db078eaac6d52aae75bd9c /test/Object | |
parent | ce09bda96ee00a1024952faf85e3fa01e0d6bc72 (diff) | |
download | llvm-fb2b9fb894b6c9be8a290bdf69c29f0f5511ba3c.tar.gz llvm-fb2b9fb894b6c9be8a290bdf69c29f0f5511ba3c.tar.bz2 llvm-fb2b9fb894b6c9be8a290bdf69c29f0f5511ba3c.tar.xz |
Teach llvm-size to know about Mach-O universal files (aka fat files) and
fat files containing archives.
Also fix a bug in MachOUniversalBinary::ObjectForArch::ObjectForArch()
where it needed a >= when comparing the Index with the number of
objects in a fat file. As the index starts at 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211230 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Object')
-rw-r--r-- | test/Object/size-trivial-macho.test | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Object/size-trivial-macho.test b/test/Object/size-trivial-macho.test index 960fb25fbe..1ed611b0de 100644 --- a/test/Object/size-trivial-macho.test +++ b/test/Object/size-trivial-macho.test @@ -10,6 +10,10 @@ RUN: llvm-size -format darwin %p/Inputs/macho-archive-x86_64.a \ RUN: | FileCheck %s -check-prefix mAR RUN: llvm-size -format darwin -x -l %p/Inputs/hello-world.macho-x86_64 \ RUN: | FileCheck %s -check-prefix mxl +RUN: llvm-size %p/Inputs/macho-universal.x86_64.i386 \ +RUN: | FileCheck %s -check-prefix u +RUN: llvm-size %p/Inputs/macho-universal-archive.x86_64.i386 \ +RUN: | FileCheck %s -check-prefix uAR A: section size addr A: __text 12 0 @@ -65,3 +69,11 @@ mxl: Section __la_symbol_ptr: 0x8 (addr 0x100001010 offset 4112) mxl: total 0x18 mxl: Segment __LINKEDIT: 0x1000 (vmaddr 0x100002000 fileoff 8192) mxl: total 0x100003000 + +u: __TEXT __DATA __OBJC others dec hex +u: 4096 0 0 4294971392 4294975488 100002000 {{.*}}/macho-universal.x86_64.i386:x86_64 +u: 4096 0 0 8192 12288 3000 {{.*}}/macho-universal.x86_64.i386:i386 + +uAR: __TEXT __DATA __OBJC others dec hex +uAR: 136 0 0 32 168 a8 {{.*}}/macho-universal-archive.x86_64.i386:x86_64(hello.o) +uAR: 5 4 0 0 9 9 {{.*}}/macho-universal-archive.x86_64.i386:i386(foo.o) |