llvm-project/lld/test/archive-tentdef-search.objtxt

44 lines
1.0 KiB
Plaintext

# RUN: lld -core %s | FileCheck -check-prefix=CHK1 %s
# RUN: lld -core --commons-search-archives %s | FileCheck -check-prefix=CHK2 %s
#
# Tests that -commons-search-archives cause core linker to look for overrides
# of tentative definition in archives, and that not using that option
# does not search.
#
---
defined-atoms:
- name: foo
type: code
- name: bar
scope: global
type: zero-fill
merge: as-tentative
---
kind: archive
members:
- name: bar.o
content:
defined-atoms:
- name: bar
scope: global
type: data
- name: bar2
type: data
...
# CHK1: name: foo
# CHK1: name: bar
# CHK1: merge: as-tentative
# CHK1: ...
# CHK2: name: foo
# CHK2: name: bar
# CHK2-NOT: merge: as-tentative
# CHK2: name: bar2
# CHK2: ...