[PATCH] D13345: [ELF2] Add --undefined option

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 1 08:38:13 PDT 2015


ruiu added inline comments.

================
Comment at: ELF/SymbolTable.cpp:83
@@ +82,3 @@
+  auto Sym =
+      new (Alloc) Undefined<ELFT>(Name, Undefined<ELFT>::SyntheticOptional);
+  resolve<ELFT>(Sym);
----------------
denis-protivensky wrote:
> ruiu wrote:
> > Why optional? All symbols specified with -u must be resolved, no?
> As I understand, the doc says it shouldn't make linking process degrade, I mean, it shouldn't cause link errors if some of these undefined symbols are not resolved. The only purpose of this is to trigger adding of object files from archives if they contain symbols specified.
> These symbols technically don't have any logical impact on binary, so with these left undefined there won't be any changes in runtime behavior since these undefines are not used by any code.
Yeah, that's right.

Is there any reason we can't merge canKeepUndefined with isWeak?


http://reviews.llvm.org/D13345





More information about the llvm-commits mailing list