summaryrefslogtreecommitdiffstats
path: root/lld/test/core/undef-coalesce-error.objtxt
blob: adf13a244092151356338f1eceb904d87655377f (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
43
44
45
46
47
# RUN: not lld -core --undefines-are-errors %s 2> %t.err
# RUN: FileCheck -check-prefix=CHECKERR %s < %t.err
# RUN: lld -core %s | FileCheck %s

#
# Test that -undefines-are-errors triggers and error 
# and that not using that option results in undefined atoms.
#

---
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
...

# CHECKERR:       free
# CHECKERR:       malloc
# CHECKERR:       symbol(s) not found

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