[LLVMdev] [PROPOSAL] ELF safe/unsafe sections
Shankar Easwaran
shankare at codeaurora.org
Fri Jul 26 10:43:50 PDT 2013
On 7/26/2013 7:39 AM, Rafael EspĂndola 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.
> I would probably support doing that first. A small annoyance is that
> the linker requires the --gc-sections option, but most current gnu
> (bfd and gold) versions support that, so we should be fine at least on
> linux (and the driver already collects the distro we are in anyway in
> case we need to change the default for some old distro).
>
> Once that is in, the existing proposals for splitting sections into
> atoms become speed and relocatable object size optimizations.
I partly agree. Implementing safe sections would be beneficial if you
are getting third party libraries or system libraries(which are not
usually compiled with -ffunction-sections and -fdata-sections).
It would be nice to have -ffunction-sections and -fdata-sections the
default at -O2. I am not sure why it was not made the default for all
these years though.
Thanks
Shankar Easwaran
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation
More information about the llvm-dev
mailing list