Files
clang-p2996/lld/test/core/archive-basic.objtxt
Nick Kledzik 6edd722a2c [mach-o] enable mach-o and native yaml to be intermixed
The main goal of this patch is to allow "mach-o encoded as yaml" and "native
encoded as yaml" documents to be intermixed.  They are distinguished via 
yaml tags at the start of the document.  This will enable all mach-o test cases
to be written using yaml instead of checking in object files.

The Registry was extend to allow yaml tag handlers to be registered.  The
mach-o Reader adds a yaml tag handler for the tag "!mach-o". 

Additionally, this patch fixes some buffer ownership issues.  When parsing
mach-o binaries, the mach-o atoms can have pointers back into the memory 
mapped .o file.  But with yaml encoded mach-o, name and content are ephemeral, 
so a copyRefs parameter was added to cause the mach-o atoms to make their
own copy.  

llvm-svn: 198986
2014-01-11 01:07:43 +00:00

45 lines
983 B
Plaintext

# RUN: lld -core %s | FileCheck %s
#
# Tests archives in YAML. Tests that an undefined in a regular file will load
# all atoms in select archive members.
#
--- !native
defined-atoms:
- name: foo
type: code
undefined-atoms:
- name: bar
--- !archive
members:
- name: bar.o
content: !native
defined-atoms:
- name: bar
scope: global
type: code
- name: bar2
type: code
- name: baz.o
content: !native
defined-atoms:
- name: baz
scope: global
type: code
- name: baz2
type: code
...
# CHECK: name: foo
# CHECK-NOT: undefined-atoms:
# CHECK: name: bar
# CHECK: name: bar2
# CHECK-NOT: name: baz
# CHECK: ...