[PATCH] D69188: [llvm-objcopy] Preserve .ARM.attributes section when stripping files

Tobias Hieta via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 21 05:21:03 PDT 2019


thieta added a comment.

Hello!

Thanks everyone for the feedback. I was meeting up with our QA team this week and they said that they seen the issue with these binaries on a much larger array of devices than I initially thought. This is not a bug in upstream GLIBC - this is a bug in debian/ubuntu versions that patch glibc to specifically check for SHT_ARM_ATTRIBUTES. We tested with all debian based NAS devices we had and saw the same issue. We even tested with raspbian on raspberry pi and this also contains the issue.

Navigating patches in upstream ubuntu/debian is pretty hard - but as far as I can gatherr this patch is still shipping with modern debian based distributions: https://git.launchpad.net/ubuntu/+source/glibc/tree/debian/patches/arm/unsubmitted-ldso-abi-check.diff?h=debian/sid#n45

This means that the impact of this right now is that `llvm-strip` with no arguments produces binaries that can't be run on modern ubuntu and debian for arm, so I think this patch has value.

The size of `.ARM.attributes` seems to be pretty tiny - in my binary it's 112 bytes.

@rupprecht thanks for the review - happy to address your comments and change the commit message and inline comment to reflect my findings above if you guys decide to accept this approach. I think this needs to be documented if nothing else considering how confusing the error on device actually is.

Thanks,
Tobias


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69188/new/

https://reviews.llvm.org/D69188





More information about the llvm-commits mailing list