summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2014-05-19 20:36:02 +0000
committerKevin Enderby <enderby@apple.com>2014-05-19 20:36:02 +0000
commit403258f5a34607f93b69bc44ae52fb7634ae1913 (patch)
tree4adc9912d421f293b100221e56f233538d52aedb /llvm/test/Object
parent7f26fa67154187401a70efc06e140e7f090e5c3b (diff)
downloadbcm5719-llvm-403258f5a34607f93b69bc44ae52fb7634ae1913.tar.gz
bcm5719-llvm-403258f5a34607f93b69bc44ae52fb7634ae1913.zip
Implement MachOObjectFile::isSectionData() and MachOObjectFile::isSectionBSS
so that llvm-size will total up all the sections in the Berkeley format. This allows for rough categorizations for Mach-O sections. And allows the total of llvm-size’s Berkeley and System V formats to be the same. llvm-svn: 209158
Diffstat (limited to 'llvm/test/Object')
-rw-r--r--llvm/test/Object/Inputs/macho-text-data-bss.macho-x86_64bin0 -> 844 bytes
-rw-r--r--llvm/test/Object/size-trivial-macho.test15
2 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/Object/Inputs/macho-text-data-bss.macho-x86_64 b/llvm/test/Object/Inputs/macho-text-data-bss.macho-x86_64
new file mode 100644
index 00000000000..b7628c83799
--- /dev/null
+++ b/llvm/test/Object/Inputs/macho-text-data-bss.macho-x86_64
Binary files differ
diff --git a/llvm/test/Object/size-trivial-macho.test b/llvm/test/Object/size-trivial-macho.test
new file mode 100644
index 00000000000..6ecdf5c2a8c
--- /dev/null
+++ b/llvm/test/Object/size-trivial-macho.test
@@ -0,0 +1,15 @@
+RUN: llvm-size -A %p/Inputs/macho-text-data-bss.macho-x86_64 \
+RUN: | FileCheck %s -check-prefix A
+RUN: llvm-size -B %p/Inputs/macho-text-data-bss.macho-x86_64 \
+RUN: | FileCheck %s -check-prefix B
+
+A: section size addr
+A: __text 12 0
+A: __data 4 12
+A: __bss 4 112
+A: __compact_unwind 32 16
+A: __eh_frame 64 48
+A: Total 116
+
+B: text data bss dec hex filename
+B: 12 100 4 116 74
OpenPOWER on IntegriCloud