[PATCH] D22683: [ELF] Symbol assignment within input section list
    Eugene Leviant via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Jul 29 10:15:34 PDT 2016
    
    
  
evgeny777 added inline comments.
================
Comment at: ELF/LinkerScript.cpp:85
@@ +84,3 @@
+    // OutSecOff is added to value in getSymVA().
+    Regular->Value = Cmd->Expression(this->OutSecOff) - this->OutSecOff;
+}
----------------
rafael wrote:
> This is a bit odd.
> 
> The way normal DefinedRegular symbols are handled is to have a Value that is the offset in the input section. In this case, since the input section is a dummy empty section that should always be 0.
> 
> It is the offset of the input section in the output section that we should be computing.
> 
What about this expression? Will this work, if you always set Value to 0?
```
a = ALIGN(8);
```
Repository:
  rL LLVM
https://reviews.llvm.org/D22683
    
    
More information about the llvm-commits
mailing list