Skip to content
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

Regression(370635): " section '.text' cannot be removed because it is referenced by the section '.ARM.exidx'" when using llvm-objcopy --extract-partition #42586

nico opened this issue Sep 6, 2019 · 2 comments
bugzilla lld:ELF


Copy link

@nico nico commented Sep 6, 2019

Bugzilla Link 43241
Resolution FIXED
Resolved on Sep 06, 2019 09:00
Version unspecified
OS Windows NT
CC @MaskRay,@pcc,@smithp35

Extended Description

Grab --reproduce output: (~600MB gzip)

This produces lib.unstripped/ which is then fed into llvm-objcopy like so: ../../../../llvm-project/out/gn/bin/llvm-objcopy --extract-partition lib.unstripped/ That errors out after r370635:

$ ../../../../llvm-project/out/gn/bin/llvm-objcopy --extract-partition lib.unstripped/
../../../../llvm-project/out/gn/bin/llvm-objcopy: error: 'lib.unstripped/': section '.text' cannot be removed because it is referenced by the section '.ARM.exidx'

(Originally at

Copy link
Contributor Author

@nico nico commented Sep 6, 2019

I reverted the offending change for now while we figure out what's going on.

$ llvm/utils/git-svn/git-llvm push
Pushing 1 monorepo commit:
acdab684384 Revert r370635, it caused #42586 .
Sending lld/trunk/ELF/Driver.cpp
Sending lld/trunk/ELF/ICF.cpp
Sending lld/trunk/ELF/LinkerScript.cpp
Sending lld/trunk/ELF/LinkerScript.h
Sending lld/trunk/ELF/Writer.cpp
Sending lld/trunk/ELF/Writer.h
Sending lld/trunk/test/ELF/linkerscript/early-assign-symbol.s
Deleting lld/trunk/test/ELF/linkerscript/icf-output-sections.s
Sending lld/trunk/test/ELF/linkerscript/subalign.s
Transmitting file data ........done
Committing transaction...
Committed revision 371202.
Committed acdab684384 to svn.

Copy link

@MaskRay MaskRay commented Sep 6, 2019

Fixed by r371216

partitions + --icf=all + .ARM.exidx (sh_link pointing to .text)
This is an under-tested area...

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
bugzilla lld:ELF
None yet

No branches or pull requests

2 participants