2016-09-16 05:22:11 +08:00
|
|
|
# REQUIRES: x86
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
|
|
|
|
|
2018-05-16 01:02:35 +08:00
|
|
|
# RUN: echo "SECTIONS {foo 0 : {*(foo*)} .dynsym : {*(.dynsym)} .dynstr : {*(.dynstr)} }" > %t.script
|
2017-10-06 17:37:44 +08:00
|
|
|
# RUN: ld.lld --hash-style=sysv -o %t --script %t.script %t.o -shared
|
2018-06-26 00:49:52 +08:00
|
|
|
# RUN: llvm-readelf -l %t | FileCheck %s
|
2016-09-16 05:22:11 +08:00
|
|
|
|
2018-05-16 01:02:35 +08:00
|
|
|
# RUN: echo "SECTIONS {foo : {*(foo*)} .dynsym : { *(.dynsym) } .dynstr : { *(.dynstr) } }" > %t.script
|
2017-10-06 17:37:44 +08:00
|
|
|
# RUN: ld.lld --hash-style=sysv -o %t --script %t.script %t.o -shared
|
2018-06-26 00:49:52 +08:00
|
|
|
# RUN: llvm-readelf -l %t | FileCheck %s
|
2016-09-30 08:16:11 +08:00
|
|
|
|
2016-09-30 02:50:34 +08:00
|
|
|
# There is not enough address space available for the header, so just start the PT_LOAD
|
2017-01-21 04:46:15 +08:00
|
|
|
# after it. Don't create a PT_PHDR as the header is not allocated.
|
2016-09-30 02:50:34 +08:00
|
|
|
|
|
|
|
# CHECK: Program Headers:
|
|
|
|
# CHECK-NEXT: Type Offset VirtAddr PhysAddr
|
|
|
|
# CHECK-NEXT: LOAD 0x001000 0x0000000000000000 0x0000000000000000
|
|
|
|
|
|
|
|
# CHECK: Section to Segment mapping:
|
|
|
|
# CHECK-NEXT: Segment Sections...
|
2018-06-27 06:13:32 +08:00
|
|
|
# CHECK-NEXT: 00 foo .dynsym .dynstr .hash
|
2016-09-16 05:22:11 +08:00
|
|
|
|
|
|
|
.section foo, "a"
|
|
|
|
.quad 0
|