llvm-project/lld/test/undef-coalesce.objtxt

47 lines
1.0 KiB
Plaintext

# RUN: lld-core %s | FileCheck %s
#
# Test that undefined symbols are coalesced with other undefined symbols
# and definitions override them.
#
---
atoms:
- name: foo
type: code
- name: malloc
definition: undefined
- name: free
definition: undefined
---
atoms:
- name: bar
type: code
- name: malloc
definition: undefined
- name: myfunc
definition: undefined
---
atoms:
- name: myfunc
scope: global
type: code
- name: free
definition: undefined
...
# CHECK: name: foo
# CHECK: name: bar
# CHECK: name: myfunc
# CHECK: scope: global
# CHECK: name: malloc
# CHECK: definition: undefined
# CHECK: name: free
# CHECK: definition: undefined
# CHECK: ...