[llvm-bugs] [Bug 42278] New: --strip-all-gnu creating invalid ELF files for files with more than SHN_LORESERVE sections
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Jun 14 00:53:46 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=42278
Bug ID: 42278
Summary: --strip-all-gnu creating invalid ELF files for files
with more than SHN_LORESERVE sections
Product: tools
Version: trunk
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: enhancement
Priority: P
Component: llvm-objcopy/strip
Assignee: unassignedbugs at nondot.org
Reporter: alexbrachetmialot at gmail.com
CC: alexander.v.shaposhnikov at gmail.com,
jake.h.ehrlich at gmail.com,
jh7370.2008 at my.bristol.ac.uk,
llvm-bugs at lists.llvm.org, rupprecht at google.com
I was playing with many-sections.o in test/tools/llvm-objcopy/ELF/Inputs and
when using --strip-all-gnu the output file is incorrect.
$ llvm-objcopy --strip-all many-sections.o many-sections.llvm.o
$ llvm-readelf many-sections.llvm.o -S
<works>
$ llvm-objcopy --strip-all-gnu many-sections.o many-sections.gnu.o
$ llvm-readelf many-sections.gnu.o -S
error: 'many-sections.gnu.o': invalid sh_type
--strip-all-gnu works (by which I mean creates a file readable by llvm-readelf)
on other object files. The name of the test object is presumably the giveaway
here. I'm guessing it has something to do with having more sections than fit in
e_shnum? Seems strange to me, but I haven't looked too deeply into this yet.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190614/107cf419/attachment.html>
More information about the llvm-bugs
mailing list