blob: 1309af381c8f45f475f527ab521b22ac6b8bc834 [file] [log] [blame]
# RUN: lld-core %s -got_pass | FileCheck %s
#
# Test that GOT pass instantiates GOT entires and alters references
#
---
atoms:
- name: foo
type: code
content: [ 48, 8B, 0D, 00, 00, 00, 00,
48, 8B, 0D, 00, 00, 00, 00,
48, 8B, 0D, 00, 00, 00, 00,
48, 83, 3D, 00, 00, 00, 00, 00,
48, 83, 3D, 00, 00, 00, 00, 00,
48, 83, 3D, 00, 00, 00, 00, 00,
48, 83, 3D, 00, 00, 00, 00, 00 ]
fixups:
- offset: 3
kind: gotLoad32
target: malloc
- offset: 10
kind: gotLoad32
target: myPrivate
- offset: 17
kind: gotLoad32
target: myInterposable
- offset: 24
kind: gotUse32
target: malloc
- offset: 32
kind: gotUse32
target: myPrivate
- offset: 40
kind: gotUse32
target: myInterposable
- name: myPrivate
scope: global
interposable: no
- name: myInterposable
scope: global
interposable: yes
- name: malloc
definition: shared-library
load-name: libc.so
...
# CHECK: name: foo
# CHECK: fixups:
# CHECK: offset: 3
# CHECK: kind: pcrel32
# CHECK: target: L
# CHECK: offset: 10
# CHECK: kind: lea32wasGot
# CHECK: target: myPrivate
# CHECK: offset: 17
# CHECK: kind: pcrel32
# CHECK: target: L
# CHECK: offset: 24
# CHECK: kind: pcrel32
# CHECK: target: L
# CHECK: offset: 32
# CHECK: kind: pcrel32
# CHECK: target: L
# CHECK: offset: 40
# CHECK: kind: pcrel32
# CHECK: target: L
# CHECK: name: myPrivate
# CHECK: name: myInterposable
# CHECK: interposable: yes
# CHECK: name: L
# CHECK: type: got
# CHECK: type: got
# CHECK: type: got
# CHECK: name: malloc
# CHECK: definition: shared-library
# CHECK: ...