[LLVMdev] [PROPOSAL] ELF safe/unsafe sections

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Jul 26 06:10:51 PDT 2013

On 26 July 2013 08:39, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:
> On 25 July 2013 17:24, Rui Ueyama <ruiu at google.com> wrote:
>> Then how about enable these flags for -O2? I want to hear from other people
>> cc'ed, and I may be too cautious, but I'd hesitate to define a new ELF
>> section if there's other mean already available to achieve the same thing.

Some numbers with -ffunction-section and -fdata-section when building clang:


clang is 50 152 128 bytes
clang link time is: 0m0.623s
.o files are 109 061 386 bytes


clang is 49 824 592 bytes
clang link time is: 0m1.369s
.o files are 137 607 146 bytes

So there is a noticeable overhead in .o size and link time. Maybe we
should start by enabling these options at -O3?


More information about the llvm-dev mailing list