[PATCH] D39152: ELF: Add support for emitting dynamic relocations in the Android relocation packing format.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 26 01:37:44 PDT 2017
grimar added a comment.
Minor nits.
================
Comment at: lld/ELF/Driver.cpp:768
+ error("unknown -pack-dyn-relocs format: " + S);
+ }
+
----------------
Since you always initialize `Config->AndroidPackDynRelocs` to false, this could be:
```
StringRef S = Arg->getValue();
if (S == "android")
Config->AndroidPackDynRelocs = true;
if (S != "none")
error("unknown -pack-dyn-relocs format: " + S);
```
================
Comment at: lld/ELF/SyntheticSections.cpp:1378
+ RelocData.push_back('S');
+ RelocData.push_back('2');
+ raw_svector_ostream OS(RelocData);
----------------
Perhaps instead of clear and push_backs better would be to
```
RelocData = {'A', 'P', 'S', '2'};
```
?
https://reviews.llvm.org/D39152
More information about the llvm-commits
mailing list