2014-04-30 16:25:02 +00:00
|
|
|
// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | llvm-readobj -symbols | FileCheck %s
|
|
|
|
|
|
|
|
.text
|
|
|
|
.globl foobar
|
|
|
|
.align 16, 0x90
|
|
|
|
.type foobar,@function
|
|
|
|
foobar:
|
|
|
|
pushl %ebp
|
|
|
|
movl %esp, %ebp
|
|
|
|
subl $8, %esp
|
|
|
|
calll foo
|
|
|
|
calll bar
|
|
|
|
addl $8, %esp
|
|
|
|
popl %ebp
|
|
|
|
retl
|
|
|
|
.Ltmp3:
|
|
|
|
.size foobar, .Ltmp3-foobar
|
|
|
|
|
Produce a single string table in a ELF .o
Normally an ELF .o has two string tables, one for symbols, one for section
names.
With the scheme of naming sections like ".text.foo" where foo is a symbol,
there is a big potential saving in using a single one.
Building llvm+clang+lld with master and with this patch the results were:
master: 193,267,008 bytes
patch: 186,107,952 bytes
master non unique section names: 183,260,192 bytes
patch non unique section names: 183,118,632 bytes
So using non usique saves 10,006,816 bytes, and the patch saves 7,159,056 while
still using distinct names for the sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238073 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-22 23:58:30 +00:00
|
|
|
// CHECK: Name: bar (19)
|
|
|
|
// CHECK: Name: foo (23)
|
2015-05-28 21:59:34 +00:00
|
|
|
// CHECK: Name: foobar (16)
|