Skip to content

[llvm-strip] llvm-strip doesn't remove empty group sections #97139

Closed
@chestnykh

Description

@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

group 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions