llvm-project/lld/test/shared-library-coalesce.objtxt

85 lines
2.1 KiB
Plaintext
Raw Normal View History

# RUN: lld-core %s | FileCheck %s
#
# Test that shared library symbols preserve their attributes and merge properly
#
---
shared-library-atoms:
- name: foo1
load-name: libc.so
- name: foo2
load-name: libc.so
- name: bar1
load-name: libc.so
can-be-null: at-runtime
- name: bar2
load-name: libc.so
can-be-null: at-runtime
- name: mismatchNull1
load-name: libc.so
can-be-null: at-runtime
- name: mismatchNull2
load-name: libc.so
- name: mismatchload1
load-name: liba.so
- name: mismatchload2
load-name: libb.so
---
shared-library-atoms:
- name: foo2
load-name: libc.so
- name: foo3
load-name: libc.so
- name: bar2
load-name: libc.so
can-be-null: at-runtime
- name: bar3
load-name: libc.so
can-be-null: at-runtime
- name: mismatchNull1
load-name: libc.so
- name: mismatchNull2
load-name: libc.so
can-be-null: at-runtime
- name: mismatchload1
load-name: libb.so
- name: mismatchload2
load-name: liba.so
...
# CHECK: name: foo1
# CHECK: name: foo2
# CHECK: name: bar1
# CHECK: can-be-null: at-runtime
# CHECK: name: bar2
# CHECK: can-be-null: at-runtime
# CHECK: name: mismatchNull1
# CHECK: can-be-null: at-runtime
# CHECK: name: mismatchNull2
# CHECK-NOT: can-be-null: at-runtime
# CHECK: name: mismatchload1
# CHECK: load-name: liba.so
# CHECK: name: mismatchload2
# CHECK: load-name: libb.so
# CHECK: name: foo3
# CHECK: name: bar3
# CHECK: can-be-null: at-runtime
# CHECK: ...