[PATCH] D44453: Update Error Message
Alexander Richardson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 14 02:43:18 PDT 2018
arichardson added inline comments.
================
Comment at: ELF/Relocations.cpp:818
+ " in readonly segment; lld by default doesn't allow text relocations. \
+ Recompile object files with -fPIC to not create such relocations or \
+ pass '-z notext' to allow text relocations for lld" +
----------------
I would not use line continuations here.
================
Comment at: ELF/Relocations.cpp:819
+ Recompile object files with -fPIC to not create such relocations or \
+ pass '-z notext' to allow text relocations for lld" +
getLocation(Sec, Sym, Offset));
----------------
I think mentioning -z notext is very useful. It is hard to know from the current error message that the build error is due to differing default behaviours in bfd and lld.
However, this message is too long. I don't think we need to mention the default behaviour since the end of the sentence implies it. Also most users will not be invoking lld directly so maybe using `-Wl,-z,notext` in the message is better?
Maybe ... " in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output"?
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D44453
More information about the llvm-commits
mailing list