2013-08-26 02:05:12 +08:00
|
|
|
# This tests the functionality that lld is able to read
|
|
|
|
# init_array/fini_array sections in the input ELF. This
|
|
|
|
# corresponds to the the .init_array/.fini_array sections
|
2014-01-27 11:09:26 +08:00
|
|
|
# in the output ELF.
|
2013-08-26 02:05:12 +08:00
|
|
|
|
|
|
|
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/initfini.o \
|
2013-09-23 12:24:15 +08:00
|
|
|
RUN: --noinhibit-exec --output-filetype=yaml -o %t
|
2013-08-26 02:05:12 +08:00
|
|
|
RUN: FileCheck %s < %t
|
|
|
|
|
|
|
|
CHECK: - type: data
|
|
|
|
CHECK: content: [ 00, 00, 00, 00, 00, 00, 00, 00 ]
|
|
|
|
CHECK: section-name: .init_array
|
2014-01-27 11:09:26 +08:00
|
|
|
CHECK: references:
|
2013-08-26 02:05:12 +08:00
|
|
|
CHECK: - kind: R_X86_64_64
|
|
|
|
CHECK: offset: 0
|
|
|
|
CHECK: target: constructor
|
|
|
|
CHECK: - type: data
|
|
|
|
CHECK: content: [ 00, 00, 00, 00, 00, 00, 00, 00 ]
|
|
|
|
CHECK: section-name: .fini_array
|
2014-01-27 11:09:26 +08:00
|
|
|
CHECK: references:
|
2013-08-26 02:05:12 +08:00
|
|
|
CHECK: - kind: R_X86_64_64
|
|
|
|
CHECK: offset: 0
|
|
|
|
CHECK: target: destructor
|