[PATCH] D19272: [ELF] - linkerscript AT keyword (in output section description) implemented.

Eugene Leviant via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 22 04:20:53 PDT 2016


evgeny777 added inline comments.

================
Comment at: ELF/LinkerScript.cpp:849
@@ -822,1 +848,3 @@
 
+std::vector<StringRef> ScriptParser::readAt() {
+  std::vector<StringRef> Expr;
----------------
Can you reuse readSectionsCommandExpr() ?

================
Comment at: ELF/Writer.cpp:1163
@@ +1162,3 @@
+        Script<ELFT>::X->hasLma(First->getName()))
+      H.p_paddr = Script<ELFT>::X->getLma(First->getName(), H.p_vaddr);
+    else
----------------
If your patch is assigning LMA for *sections* then it should be done in LinkerScript::assignAddresses, I think

================
Comment at: test/ELF/linkerscript-at.s:66
@@ +65,3 @@
+# CHECK-NEXT:     VirtualAddress: 0x1010
+# CHECK-NEXT:     PhysicalAddress: 0x3000
+# CHECK-NEXT:     FileSize: 8
----------------
I have feeling that section alignment is not done for LMA


https://reviews.llvm.org/D19272





More information about the llvm-commits mailing list