1 // REQUIRES
: aarch64
, x86
2 /// Link against
a DSO to ensure that sections are
not discarded by
--gc-sections.
3 // RUN
: llvm-mc
%S
/Inputs
/shared.s
-o
%ts.o
-filetype
=obj
--triple
=x86_64
4 // RUN
: ld.lld
-shared
-soname
=ts
%ts.o
-o
%ts.so
5 // RUN
: llvm-mc
%s
-o
%t.o
-filetype
=obj
--triple
=x86_64-unknown-linux
6 // RUN
: ld.lld
%t.o
%ts.so
-o
%t --export-dynamic
--gc-sections
-z max-page-size
=65536
7 // RUN
: llvm-readelf
-S
-s
%t | FileCheck
%s
9 // RUN
: llvm-mc
%S
/Inputs
/shared.s
-o
%ts.o
-filetype
=obj
--triple
=aarch64
10 // RUN
: ld.lld
-shared
-soname
=ts
%ts.o
-o
%ts.so
11 // RUN
: llvm-mc
%s
-o
%t.o
-filetype
=obj
--triple
=aarch64
--crel
12 // RUN
: ld.lld
%t.o
%ts.so
-o
%t --export-dynamic
--gc-sections
13 // RUN
: llvm-readelf
-S
-s
%t | FileCheck
%s
15 // This is basically lld
/docs
/partitions.dot in object file form.
16 // Test that the sections are correctly allocated to partitions.
17 // part1
and part2 should
be aligned to
a maximum page size boundary.
19 // CHECK
: [[MAIN
:[0-9]+]]] .text
20 // CHECK
: part1 LLVM_PART_EHDR
{{[0-9a-f
]+}}0000 {{[0-9a-f
]+}}0000
21 // CHECK
: [[P1
:[0-9]+]]] .text
22 // CHECK
: part2 LLVM_PART_EHDR
{{[0-9a-f
]+}}0000 {{[0-9a-f
]+}}0000
23 // CHECK
: [[P2
:[0-9]+]]] .text
25 // CHECK
: Symbol table
'.symtab'
32 // CHECK
: [[MAIN
]] _start
34 .section .llvm_sympart.f1,"",@llvm_sympart
38 .section .llvm_sympart.f2,"",@llvm_sympart
42 .section .text._start,"ax",@progbits
47 .section .text.f1,"ax",@progbits
54 .section .text.f2,"ax",@progbits
61 .section .text.f3,"ax",@progbits
65 .section .text.f4,"ax",@progbits
69 .section .text.f5,"ax",@progbits
73 .section .text.f6,"ax",@progbits