2013-04-05 02:59:24 +08:00
|
|
|
# RUN: lld -core %s | FileCheck %s
|
2012-02-07 10:59:54 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# Test that undefined symbols are coalesced with other undefined symbols
|
|
|
|
# and definitions override them.
|
|
|
|
#
|
|
|
|
|
|
|
|
---
|
2013-01-05 10:22:35 +08:00
|
|
|
defined-atoms:
|
2012-02-07 10:59:54 +08:00
|
|
|
- name: foo
|
|
|
|
type: code
|
|
|
|
|
2013-01-05 10:22:35 +08:00
|
|
|
undefined-atoms:
|
2012-02-07 10:59:54 +08:00
|
|
|
- name: malloc
|
|
|
|
- name: free
|
|
|
|
---
|
2013-01-05 10:22:35 +08:00
|
|
|
defined-atoms:
|
2012-02-07 10:59:54 +08:00
|
|
|
- name: bar
|
|
|
|
type: code
|
|
|
|
|
2013-01-05 10:22:35 +08:00
|
|
|
undefined-atoms:
|
2012-02-07 10:59:54 +08:00
|
|
|
- name: malloc
|
|
|
|
- name: myfunc
|
|
|
|
---
|
2013-01-05 10:22:35 +08:00
|
|
|
defined-atoms:
|
2012-02-07 10:59:54 +08:00
|
|
|
- name: myfunc
|
|
|
|
scope: global
|
|
|
|
type: code
|
|
|
|
|
2013-01-05 10:22:35 +08:00
|
|
|
undefined-atoms:
|
2012-02-07 10:59:54 +08:00
|
|
|
- name: free
|
|
|
|
...
|
|
|
|
|
2013-01-05 10:22:35 +08:00
|
|
|
# CHECK: defined-atoms:
|
2012-02-07 10:59:54 +08:00
|
|
|
# CHECK: name: foo
|
|
|
|
# CHECK: name: bar
|
|
|
|
# CHECK: name: myfunc
|
|
|
|
# CHECK: scope: global
|
2013-01-05 10:22:35 +08:00
|
|
|
# CHECK: undefined-atoms:
|
2012-02-07 10:59:54 +08:00
|
|
|
# CHECK: name: malloc
|
|
|
|
# CHECK: name: free
|
|
|
|
# CHECK: ...
|