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

Tobias Hieta via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 18 12:59:16 PDT 2019


thieta added a comment.

In D69188#1715040 <https://reviews.llvm.org/D69188#1715040>, @abrachet wrote:

> Seems like a hack, no? What about using `--keep-section` when you need it? You say its not strictly needed on modern systems and the problem is with the `dlopen` implementation of these older libcs, and not `llvm-objcopy`, so I would be hesitant to add something like this especially given we have a solution with `--keep-section` <https://llvm.org/docs/CommandGuide/llvm-objcopy.html#cmdoption-llvm-objcopy-keep-section>


Keep-sections totally works. But since this produces unusable binaries on systems that require this section and lld already makes this consession I think it's worth adding this very low maintenance hack.

The most common usecase here is to replace GNU strip with llvm-strip, to pass keep-section in this case you would need a wrapper or patch build systems (painful with automake for example).

Reading the launchpad report linked from Peter's post it seems like this might actually still be a problem which would mean that even a new Ubuntu install on arm wouldn't be able to run these binaries.


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