[PATCH] D24298: [ELF] Linkerscript: Implement LOADADDR

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 8 01:10:08 PDT 2016


grimar added inline comments.

================
Comment at: ELF/Writer.cpp:993
@@ -992,2 +992,3 @@
     uintX_t NewFlags = Sec->getPhdrFlags();
-    if (Script<ELFT>::X->getLma(Sec->getName()) || Flags != NewFlags) {
+    bHasLma = bHasLma || Script<ELFT>::X->hasLma(Sec->getName());
+    if (bHasLma || Flags != NewFlags) {
----------------
ruiu wrote:
> Why do we have to create a new segment if there's a section with a LMA?
You can write this as:

```
bHasLma |= Script<ELFT>::X->hasLma(Sec->getName())
```


Repository:
  rL LLVM

https://reviews.llvm.org/D24298





More information about the llvm-commits mailing list