[PATCH] D28984: [LLD] Do not allocate space for common symbols with -r
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 21 15:40:12 PST 2017
ruiu added a comment.
Can you add a test?
================
Comment at: lld/ELF/Config.h:102
bool ColorDiagnostics = false;
+ bool DefineCommon = false;
bool Demangle = true;
----------------
Since you always set a value to this variable, please remove `= false`.
================
Comment at: lld/ELF/Symbols.cpp:77
+ if (Config->Relocatable && !Config->DefineCommon)
+ return cast<DefinedCommon>(Body).Alignment;
return In<ELFT>::Common->OutSec->Addr + In<ELFT>::Common->OutSecOff +
----------------
Returning an alignment as an address seems odd. What are you trying to do here?
https://reviews.llvm.org/D28984
More information about the llvm-commits
mailing list