-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[llvm-strip] llvm-strip doesn't remove empty group sections #97139
Comments
Currently `llvm-strip` in `--strip-debug` mode doesn't remove such sections. This behavior can lead to incompatibilities with GNU binutils (for examples ld.bfd cannot process the object file contains empty .group section). The ELF object that contains group section with `.debug_*` sections inside can be obtained by `gcc -g3`. Fix llvm#97139
Currently `llvm-strip` in `--strip-debug` mode doesn't remove such sections. This behavior can lead to incompatibilities with GNU binutils (for examples ld.bfd cannot process the object file contains empty .group section). The ELF object that contains group section with `.debug_*` sections inside can be obtained by `gcc -g3`. Fix llvm#97139
@llvm/issue-subscribers-tools-llvm-objcopy-strip Author: Dmitriy Chestnykh (chestnykh)
`gcc -g3` produces ELF objects that contains group sections with `.debug_` sections inside.
If such ELF object will be processed with `llvm-strip --strip-debug` then the output ELF will contain
Such objects cannot be processed for example by GNU binutils (
|
Currently `llvm-strip` in `--strip-debug` mode doesn't remove such sections. This behavior can lead to incompatibilities with GNU binutils (for examples ld.bfd cannot process the object file contains empty .group section). The ELF object that contains group section with `.debug_*` sections inside can be obtained by `gcc -g3`. Fix llvm#97139
Currently `llvm-strip` in `--strip-debug` mode doesn't remove such sections. This behavior can lead to incompatibilities with GNU binutils (for examples ld.bfd cannot process the object file contains empty .group section). The ELF object that contains group section with `.debug_*` sections inside can be obtained by `gcc -g3`. Fix llvm#97139
Currently llvm-strip in --strip-debug mode doesn't remove such sections. This behavior can lead to incompatibilities with GNU binutils (for examples ld.bfd cannot process the object file contains empty .group section). The ELF object that contains group section with .debug_* sections inside can be obtained by gcc -g3. Fix llvm#97139
Currently llvm-strip in --strip-debug mode doesn't remove such sections. This behavior can lead to incompatibilities with GNU binutils (for examples ld.bfd cannot process the object file contains empty .group section). The ELF object that contains group section with .debug_* sections inside can be obtained by gcc -g3. Fix llvm#97139
Currently llvm-strip in --strip-debug mode doesn't remove such sections. This behavior can lead to incompatibilities with GNU binutils (for examples ld.bfd cannot process the object file contains empty .group section). The ELF object that contains group section with .debug_* sections inside can be obtained by gcc -g3. Fix llvm#97139
I happened to notice that GNU ld reported Alan Modra fixed the issue 2 weeks ago for binutils 2.43 :) |
Currently llvm-strip in --strip-debug mode doesn't remove such sections. This behavior can lead to incompatibilities with GNU binutils (for examples ld.bfd cannot process the object file contains empty .group section). The ELF object that contains group section with .debug_* sections inside can be obtained by gcc -g3. Fix llvm#97139
gcc -g3
produces ELF objects that contains group sections with.debug_
sections inside.If such ELF object will be processed with
llvm-strip --strip-debug
then the output ELF will containgroup section [ 1] .group [foo_grp] contains 0 sections:.
Such objects cannot be processed for example by GNU binutils (
file format not recognized
).The Full test case:
echo 'int main(){return 0;}' > test.c
gcc -g3 -c test.c -o test.o
llvm-strip --strip-debug test.o -o test.stripped.o
ld.bfd test.stripped.o -o test
test.stripped.o: file not recognized: file format not recognized
The text was updated successfully, but these errors were encountered: