[PATCH] D19272: [ELF] - linkerscript AT keyword (in output section description) implemented.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 16 14:04:57 PDT 2016
ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: ELF/Writer.cpp:1137-1138
@@ +1136,4 @@
+ if (H.p_type == PT_LOAD && First) {
+ Expr LmaExpr = Script<ELFT>::X->getLma(First->getName());
+ if (LmaExpr)
+ H.p_paddr = LmaExpr(H.p_vaddr);
----------------
if (Expr LmaExpr = Script<ELFT>::X->getLma(First->getName())
================
Comment at: ELF/Writer.cpp:1139
@@ +1138,3 @@
+ if (LmaExpr)
+ H.p_paddr = LmaExpr(H.p_vaddr);
+ }
----------------
I have a concern that the stuff for the linker script is leaking here. `Expr` is for the linker script, and I wanted to keep Writer being agnostic about it. From that point of view, this is not very clean. However, being said that, I have no good alternative suggestion, so I'm OK with this.
https://reviews.llvm.org/D19272
More information about the llvm-commits
mailing list