Strip on mips

Dmitry V. Levin ldv at altlinux.org
Wed Oct 17 15:59:30 UTC 2012


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.

This change
http://git.fedorahosted.org/cgit/elfutils.git/commit/?id=8e8f0be57354d3fa094d0927930dbe1bc1ce8816
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
File Attributes
  Tag_CPU_name: "7-A"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Application
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-2
  Tag_FP_arch: VFPv3-D16
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8-byte
  Tag_ABI_enum_size: int
  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.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/elfutils-devel/attachments/20121017/35e63479/attachment.sig>


More information about the elfutils-devel mailing list