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

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

Comments

@nico
Copy link
Contributor

@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: https://drive.google.com/file/d/1m5fCTdnonSqdznHNrhmhtlnPXIVDk3q8/view?usp=sharing (~600MB gzip)

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

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

(Originally at https://crbug.com/1000647)

@nico
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.

@MaskRay
Copy link
Member

@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
Labels
bugzilla lld:ELF
Projects
None yet
Development

No branches or pull requests

2 participants