From caf03a41f3b876ef1ddce78c15a77dcb9ecdc125 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 1 Aug 2019 12:34:43 +0000 Subject: [PATCH] [lit] Use ld.lld -z separate-code to work around a debug_line parsing bug The issue was exposed by D64903/r367537. http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/7321/ In these tests, .debug_str immediately follows .text. The last section of last RX PT_LOAD was originally padded with trap instructions and .debug_str started at a new page (actually common-page-size). Now, .debug_str immediately follows .test. Add -z separate-code to use the old layout. llvm-svn: 367549 --- lldb/lit/SymbolFile/DWARF/debug-line-basic.s | 2 +- .../SymbolFile/DWARF/dir-separator-no-comp-dir-relative-name.s | 2 +- lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir.s | 2 +- lldb/lit/SymbolFile/DWARF/dir-separator-posix.s | 2 +- lldb/lit/SymbolFile/DWARF/dir-separator-windows.s | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lldb/lit/SymbolFile/DWARF/debug-line-basic.s b/lldb/lit/SymbolFile/DWARF/debug-line-basic.s index fc66f6a01b1e..569ced8ae7b7 100644 --- a/lldb/lit/SymbolFile/DWARF/debug-line-basic.s +++ b/lldb/lit/SymbolFile/DWARF/debug-line-basic.s @@ -1,7 +1,7 @@ # REQUIRES: lld, x86 # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o -# RUN: ld.lld %t.o -o %t +# RUN: ld.lld -z separate-code %t.o -o %t # RUN: %lldb %t -o "image dump line-table -v a.c" -o exit | FileCheck %s diff --git a/lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir-relative-name.s b/lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir-relative-name.s index 2a798f179629..22ce240aa30c 100644 --- a/lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir-relative-name.s +++ b/lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir-relative-name.s @@ -5,7 +5,7 @@ # REQUIRES: lld, x86 # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o -# RUN: ld.lld %t.o -o %t +# RUN: ld.lld -z separate-code %t.o -o %t # RUN: %lldb %t -s %S/Inputs/dir-separator-no-comp-dir-relative-name.lldbinit -o exit | FileCheck %s # CHECK-LABEL: image dump line-table a.c diff --git a/lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir.s b/lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir.s index a1d0ea5e71ba..da2c609e6352 100644 --- a/lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir.s +++ b/lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir.s @@ -4,7 +4,7 @@ # REQUIRES: lld, x86 # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o -# RUN: ld.lld %t.o -o %t +# RUN: ld.lld -z separate-code %t.o -o %t # RUN: %lldb %t -s %S/Inputs/dir-separator-windows.lldbinit -o exit | FileCheck %s # CHECK-LABEL: image dump line-table a.c diff --git a/lldb/lit/SymbolFile/DWARF/dir-separator-posix.s b/lldb/lit/SymbolFile/DWARF/dir-separator-posix.s index 14d110016e66..60390fcefe7d 100644 --- a/lldb/lit/SymbolFile/DWARF/dir-separator-posix.s +++ b/lldb/lit/SymbolFile/DWARF/dir-separator-posix.s @@ -4,7 +4,7 @@ # REQUIRES: lld, x86 # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o -# RUN: ld.lld %t.o -o %t +# RUN: ld.lld -z separate-code %t.o -o %t # RUN: %lldb %t -s %S/Inputs/dir-separator-posix.lldbinit -o exit | FileCheck %s # CHECK-LABEL: image dump line-table a.c diff --git a/lldb/lit/SymbolFile/DWARF/dir-separator-windows.s b/lldb/lit/SymbolFile/DWARF/dir-separator-windows.s index 1ba03cc6ab5f..9cc1c0357658 100644 --- a/lldb/lit/SymbolFile/DWARF/dir-separator-windows.s +++ b/lldb/lit/SymbolFile/DWARF/dir-separator-windows.s @@ -4,7 +4,7 @@ # REQUIRES: lld, x86 # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o -# RUN: ld.lld %t.o -o %t +# RUN: ld.lld -z separate-code %t.o -o %t # RUN: %lldb %t -s %S/Inputs/dir-separator-windows.lldbinit -o exit | FileCheck %s # CHECK-LABEL: image dump line-table a.c