Updates error message for dynamic relocation attempt for read only segments.
Details
Diff Detail
- Repository
- rLLD LLVM Linker
Event Timeline
ELF/Relocations.cpp | ||
---|---|---|
818 | I would not use line continuations here. | |
819 | 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. Maybe ... " in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output"? |
ELF/Relocations.cpp | ||
---|---|---|
818 | Yes. I think your actual error message contains a lot of spaces between "relocations." and "Recompile object files..." because of the indentation of the next line. In general line continuation should be avoided. You can just write two string literals without any operator or anything to make compiler concatenate the two strings. |
test/ELF/aarch64-fpic-add_abs_lo12_nc.s | ||
---|---|---|
4 | I think you need to update this test as well. (Your C++ code recommends -Wl,-z,notext but this error message mentions "-z notext". |
test/ELF/aarch64-fpic-add_abs_lo12_nc.s | ||
---|---|---|
4 | Done! Sorry, I missed it earlier. |
I would not use line continuations here.