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)
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 PR43241. 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.
Fixed by r371216 partitions + --icf=all + .ARM.exidx (sh_link pointing to .text) This is an under-tested area...