[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:37:17 PDT 2016


evgeny777 added inline comments.

================
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
----------------
grimar wrote:
> evgeny777 wrote:
> > If your patch is assigning LMA for *sections* then it should be done in LinkerScript::assignAddresses, I think
> Section header has only one address field sh_addr which is VMA:
> https://docs.oracle.com/cd/E19455-01/806-3773/elf-2/index.html
> So there is not way to set LMA for section, only for load segment itself I believe.
> And that means that for section that explicitly requested LMA new load has
> to be created.
> 
> Both gold and bfd do the same.
Well, OutputSectionBase contains not only header, but PageAlign, SectionIndex and Name.
May be adding some extra field like PhysicalAddress to OutputSectionBase is not that bad?


https://reviews.llvm.org/D19272





More information about the llvm-commits mailing list