[PATCH] D18499: [ELF] - Implemented prototype of location counter support.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 14 12:26:52 PDT 2016
ruiu added a comment.
Please update the commit message. This is not a prototype even though its feature is limited. This is a patch that will be committed as part of the linker.
================
Comment at: ELF/LinkerScript.cpp:40
@@ +39,3 @@
+ if (S.getAsInteger(0, V)) {
+ error("malformed number: " + V);
+ return 0;
----------------
You probably have to do this
error("malformed number: " + Twine(V))
================
Comment at: ELF/LinkerScript.cpp:115
@@ +114,3 @@
+
+ uintX_t ThreadBssOffset = 0;
+ uintX_t VA =
----------------
Call fixupLocations here instead of exporting it and call it from the Writer.
================
Comment at: ELF/LinkerScript.cpp:129-130
@@ +128,4 @@
+ });
+ if (I == S.end())
+ continue;
+
----------------
This shouldn't happen now, no?
================
Comment at: ELF/LinkerScript.cpp:485-492
@@ +484,9 @@
+
+template void
+LinkerScript::fixupLocations(std::vector<OutputSectionBase<ELF32LE> *> &);
+template void
+LinkerScript::fixupLocations(std::vector<OutputSectionBase<ELF32BE> *> &);
+template void
+LinkerScript::fixupLocations(std::vector<OutputSectionBase<ELF64LE> *> &);
+template void
+LinkerScript::fixupLocations(std::vector<OutputSectionBase<ELF64BE> *> &);
----------------
Remove.
================
Comment at: ELF/LinkerScript.h:68-69
@@ -55,1 +67,4 @@
template <class ELFT> bool shouldKeep(InputSectionBase<ELFT> *S);
+ template <class ELFT>
+ void fixupLocations(std::vector<OutputSectionBase<ELFT> *> &);
+ template <class ELFT>
----------------
Make it private.
http://reviews.llvm.org/D18499
More information about the llvm-commits
mailing list