forked from OSchip/llvm-project
129 lines
5.5 KiB
Plaintext
129 lines
5.5 KiB
Plaintext
# This tests GOT's and PLT's for dynamic libraries for Hexagon
|
|
RUN: lld -flavor gnu -target hexagon %p/Inputs/dynobj.o \
|
|
RUN: -o %t --output-filetype=yaml -shared --noinhibit-exec
|
|
RUN: FileCheck -check-prefix=CHECKGOTPLT %s < %t
|
|
|
|
- name: .PLT0
|
|
CHECKGOTPLT: type: stub
|
|
CHECKGOTPLT: content: [ 00, 40, 00, 00, 1C, C0, 49, 6A, 0E, 42, 9C, E2,
|
|
CHECKGOTPLT: 4F, 40, 9C, 91, 3C, C0, 9C, 91, 0E, 42, 0E, 8C,
|
|
CHECKGOTPLT: 00, C0, 9C, 52 ]
|
|
CHECKGOTPLT: alignment: 16
|
|
CHECKGOTPLT: section-name: .plt
|
|
CHECKGOTPLT: references:
|
|
CHECKGOTPLT: - kind: R_HEX_B32_PCREL_X
|
|
CHECKGOTPLT: offset: 0
|
|
target: __got0
|
|
CHECKGOTPLT: - kind: R_HEX_6_PCREL_X
|
|
CHECKGOTPLT: offset: 4
|
|
target: __got0
|
|
CHECKGOTPLT: addend: 4
|
|
- name: __plt_fn
|
|
CHECKGOTPLT: type: stub
|
|
CHECKGOTPLT: content: [ 00, 40, 00, 00, 0E, C0, 49, 6A, 1C, C0, 8E, 91,
|
|
CHECKGOTPLT: 00, C0, 9C, 52 ]
|
|
CHECKGOTPLT: alignment: 16
|
|
CHECKGOTPLT: section-name: .plt
|
|
CHECKGOTPLT: references:
|
|
CHECKGOTPLT: - kind: R_HEX_B32_PCREL_X
|
|
CHECKGOTPLT: offset: 0
|
|
target: __got_fn
|
|
CHECKGOTPLT: - kind: R_HEX_6_PCREL_X
|
|
CHECKGOTPLT: offset: 4
|
|
target: __got_fn
|
|
CHECKGOTPLT: addend: 4
|
|
- name: __plt_fn1
|
|
CHECKGOTPLT: type: stub
|
|
CHECKGOTPLT: content: [ 00, 40, 00, 00, 0E, C0, 49, 6A, 1C, C0, 8E, 91,
|
|
CHECKGOTPLT: 00, C0, 9C, 52 ]
|
|
CHECKGOTPLT: alignment: 16
|
|
CHECKGOTPLT: section-name: .plt
|
|
CHECKGOTPLT: references:
|
|
CHECKGOTPLT: - kind: R_HEX_B32_PCREL_X
|
|
CHECKGOTPLT: offset: 0
|
|
target: __got_fn1
|
|
CHECKGOTPLT: - kind: R_HEX_6_PCREL_X
|
|
CHECKGOTPLT: offset: 4
|
|
target: __got_fn1
|
|
CHECKGOTPLT: addend: 4
|
|
- name: __plt_fn2
|
|
CHECKGOTPLT: type: stub
|
|
CHECKGOTPLT: content: [ 00, 40, 00, 00, 0E, C0, 49, 6A, 1C, C0, 8E, 91,
|
|
CHECKGOTPLT: 00, C0, 9C, 52 ]
|
|
CHECKGOTPLT: alignment: 16
|
|
CHECKGOTPLT: section-name: .plt
|
|
CHECKGOTPLT: references:
|
|
CHECKGOTPLT: - kind: R_HEX_B32_PCREL_X
|
|
CHECKGOTPLT: offset: 0
|
|
target: __got_fn2
|
|
CHECKGOTPLT: - kind: R_HEX_6_PCREL_X
|
|
CHECKGOTPLT: offset: 4
|
|
target: __got_fn2
|
|
CHECKGOTPLT: addend: 4
|
|
- name: __got0
|
|
CHECKGOTPLT: type: got
|
|
CHECKGOTPLT: content: [ 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
|
|
CHECKGOTPLT: 00, 00, 00, 00 ]
|
|
CHECKGOTPLT: alignment: 8
|
|
CHECKGOTPLT: section-name: .got.plt
|
|
CHECKGOTPLT: permissions: rw-
|
|
- name: __got_c
|
|
CHECKGOTPLT: type: got
|
|
CHECKGOTPLT: content: [ 00, 00, 00, 00 ]
|
|
CHECKGOTPLT: alignment: 4
|
|
CHECKGOTPLT: section-name: .got
|
|
CHECKGOTPLT: permissions: rw-
|
|
CHECKGOTPLT: references:
|
|
CHECKGOTPLT: - kind: R_HEX_GLOB_DAT
|
|
CHECKGOTPLT: offset: 0
|
|
CHECKGOTPLT: target: c
|
|
- name: __got_shankar
|
|
CHECKGOTPLT: type: got
|
|
CHECKGOTPLT: content: [ 00, 00, 00, 00 ]
|
|
CHECKGOTPLT: alignment: 4
|
|
CHECKGOTPLT: section-name: .got
|
|
CHECKGOTPLT: permissions: rw-
|
|
CHECKGOTPLT: references:
|
|
CHECKGOTPLT: - kind: R_HEX_GLOB_DAT
|
|
CHECKGOTPLT: offset: 0
|
|
CHECKGOTPLT: target: shankar
|
|
- name: __got_fn
|
|
CHECKGOTPLT: type: got
|
|
CHECKGOTPLT: content: [ 00, 00, 00, 00 ]
|
|
CHECKGOTPLT: alignment: 4
|
|
CHECKGOTPLT: section-name: .got.plt
|
|
CHECKGOTPLT: permissions: rw-
|
|
CHECKGOTPLT: references:
|
|
CHECKGOTPLT: - kind: R_HEX_JMP_SLOT
|
|
CHECKGOTPLT: offset: 0
|
|
CHECKGOTPLT: target: fn
|
|
CHECKGOTPLT: - kind: R_HEX_32
|
|
CHECKGOTPLT: offset: 0
|
|
target: .PLT0
|
|
- name: __got_fn1
|
|
CHECKGOTPLT: type: got
|
|
CHECKGOTPLT: content: [ 00, 00, 00, 00 ]
|
|
CHECKGOTPLT: alignment: 4
|
|
CHECKGOTPLT: section-name: .got.plt
|
|
CHECKGOTPLT: permissions: rw-
|
|
CHECKGOTPLT: references:
|
|
CHECKGOTPLT: - kind: R_HEX_JMP_SLOT
|
|
CHECKGOTPLT: offset: 0
|
|
CHECKGOTPLT: target: fn1
|
|
CHECKGOTPLT: - kind: R_HEX_32
|
|
CHECKGOTPLT: offset: 0
|
|
target: .PLT0
|
|
- name: __got_fn2
|
|
CHECKGOTPLT: type: got
|
|
CHECKGOTPLT: content: [ 00, 00, 00, 00 ]
|
|
CHECKGOTPLT: alignment: 4
|
|
CHECKGOTPLT: section-name: .got.plt
|
|
CHECKGOTPLT: permissions: rw-
|
|
CHECKGOTPLT: references:
|
|
CHECKGOTPLT: - kind: R_HEX_JMP_SLOT
|
|
CHECKGOTPLT: offset: 0
|
|
CHECKGOTPLT: target: fn2
|
|
CHECKGOTPLT: - kind: R_HEX_32
|
|
CHECKGOTPLT: offset: 0
|
|
target: .PLT0
|