2013-09-04 06:44:42 +08:00
|
|
|
# This tests the functionality that lld is able to create
|
|
|
|
# init_array/fini_array sections in the output ELF. This
|
|
|
|
# corresponds to the the .init_array/.fini_array sections
|
2014-01-27 11:09:26 +08:00
|
|
|
# in the output ELF.
|
2013-09-04 06:44:42 +08:00
|
|
|
|
|
|
|
RUN: lld -flavor gnu -target hexagon %p/Inputs/initfini-option.o \
|
2013-09-23 12:24:15 +08:00
|
|
|
RUN: -init init -fini fini --noinhibit-exec --output-filetype=yaml -static -o %t
|
2013-09-04 06:44:42 +08:00
|
|
|
RUN: FileCheck %s < %t
|
|
|
|
|
|
|
|
CHECK: content: [ 00, 00, 00, 00 ]
|
|
|
|
CHECK: section-name: .init_array
|
2014-01-27 11:09:26 +08:00
|
|
|
CHECK: references:
|
2013-09-04 06:44:42 +08:00
|
|
|
CHECK: - kind: R_HEX_32
|
|
|
|
CHECK: offset: 0
|
|
|
|
CHECK: target: init
|
|
|
|
CHECK: content: [ 00, 00, 00, 00 ]
|
|
|
|
CHECK: section-name: .fini_array
|
2014-01-27 11:09:26 +08:00
|
|
|
CHECK: references:
|
2013-09-04 06:44:42 +08:00
|
|
|
CHECK: - kind: R_HEX_32
|
|
|
|
CHECK: offset: 0
|
|
|
|
CHECK: target: fini
|