summaryrefslogtreecommitdiffstats
path: root/lld/test/undef-coalesce.objtxt
blob: 08e1cf80a53a7a9a11d1edb6bcec5cdd57bb9d94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# RUN: lld-core %s | FileCheck %s

#
# Test that undefined symbols are coalesced with other undefined symbols
# and definitions override them.
#

---
defined-atoms:
    - name:              foo
      type:              code
      
undefined-atoms:
    - name:              malloc
    - name:              free
---
defined-atoms:
    - name:              bar
      type:              code
      
undefined-atoms:
    - name:              malloc
    - name:              myfunc
---
defined-atoms:
    - name:              myfunc
      scope:             global
      type:              code
      
undefined-atoms:
    - name:              free
...

# CHECK:  defined-atoms:
# CHECK:       name:       foo
# CHECK:       name:       bar
# CHECK:       name:       myfunc
# CHECK:       scope:      global
# CHECK:  undefined-atoms:
# CHECK:       name:       malloc
# CHECK:       name:       free
# CHECK:       ...
OpenPOWER on IntegriCloud