2016-04-27 03:04:35 +08:00
|
|
|
# REQUIRES: x86
|
2016-04-26 08:22:24 +08:00
|
|
|
|
2016-05-04 01:30:44 +08:00
|
|
|
# Extracting the cpio archive can get over the path limit on windows.
|
2016-05-03 09:25:28 +08:00
|
|
|
# REQUIRES: shell
|
2016-05-03 08:36:15 +08:00
|
|
|
|
2016-04-27 04:36:46 +08:00
|
|
|
# RUN: rm -rf %t.dir
|
|
|
|
# RUN: mkdir -p %t.dir/build1
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.dir/build1/foo.o
|
|
|
|
# RUN: cd %t.dir
|
2016-05-02 21:00:42 +08:00
|
|
|
# RUN: ld.lld --hash-style=gnu build1/foo.o -o bar -shared --as-needed --reproduce repro
|
2016-05-04 01:30:44 +08:00
|
|
|
# RUN: cpio -id < repro.cpio
|
2016-05-01 05:40:04 +08:00
|
|
|
# RUN: diff build1/foo.o repro/%:t.dir/build1/foo.o
|
2016-04-27 04:36:46 +08:00
|
|
|
|
2016-05-01 05:40:04 +08:00
|
|
|
# RUN: FileCheck %s --check-prefix=RSP < repro/response.txt
|
2016-05-02 21:00:42 +08:00
|
|
|
# RSP: {{^}}--hash-style gnu{{$}}
|
2016-05-03 02:16:14 +08:00
|
|
|
# RSP-NOT: repro{{[/\\]}}
|
|
|
|
# RSP-NEXT: {{[/\\]}}foo.o
|
2016-05-01 05:40:04 +08:00
|
|
|
# RSP-NEXT: -o bar
|
|
|
|
# RSP-NEXT: -shared
|
|
|
|
# RSP-NEXT: --as-needed
|
2016-04-27 04:36:46 +08:00
|
|
|
|
2016-06-06 23:34:37 +08:00
|
|
|
# RUN: FileCheck %s --check-prefix=VERSION < repro/version.txt
|
|
|
|
# VERSION: LLD
|
|
|
|
|
2016-04-27 04:36:46 +08:00
|
|
|
# RUN: mkdir -p %t.dir/build2/a/b/c
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.dir/build2/foo.o
|
|
|
|
# RUN: cd %t.dir/build2/a/b/c
|
2016-06-25 02:02:50 +08:00
|
|
|
# RUN: env LLD_REPRODUCE=repro ld.lld ./../../../foo.o -o bar -shared --as-needed
|
2016-05-04 01:30:44 +08:00
|
|
|
# RUN: cpio -id < repro.cpio
|
2016-05-01 05:40:04 +08:00
|
|
|
# RUN: diff %t.dir/build2/foo.o repro/%:t.dir/build2/foo.o
|
|
|
|
|
2016-05-03 22:29:42 +08:00
|
|
|
# RUN: echo "{ local: *; };" > ver
|
|
|
|
# RUN: echo > dyn
|
|
|
|
# RUN: echo > file
|
2016-06-01 14:17:27 +08:00
|
|
|
# RUN: echo > file2
|
2016-05-03 22:29:42 +08:00
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o 'foo bar'
|
2016-06-01 14:17:27 +08:00
|
|
|
# RUN: ld.lld --reproduce repro2 'foo bar' -L"foo bar" -Lfile -Tfile2 \
|
2016-05-03 22:29:42 +08:00
|
|
|
# RUN: --dynamic-list dyn -rpath file --script file --version-script ver \
|
2016-05-05 07:12:55 +08:00
|
|
|
# RUN: --dynamic-linker "some unusual/path" -soname 'foo bar' -soname='foo bar'
|
2016-05-04 01:30:44 +08:00
|
|
|
# RUN: cpio -id < repro2.cpio
|
2016-05-01 05:40:04 +08:00
|
|
|
# RUN: FileCheck %s --check-prefix=RSP2 < repro2/response.txt
|
2016-05-03 22:29:42 +08:00
|
|
|
# RSP2: "{{.*}}foo bar"
|
|
|
|
# RSP2-NEXT: -L "{{.*}}foo bar"
|
2016-05-01 06:46:47 +08:00
|
|
|
# RSP2-NEXT: -L {{.+}}file
|
2016-06-01 14:17:27 +08:00
|
|
|
# RSP2-NEXT: --script {{.+}}file2
|
2016-05-03 22:29:42 +08:00
|
|
|
# RSP2-NEXT: --dynamic-list {{.+}}dyn
|
2016-05-03 02:12:09 +08:00
|
|
|
# RSP2-NEXT: -rpath {{.+}}file
|
|
|
|
# RSP2-NEXT: --script {{.+}}file
|
2016-06-05 21:19:39 +08:00
|
|
|
# RSP2-NEXT: --version-script [[PATH:.*]]ver
|
2016-05-03 01:34:17 +08:00
|
|
|
# RSP2-NEXT: --dynamic-linker "some unusual/path"
|
2016-05-05 07:12:55 +08:00
|
|
|
# RSP2-NEXT: -soname="foo bar"
|
|
|
|
# RSP2-NEXT: -soname="foo bar"
|
2016-04-27 04:36:46 +08:00
|
|
|
|
2016-06-05 21:19:39 +08:00
|
|
|
# RUN: cpio -t < repro2.cpio | FileCheck %s
|
|
|
|
# CHECK: repro2/response.txt
|
2016-06-06 23:34:37 +08:00
|
|
|
# CHECK-NEXT: repro2/version.txt
|
2016-06-05 21:19:39 +08:00
|
|
|
# CHECK-NEXT: repro2/{{.*}}/dyn
|
|
|
|
# CHECK-NEXT: repro2/{{.*}}/ver
|
|
|
|
# CHECK-NEXT: repro2/{{.*}}/foo bar
|
|
|
|
# CHECK-NEXT: repro2/{{.*}}/file2
|
|
|
|
# CHECK-NEXT: repro2/{{.*}}/file
|
|
|
|
|
2016-04-27 03:04:35 +08:00
|
|
|
.globl _start
|
2016-04-26 08:22:24 +08:00
|
|
|
_start:
|
|
|
|
mov $60, %rax
|
|
|
|
mov $42, %rdi
|
|
|
|
syscall
|