Skip to content

Commit

Permalink
[lldb] [lit/SymbolFile] Avoid -nostdlib in target-symbols-add-unwind.…
Browse files Browse the repository at this point in the history
…test

Do not use -nostdlib in target-symbols-add-unwind.test.  NetBSD uses
startup files to provide obligatory ELF notes in executables,
and therefore using -nostdlib requires providing specially tailored
input.  Otherwise, kernel rejects the result as invalid executable.

The replacement was suggested by Pavel Labath.

Differential Revision: https://reviews.llvm.org/D60648

llvm-svn: 358329
  • Loading branch information
mgorny committed Apr 13, 2019
1 parent 87dd0e0 commit fb70bc6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lldb/lit/SymbolFile/Inputs/target-symbols-add-unwind.c
@@ -1 +1 @@
void _start() {}
int main() {}
10 changes: 5 additions & 5 deletions lldb/lit/SymbolFile/target-symbols-add-unwind.test
Expand Up @@ -4,23 +4,23 @@
# UNSUPPORTED: system-windows, system-darwin

# RUN: cd %T
# RUN: %clang %S/Inputs/target-symbols-add-unwind.c -nostdlib -g \
# RUN: %clang %S/Inputs/target-symbols-add-unwind.c -g \
# RUN: -fno-unwind-tables -o target-symbols-add-unwind.debug
# RUN: llvm-objcopy --strip-debug target-symbols-add-unwind.debug \
# RUN: target-symbols-add-unwind.stripped
# RUN: %lldb target-symbols-add-unwind.stripped -s %s -o quit | FileCheck %s

process launch --stop-at-entry
image show-unwind -n _start
# CHECK-LABEL: image show-unwind -n _start
image show-unwind -n main
# CHECK-LABEL: image show-unwind -n main
# CHECK-NOT: debug_frame UnwindPlan:

target symbols add -s target-symbols-add-unwind.stripped target-symbols-add-unwind.debug
# CHECK-LABEL: target symbols add
# CHECK: symbol file {{.*}} has been added to {{.*}}

image show-unwind -n _start
# CHECK-LABEL: image show-unwind -n _start
image show-unwind -n main
# CHECK-LABEL: image show-unwind -n main
# CHECK: debug_frame UnwindPlan:
# CHECK-NEXT: This UnwindPlan originally sourced from DWARF CFI
# CHECK-NEXT: This UnwindPlan is sourced from the compiler: yes.

0 comments on commit fb70bc6

Please sign in to comment.