2016-07-29 02:16:24 +08:00
|
|
|
// REQUIRES: x86
|
|
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
|
2017-10-06 17:37:44 +08:00
|
|
|
// RUN: ld.lld --hash-style=sysv %t.o %S/Inputs/segment-start.script -shared -o %t.so
|
2016-07-29 02:16:24 +08:00
|
|
|
// RUN: llvm-readobj --dyn-symbols %t.so | FileCheck %s
|
|
|
|
|
|
|
|
// CHECK: Name: foobar1
|
|
|
|
// CHECK-NEXT: Value: 0x8001
|
|
|
|
|
|
|
|
// CHECK: Name: foobar2
|
|
|
|
// CHECK-NEXT: Value: 0x8002
|
|
|
|
|
|
|
|
// CHECK: Name: foobar3
|
|
|
|
// CHECK-NEXT: Value: 0x8003
|
|
|
|
|
2016-09-18 02:14:56 +08:00
|
|
|
// CHECK: Name: foobar4
|
2016-07-29 02:16:24 +08:00
|
|
|
// CHECK-NEXT: Value: 0x8004
|
|
|
|
|
|
|
|
.data
|
|
|
|
.quad foobar1
|
|
|
|
.quad foobar2
|
|
|
|
.quad foobar3
|
|
|
|
.quad foobar4
|
2016-09-15 21:36:44 +08:00
|
|
|
|
|
|
|
// RUN: echo "SECTIONS { . = SEGMENT_START(\"foobar\", foo); }" > %t.script
|
2018-07-03 01:48:23 +08:00
|
|
|
// RUN: not ld.lld %t.o %t.script -shared -o /dev/null 2>&1 \
|
2016-09-15 21:36:44 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=ERR %s
|
2016-12-22 21:13:12 +08:00
|
|
|
// ERR: {{.*}}.script:1: symbol not found: foo
|