[PATCH] [ELF] Set up initial live symbol(s) to avoid incorrect reclaim of atoms
Rui Ueyama
ruiu at google.com
Thu Feb 26 17:35:02 PST 2015
I think this is okay for now, but we should treat entry symbol name as a dead strip root unconditionally regardless of architecture or configuration. Curentlly, I believe if you call addDeadStripRoot and dead stripping is not enabled, it will fail because of an assertion error. That's a silly assertion -- that prevented us from add atoms to the root set "just in case". We should remove that assert and copy an entry symbol to the root set unconditionally.
Protip: run "svn diff --diff-cmd=diff -x -u100000" or "git show -U100000" to include an entire file to a patch, so that we can see all code on Phab.
REPOSITORY
rL LLVM
================
Comment at: lib/ReaderWriter/ELF/ELFLinkingContext.cpp:112
@@ +111,3 @@
+ if (deadStrip())
+ // Entry point is live.
+ addDeadStripRoot(entrySymbolName());
----------------
Remove this comment.
http://reviews.llvm.org/D7926
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list