On Wed, Mar 21, 2012 at 09:32:16AM -0700, Roland McGrath wrote:
I don't see any reason to treat nonstandard section types
specially at all.
The norm is to strip non-allocated sections. We have special exceptions
for SHT_NOTE and a few named SHT_PROGBITS sections that particularly should
not be stripped. If there are any nonstandard types that should not be
stripped, then we can add special cases for those.
Unless anyone can cite a good reason not to, I'll just remove the
< SHT_NUM check entirely.
resulted to a regression on ARM because it now strips sections of type
SHT_ARM_ATTRIBUTES, like this one:
$ readelf -A /bin/sh
Attribute Section: aeabi
Tag_ABI_FP_number_model: IEEE 754
Tag_ABI_HardFP_use: SP and DP
Tag_ABI_VFP_args: VFP registers
SHT_ARM_ATTRIBUTES is defined as SHT_LOPROC + 3.
As a quick fix I've just reverted that commit locally, but
I'm not familiar with the code to propose an acceptable fix.