3 ## Test that DT_INIT_ARRAYSZ/DT_FINI_ARRAYSZ/DT_PREINIT_ARRAYSZ are computed
4 ## correctly, no matter their associated sections are orphans or not.
6 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o
7 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/shared.s -o %t2.o
8 # RUN: ld.lld -shared %t2.o -soname=so -o %t2.so
10 # RUN: echo "SECTIONS { .init_array : { *(.init_array) } }" > %t.script
11 # RUN: ld.lld -T %t.script %t1.o %t2.so -o %t
12 # RUN: llvm-readobj --dynamic-table %t | FileCheck %s
14 # CHECK: DynamicSection [
15 # CHECK-NEXT: Tag Type Name/Value
16 # CHECK: 0x0000000000000021 PREINIT_ARRAYSZ 9 (bytes)
17 # CHECK: 0x000000000000001B INIT_ARRAYSZ 8 (bytes)
18 # CHECK: 0x000000000000001C FINI_ARRAYSZ 10 (bytes)
23 .section .init_array,"aw",@init_array
26 .section .preinit_array,"aw",@preinit_array
30 .section .fini_array,"aw",@fini_array