diff options
Diffstat (limited to 'test/core/sectiongroup-remaining-undef.objtxt')
-rw-r--r-- | test/core/sectiongroup-remaining-undef.objtxt | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/test/core/sectiongroup-remaining-undef.objtxt b/test/core/sectiongroup-remaining-undef.objtxt new file mode 100644 index 0000000000000..7d889b8a49316 --- /dev/null +++ b/test/core/sectiongroup-remaining-undef.objtxt @@ -0,0 +1,80 @@ +# RUN: lld -core %s | FileCheck %s + +# +# Test that section groups are parsed and the first group selected for symbol +# resolution. The second file which has the same group has a unresolved +# undefined symbol. lets make sure that the symbol is kept around in the final +# link and remains undefined. +# + +--- +defined-atoms: + - name: f1 + scope: global + type: code + - name: f2 + scope: global + type: code + - name: g1 + scope: global + type: code + - name: d1 + scope: global + type: data + - name: g1 + scope: global + type: group-comdat + references: + - kind: group-child + target: f1 + - kind: group-child + target: f2 + - kind: group-child + target: g1 + - kind: group-child + target: d1 +--- +defined-atoms: + - name: anotherfunction + scope: global + type: data + - name: f1 + scope: global + type: code + - name: f2 + scope: global + type: code + - name: f3 + scope: global + type: code + - name: g1 + scope: global + type: code + - name: d1 + scope: global + type: data + - name: g1 + scope: global + type: group-comdat + references: + - kind: group-child + target: f1 + - kind: group-child + target: f2 + - kind: group-child + target: f3 + - kind: group-child + target: g1 + - kind: group-child + target: d1 +--- +undefined-atoms: + - name: f3 + can-be-null: never +... + +#CHECK: - name: anotherfunction +#CHECK: scope: global +#CHECK: type: data +#CHECK: undefined-atoms: +#CHECK: - name: f3 |