[PATCH] D41459: [lld] Fix output section offset and contents when linker script uses memory region and data commands

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 21 01:30:29 PST 2017


grimar added a comment.

You need to add reviewers when posting the patches. It is at least Rui as code owner of LLD.
Logic of patch looks correct for me. I'll add him.



================
Comment at: ELF/LinkerScript.cpp:696
       Dot += Cmd->Size;
+      if (Ctx->MemRegion){
+        Ctx->MemRegionOffset[Ctx->MemRegion] += Cmd->Size;
----------------
You do not need bracers around single line.


================
Comment at: test/ELF/linkerscript/data-commands.s:47
 
+# RUN: echo "MEMORY                  \
+# RUN:   {                           \
----------------
```
MEMORY {
```


================
Comment at: test/ELF/linkerscript/data-commands.s:51
+# RUN:   }                           \
+# RUN:  SECTIONS                     \
+# RUN:  {                            \
----------------
```
SECTIONS {
```


https://reviews.llvm.org/D41459





More information about the llvm-commits mailing list