This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: RFC [PATCH] Use .strtab section for section name strings
- From: Alan Modra <amodra at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 29 Jun 2015 13:53:20 +0930
- Subject: Re: RFC [PATCH] Use .strtab section for section name strings
- Authentication-results: sourceware.org; auth=none
- References: <20150628000035 dot GA30222 at intel dot com>
On Sat, Jun 27, 2015 at 05:00:35PM -0700, H.J. Lu wrote:
> Here is a patch to use .strtab section for section name strings if
> there are symbols, otherwise use .shstrtab section.
I think this is a bad idea.
> I tried it on libstdc++. For src/c++11/limits.o
>
> Old: 93064 bytes
> New: 76040 bytes
>
> It reduces file size by 18%.
A carefully selected object file. ;) Long c++ mangled names,
-ffunction-sections, and a file with only a little over 1k text+data.
The great majority of object files won't see as much benefit. I
reckon shared libraries and executables will only show very small
decreases, at the cost of violating the ELF gABI.
--
Alan Modra
Australia Development Lab, IBM