diff options
| -rw-r--r-- | lld/ELF/LinkerScript.cpp | 2 | ||||
| -rw-r--r-- | lld/test/ELF/linkerscript/memory5.test | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index c66345568cb..8519f01181f 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -135,8 +135,6 @@ void LinkerScript::setDot(Expr E, const Twine &Loc, bool InSec) { // Update to location counter means update to section size. if (InSec) expandOutputSection(Val - Dot); - else if (Val > Dot) - expandMemoryRegions(Val - Dot); Dot = Val; } diff --git a/lld/test/ELF/linkerscript/memory5.test b/lld/test/ELF/linkerscript/memory5.test index 150ddf0e833..fa921a72a06 100644 --- a/lld/test/ELF/linkerscript/memory5.test +++ b/lld/test/ELF/linkerscript/memory5.test @@ -5,9 +5,9 @@ # RUN: llvm-objdump -section-headers %t.so | FileCheck %s # CHECK: 1 .text 00000001 0000000000042000 -# CHECK-NEXT: 2 .data 00000001 0000000000044001 +# CHECK-NEXT: 2 .data 00000001 0000000000042001 -## Test that assign to Dot changes the position in a memory region. +## Test that assigning to Dot does not change the position in a memory region. MEMORY { ram (wxa) : ORIGIN = 0x42000, LENGTH = 0x100000 |

