2013-04-05 02:59:24 +08:00
|
|
|
# RUN: lld -core %s | FileCheck %s
|
2012-02-15 08:38:09 +08:00
|
|
|
|
|
|
|
#
|
2013-01-09 05:12:13 +08:00
|
|
|
# Test addends in references
|
2012-02-15 08:38:09 +08:00
|
|
|
#
|
|
|
|
|
|
|
|
---
|
2013-01-05 10:22:35 +08:00
|
|
|
defined-atoms:
|
2012-02-15 08:38:09 +08:00
|
|
|
- name: foo
|
|
|
|
type: code
|
|
|
|
content: [ 48, 8D, 3D, 00, 00, 00, 00,
|
|
|
|
48, 8D, 3D, 00, 00, 00, 00 ]
|
2013-01-09 05:12:13 +08:00
|
|
|
references:
|
2012-02-15 08:38:09 +08:00
|
|
|
- offset: 3
|
2013-04-05 02:59:24 +08:00
|
|
|
kind: pcrel32
|
2012-02-15 08:38:09 +08:00
|
|
|
target: bar
|
|
|
|
addend: 100
|
|
|
|
- offset: 10
|
2013-04-05 02:59:24 +08:00
|
|
|
kind: pcrel32
|
2012-02-15 08:38:09 +08:00
|
|
|
target: bar
|
|
|
|
addend: -50
|
|
|
|
|
|
|
|
- name: func
|
|
|
|
type: code
|
|
|
|
content: [ 48, 8D, 3D, 00, 00, 00, 00,
|
|
|
|
48, 8D, 3D, 00, 00, 00, 00 ]
|
2013-01-09 05:12:13 +08:00
|
|
|
references:
|
2012-02-15 08:38:09 +08:00
|
|
|
- offset: 3
|
2013-04-05 02:59:24 +08:00
|
|
|
kind: pcrel32
|
2012-02-15 08:38:09 +08:00
|
|
|
target: bar
|
|
|
|
addend: 8000000000
|
|
|
|
- offset: 10
|
2013-04-05 02:59:24 +08:00
|
|
|
kind: pcrel32
|
2012-02-15 08:38:09 +08:00
|
|
|
target: bar
|
|
|
|
addend: -50
|
|
|
|
|
2013-01-05 10:22:35 +08:00
|
|
|
undefined-atoms:
|
2012-02-15 08:38:09 +08:00
|
|
|
- name: bar
|
|
|
|
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
# CHECK: name: foo
|
2013-01-09 05:12:13 +08:00
|
|
|
# CHECK: references:
|
2012-02-15 08:38:09 +08:00
|
|
|
# CHECK: addend: 100
|
|
|
|
# CHECK: addend: -50
|
|
|
|
# CHECK: name: func
|
2013-01-09 05:12:13 +08:00
|
|
|
# CHECK: references:
|
2012-02-15 08:38:09 +08:00
|
|
|
# CHECK: addend: 8000000000
|
|
|
|
# CHECK: addend: -50
|