[PATCH] D35724: [ELF] - Fix missing relocation when linking executable with --unresolved-symbols=ignore-all
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 26 13:20:23 PDT 2017
ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.
LGTM with this comment.
Comment at: ELF/Symbols.cpp:152-154
+ // Undefined external symbols in a non-DSO usually reported by linker and link
+ // fails, but together with --unresolved-symbols=ignore-all link succeeds and
+ // runtime linker should take care about them during execution.
Undefined symbols in non-DSOs are usually just an error, so it usually doesn't matter whether we return true or false here. However, if -unresolved-symbols=ignore-all is specified, undefined symbols in executables are automatically exported so that the runtime linker can try to resolve them. In that case, they is preemptible. So, we return true for an undefined symbol in case the option is specified.
More information about the llvm-commits