[NoPatch!] [lld]:What output formats should we support?
Tim Northover
t.p.northover at gmail.com
Wed Jun 25 05:54:50 PDT 2014
On 20 June 2014 19:06, Nick Kledzik <kledzik at apple.com> wrote:
>> + HostNative ( == old Default)
>> + HostYAML
>> + AtomNative (== old Native)
>> + AtomYAML (== old YAML)
> “Host” is wrong here. lld is supposed to be a cross compiler. Host usually means
> what you are running on. The term we’ve been using for ELF/COFF/Mach-O is
> “flavor”.
So, how about this patch? It implements what I was describing,
basically, and allows us to round-trip the YAMLised representation of
MachO (as you said, other formats don't have that representation yet;
ELF just treats target-yaml the same way as it does the current
"native", by asserting).
Cheers.
Tim.
-------------- next part --------------
diff --git a/include/lld/Core/LinkingContext.h b/include/lld/Core/LinkingContext.h
index 2d4654a..8ef0e44 100644
--- a/include/lld/Core/LinkingContext.h
+++ b/include/lld/Core/LinkingContext.h
@@ -42,9 +42,10 @@ class LinkingContext {
public:
/// \brief The types of output file that the linker creates.
enum class OutputFileType : uint8_t {
- Default, // The default output type for this target
- YAML, // The output type is set to YAML
- Native // The output file format is Native (Atoms)
+ TargetBinary, // The target's object format in binary form
+ TargetYAML, // The target's object format in YAML form
+ AtomicBinary, // Lld's Atoms in binary form
+ AtomicYAML, // Lld's Atoms in YAML form
};
virtual ~LinkingContext();
@@ -271,10 +272,14 @@ public:
/// Set the various output file types that the linker would
/// create
bool setOutputFileType(StringRef outputFileType) {
- if (outputFileType.equals_lower("yaml"))
- _outputFileType = OutputFileType::YAML;
- else if (outputFileType.equals_lower("native"))
- _outputFileType = OutputFileType::YAML;
+ if (outputFileType.equals_lower("target-binary"))
+ _outputFileType = OutputFileType::TargetBinary;
+ else if (outputFileType.equals_lower("target-yaml"))
+ _outputFileType = OutputFileType::TargetYAML;
+ else if (outputFileType.equals_lower("atomic-yaml"))
+ _outputFileType = OutputFileType::AtomicYAML;
+ else if (outputFileType.equals_lower("atomic-binary"))
+ _outputFileType = OutputFileType::AtomicBinary;
else
return false;
return true;
diff --git a/include/lld/ReaderWriter/MachOLinkingContext.h b/include/lld/ReaderWriter/MachOLinkingContext.h
index 036fe8b..8499a0b 100644
--- a/include/lld/ReaderWriter/MachOLinkingContext.h
+++ b/include/lld/ReaderWriter/MachOLinkingContext.h
@@ -77,7 +77,6 @@ public:
bool minOS(StringRef mac, StringRef iOS) const;
void setDoNothing(bool value) { _doNothing = value; }
bool doNothing() const { return _doNothing; }
- bool printAtoms() const { return _printAtoms; }
/// \brief The dylib's binary compatibility version, in the raw uint32 format.
///
@@ -124,7 +123,6 @@ public:
_deadStrippableDylib = deadStrippable;
}
void setBundleLoader(StringRef loader) { _bundleLoader = loader; }
- void setPrintAtoms(bool value=true) { _printAtoms = value; }
StringRef dyldPath() const { return "/usr/lib/dyld"; }
static Arch archFromCpuType(uint32_t cputype, uint32_t cpusubtype);
@@ -165,7 +163,6 @@ private:
uint32_t _currentVersion;
StringRef _installName;
bool _deadStrippableDylib;
- bool _printAtoms;
StringRef _bundleLoader;
mutable std::unique_ptr<mach_o::KindHandler> _kindHandler;
mutable std::unique_ptr<Writer> _writer;
diff --git a/lib/Core/LinkingContext.cpp b/lib/Core/LinkingContext.cpp
index 02ffb4d..eac0128 100644
--- a/lib/Core/LinkingContext.cpp
+++ b/lib/Core/LinkingContext.cpp
@@ -25,7 +25,7 @@ LinkingContext::LinkingContext()
_warnIfCoalesableAtomsHaveDifferentLoadName(false),
_printRemainingUndefines(true), _allowRemainingUndefines(false),
_logInputFiles(false), _allowShlibUndefines(false),
- _outputFileType(OutputFileType::Default), _nextOrdinal(0) {}
+ _outputFileType(OutputFileType::TargetBinary), _nextOrdinal(0) {}
LinkingContext::~LinkingContext() {}
diff --git a/lib/Driver/DarwinLdDriver.cpp b/lib/Driver/DarwinLdDriver.cpp
index c667840..b2d7dc5 100644
--- a/lib/Driver/DarwinLdDriver.cpp
+++ b/lib/Driver/DarwinLdDriver.cpp
@@ -258,9 +258,24 @@ bool DarwinLdDriver::parse(int argc, const char *argv[],
ctx.appendLLVMOption((*it)->getValue());
}
- // Handle -print_atoms a
- if (parsedArgs->getLastArg(OPT_print_atoms))
- ctx.setPrintAtoms();
+ // Handle -output_filetype
+ if (llvm::opt::Arg *outType = parsedArgs->getLastArg(OPT_output_filetype))
+ ctx.setOutputFileType(outType->getValue());
+
+ // Set default output file name if the output file was not
+ // specified.
+ if (!parsedArgs->hasArg(OPT_output)) {
+ switch (ctx.outputFileType()) {
+ case LinkingContext::OutputFileType::TargetYAML:
+ case LinkingContext::OutputFileType::AtomicYAML:
+ ctx.setOutputPath("-");
+ break;
+ default:
+ ctx.setOutputPath("a.out");
+ break;
+ }
+ }
+
std::unique_ptr<InputGraph> inputGraph(new InputGraph());
diff --git a/lib/Driver/DarwinLdOptions.td b/lib/Driver/DarwinLdOptions.td
index 61c151a..09f88d7 100644
--- a/lib/Driver/DarwinLdOptions.td
+++ b/lib/Driver/DarwinLdOptions.td
@@ -71,8 +71,8 @@ def all_load : Flag<["-"], "all_load">,
Group<grp_libs>;
// test case options
-def print_atoms : Flag<["-"], "print_atoms">,
- HelpText<"Emit output as yaml atoms">;
+def output_filetype : Separate<["-"], "output_filetype">,
+ HelpText<"Type of output to generate">;
// general options
def output : Separate<["-"], "o">, HelpText<"Output file path">;
diff --git a/lib/Driver/GnuLdDriver.cpp b/lib/Driver/GnuLdDriver.cpp
index cd2619c..c53f7d3 100644
--- a/lib/Driver/GnuLdDriver.cpp
+++ b/lib/Driver/GnuLdDriver.cpp
@@ -549,10 +549,10 @@ bool GnuLdDriver::parse(int argc, const char *argv[],
// specified.
if (!_outputOptionSet) {
switch (ctx->outputFileType()) {
- case LinkingContext::OutputFileType::YAML:
+ case LinkingContext::OutputFileType::AtomicYAML:
ctx->setOutputPath("-");
break;
- case LinkingContext::OutputFileType::Native:
+ case LinkingContext::OutputFileType::TargetBinary:
ctx->setOutputPath("a.native");
break;
default:
@@ -561,7 +561,7 @@ bool GnuLdDriver::parse(int argc, const char *argv[],
}
}
- if (ctx->outputFileType() == LinkingContext::OutputFileType::YAML)
+ if (ctx->outputFileType() == LinkingContext::OutputFileType::AtomicYAML)
inputGraph->dump(diagnostics);
// Validate the combination of options used.
diff --git a/lib/ReaderWriter/ELF/ELFLinkingContext.cpp b/lib/ReaderWriter/ELF/ELFLinkingContext.cpp
index 23036bc..c32b7d4 100644
--- a/lib/ReaderWriter/ELF/ELFLinkingContext.cpp
+++ b/lib/ReaderWriter/ELF/ELFLinkingContext.cpp
@@ -100,14 +100,14 @@ StringRef ELFLinkingContext::entrySymbolName() const {
bool ELFLinkingContext::validateImpl(raw_ostream &diagnostics) {
switch (outputFileType()) {
- case LinkingContext::OutputFileType::YAML:
+ case LinkingContext::OutputFileType::AtomicYAML:
_writer = createWriterYAML(*this);
break;
- case LinkingContext::OutputFileType::Native:
- llvm_unreachable("Unimplemented");
+ case LinkingContext::OutputFileType::TargetBinary:
+ _writer = createWriterELF(this->targetHandler());
break;
default:
- _writer = createWriterELF(this->targetHandler());
+ llvm_unreachable("Unimplemented");
break;
}
return true;
diff --git a/lib/ReaderWriter/MachO/MachOLinkingContext.cpp b/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
index b1e2929..23759d3 100644
--- a/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
+++ b/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
@@ -122,7 +122,7 @@ MachOLinkingContext::MachOLinkingContext()
: _outputMachOType(MH_EXECUTE), _outputMachOTypeStatic(false),
_doNothing(false), _arch(arch_unknown), _os(OS::macOSX), _osMinVersion(0),
_pageZeroSize(0), _pageSize(4096), _compatibilityVersion(0),
- _currentVersion(0), _deadStrippableDylib(false), _printAtoms(false),
+ _currentVersion(0), _deadStrippableDylib(false),
_kindHandler(nullptr) {}
MachOLinkingContext::~MachOLinkingContext() {}
diff --git a/lib/ReaderWriter/MachO/WriterMachO.cpp b/lib/ReaderWriter/MachO/WriterMachO.cpp
index f76bfff..0fd27b5 100644
--- a/lib/ReaderWriter/MachO/WriterMachO.cpp
+++ b/lib/ReaderWriter/MachO/WriterMachO.cpp
@@ -13,6 +13,7 @@
#include "lld/Core/File.h"
#include "lld/ReaderWriter/MachOLinkingContext.h"
#include "llvm/Support/Debug.h"
+#include "llvm/Support/ErrC.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FileOutputBuffer.h"
#include "llvm/Support/MachO.h"
@@ -35,14 +36,26 @@ public:
if (std::error_code ec = nFile.getError())
return ec;
- // For testing, write out yaml form of normalized file.
- if (_context.printAtoms()) {
+ switch (_context.outputFileType()) {
+ case LinkingContext::OutputFileType::AtomicYAML: {
+ // For testing, write out yaml form of normalized file.
std::unique_ptr<Writer> yamlWriter = createWriterYAML(_context);
- yamlWriter->writeFile(file, "-");
+ return yamlWriter->writeFile(file, path);
}
+ case LinkingContext::OutputFileType::TargetYAML: {
+ std::string errorInfo;
+ llvm::raw_fd_ostream out(path.data(), errorInfo, llvm::sys::fs::F_Text);
+ if (!errorInfo.empty())
+ return make_error_code(llvm::errc::no_such_file_or_directory);
- // Write normalized file as mach-o binary.
- return writeBinary(*nFile->get(), path);
+ return writeYaml(*nFile->get(), out);
+ }
+ case LinkingContext::OutputFileType::TargetBinary:
+ // Write normalized file as mach-o binary.
+ return writeBinary(*nFile->get(), path);
+ default:
+ llvm_unreachable("Unimplemented");
+ }
}
bool createImplicitFiles(std::vector<std::unique_ptr<File> > &r) override {
diff --git a/test/Driver/libsearch-inputGraph.test b/test/Driver/libsearch-inputGraph.test
index 3f338d3..8bd3c89 100644
--- a/test/Driver/libsearch-inputGraph.test
+++ b/test/Driver/libsearch-inputGraph.test
@@ -1,17 +1,17 @@
RUN: lld -flavor gnu -target x86_64-linux -L%p/../elf/Inputs -lfnarchive \
-RUN: --output-filetype=yaml --noinhibit-exec 2> %t.err
+RUN: --output-filetype=atomic-yaml --noinhibit-exec 2> %t.err
RUN: FileCheck %s < %t.err
RUN: lld -flavor gnu -target x86_64-linux -L%p/../elf/Inputs --whole-archive \
-RUN: -lfnarchive --output-filetype=yaml --noinhibit-exec 2> %t1.err
+RUN: -lfnarchive --output-filetype=atomic-yaml --noinhibit-exec 2> %t1.err
RUN: FileCheck %s -check-prefix="WHOLEARCHIVE" < %t1.err
RUN: lld -flavor gnu -target x86_64-linux -L%p/../elf/Inputs --whole-archive \
-RUN: --as-needed -lfnarchive --output-filetype=yaml --noinhibit-exec 2> %t2.err
+RUN: --as-needed -lfnarchive --output-filetype=atomic-yaml --noinhibit-exec 2> %t2.err
RUN: FileCheck %s -check-prefix="ASNEEDED" < %t2.err
RUN: lld -flavor gnu -target x86_64-linux --sysroot=%p/../elf -L=/Inputs \
-RUN: -lfnarchive --output-filetype=yaml --noinhibit-exec 2> %t3.err
+RUN: -lfnarchive --output-filetype=atomic-yaml --noinhibit-exec 2> %t3.err
RUN: FileCheck -check-prefix="SYSROOT" %s < %t3.err
CHECK: Name : {{[^ ]+}}elf/Inputs{{[\\/]}}libfnarchive.a
diff --git a/test/Driver/undef-basic.objtxt b/test/Driver/undef-basic.objtxt
index f942d5c..eaf1abf 100644
--- a/test/Driver/undef-basic.objtxt
+++ b/test/Driver/undef-basic.objtxt
@@ -1,5 +1,5 @@
# RUN: lld -flavor gnu -u undefinedsymbol -e entrysymbol %s \
-# RUN: --output-filetype=yaml --noinhibit-exec | FileCheck %s
+# RUN: --output-filetype=atomic-yaml --noinhibit-exec | FileCheck %s
#
# Test that we are able to add undefined atoms from the command line
diff --git a/test/elf/Hexagon/dynlib-gotoff.test b/test/elf/Hexagon/dynlib-gotoff.test
index 3332421..84d1ff5 100644
--- a/test/elf/Hexagon/dynlib-gotoff.test
+++ b/test/elf/Hexagon/dynlib-gotoff.test
@@ -1,6 +1,6 @@
# This tests GOT's and PLT's for dynamic libraries for Hexagon
RUN: lld -flavor gnu -target hexagon %p/Inputs/dynobj.o \
-RUN: -o %t --output-filetype=yaml -shared --noinhibit-exec
+RUN: -o %t --output-filetype=atomic-yaml -shared --noinhibit-exec
RUN: FileCheck -check-prefix=CHECKGOTPLT %s < %t
- name: __got0
diff --git a/test/elf/Hexagon/hexagon-plt-setup.test b/test/elf/Hexagon/hexagon-plt-setup.test
index 15c4e22..12a091f 100644
--- a/test/elf/Hexagon/hexagon-plt-setup.test
+++ b/test/elf/Hexagon/hexagon-plt-setup.test
@@ -1,5 +1,5 @@
RUN: lld -flavor gnu -target hexagon %p/Inputs/use-shared.hexagon \
-RUN: --output-filetype=yaml --noinhibit-exec -o %t2
+RUN: --output-filetype=atomic-yaml --noinhibit-exec -o %t2
RUN: FileCheck %s < %t2
CHECK: - name: fn3
diff --git a/test/elf/Hexagon/initfini-option.test b/test/elf/Hexagon/initfini-option.test
index c9eeb57..6337ec8 100644
--- a/test/elf/Hexagon/initfini-option.test
+++ b/test/elf/Hexagon/initfini-option.test
@@ -4,7 +4,7 @@
# in the output ELF.
RUN: lld -flavor gnu -target hexagon %p/Inputs/initfini-option.o \
-RUN: -init init -fini fini --noinhibit-exec --output-filetype=yaml -static -o %t
+RUN: -init init -fini fini --noinhibit-exec --output-filetype=atomic-yaml -static -o %t
RUN: FileCheck %s < %t
CHECK: content: [ 00, 00, 00, 00 ]
diff --git a/test/elf/Mips/ctors-order.test b/test/elf/Mips/ctors-order.test
index bded11a..01129d5 100644
--- a/test/elf/Mips/ctors-order.test
+++ b/test/elf/Mips/ctors-order.test
@@ -3,7 +3,7 @@
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-crtbeginS.o
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-crtendS.o
# RUN: yaml2obj -format=elf -docnum 3 %s > %t-obj.o
-# RUN: lld -flavor gnu -target mipsel -shared --output-filetype=yaml \
+# RUN: lld -flavor gnu -target mipsel -shared --output-filetype=atomic-yaml \
# RUN: %t-crtbeginS.o %t-obj.o %t-crtendS.o | FileCheck %s
# CHECK: defined-atoms:
diff --git a/test/elf/Mips/dynlib-dynsym.test b/test/elf/Mips/dynlib-dynsym.test
index c29caa4..33967ef 100644
--- a/test/elf/Mips/dynlib-dynsym.test
+++ b/test/elf/Mips/dynlib-dynsym.test
@@ -7,7 +7,7 @@
# Build shared library (yaml format)
# RUN: lld -flavor gnu -target mipsel -shared --noinhibit-exec \
-# RUN: --output-filetype=yaml -o %t-yaml %t.o
+# RUN: --output-filetype=atomic-yaml -o %t-yaml %t.o
# RUN: FileCheck -check-prefix=CHECK-GOT %s < %t-yaml
# CHECK-DYN: Format: ELF32-mips
diff --git a/test/elf/Mips/exe-dynsym.test b/test/elf/Mips/exe-dynsym.test
index ce5aa0e..9174cf0 100644
--- a/test/elf/Mips/exe-dynsym.test
+++ b/test/elf/Mips/exe-dynsym.test
@@ -10,7 +10,7 @@
# Build executabl (yaml format)e
# RUN: lld -flavor gnu -target mipsel -e glob \
-# RUN: --output-filetype=yaml -o %t-yaml %t-main
+# RUN: --output-filetype=atomic-yaml -o %t-yaml %t-main
# RUN: FileCheck -check-prefix=CHECK-GOT %s < %t-yaml
# CHECK-DYN: Format: ELF32-mips
diff --git a/test/elf/Mips/exe-got.test b/test/elf/Mips/exe-got.test
index ab2e9c2..5eccc95 100644
--- a/test/elf/Mips/exe-got.test
+++ b/test/elf/Mips/exe-got.test
@@ -11,7 +11,7 @@
# Build executable
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o
# RUN: lld -flavor gnu -target mipsel -e glob \
-# RUN: --output-filetype=yaml -o %t.exe %t-o.o %t.so
+# RUN: --output-filetype=atomic-yaml -o %t.exe %t-o.o %t.so
# RUN: FileCheck -check-prefix=GOT %s < %t.exe
# GOT header
diff --git a/test/elf/Mips/got16.test b/test/elf/Mips/got16.test
index d7f68ab..0f329b4 100644
--- a/test/elf/Mips/got16.test
+++ b/test/elf/Mips/got16.test
@@ -3,7 +3,7 @@
# Check handling of global/local GOT16 relocations.
# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target mipsel -shared --noinhibit-exec \
-# RUN: --output-filetype=yaml %t.o \
+# RUN: --output-filetype=atomic-yaml %t.o \
# RUN: | FileCheck -check-prefix YAML %s
# RUN: lld -flavor gnu -target mipsel -shared --noinhibit-exec -o %t2 %t.o
# RUN: llvm-objdump -t -disassemble %t2 | FileCheck -check-prefix RAW %s
diff --git a/test/elf/X86_64/debug.test b/test/elf/X86_64/debug.test
index a13d12f..7111581 100644
--- a/test/elf/X86_64/debug.test
+++ b/test/elf/X86_64/debug.test
@@ -1,6 +1,6 @@
# Test that debug info is assigned typeNoAlloc and that the output sections have
# a virtual address of 0.
-RUN: lld -flavor gnu -target x86_64 -e main --output-filetype=yaml \
+RUN: lld -flavor gnu -target x86_64 -e main --output-filetype=atomic-yaml \
RUN: %p/Inputs/debug0.x86-64 %p/Inputs/debug1.x86-64 -o %t
RUN: FileCheck %s -check-prefix YAML < %t
diff --git a/test/elf/X86_64/dontignorezerosize-sections.test b/test/elf/X86_64/dontignorezerosize-sections.test
index 101e6cb..625719d 100644
--- a/test/elf/X86_64/dontignorezerosize-sections.test
+++ b/test/elf/X86_64/dontignorezerosize-sections.test
@@ -1,6 +1,6 @@
# This tests that lld is not ignoring zero sized sections
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/zerosizedsection.o \
-RUN: --noinhibit-exec --output-filetype=yaml -o %t
+RUN: --noinhibit-exec --output-filetype=atomic-yaml -o %t
RUN: FileCheck %s < %t
CHECK: references:
diff --git a/test/elf/X86_64/extern-tls.test b/test/elf/X86_64/extern-tls.test
index c8e7580..23164b3 100644
--- a/test/elf/X86_64/extern-tls.test
+++ b/test/elf/X86_64/extern-tls.test
@@ -1,7 +1,7 @@
# This tests verifies that TLS variables have correct offsets
# when variables the TLS variables are not defined in the program
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/externtls.x86-64 -static \
-RUN: --output-filetype=yaml --noinhibit-exec | FileCheck %s -check-prefix=CHECKGOT
+RUN: --output-filetype=atomic-yaml --noinhibit-exec | FileCheck %s -check-prefix=CHECKGOT
- name: __got_tls_extern_tls
CHECKGOT: type: got
diff --git a/test/elf/X86_64/initfini-option.test b/test/elf/X86_64/initfini-option.test
index a86f370..7f9458f 100644
--- a/test/elf/X86_64/initfini-option.test
+++ b/test/elf/X86_64/initfini-option.test
@@ -4,7 +4,7 @@
# in the output ELF.
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/initfini-option.o \
-RUN: -init init -fini fini --noinhibit-exec --output-filetype=yaml -o %t
+RUN: -init init -fini fini --noinhibit-exec --output-filetype=atomic-yaml -o %t
RUN: FileCheck %s < %t
CHECK: content: [ 00, 00, 00, 00, 00, 00, 00, 00 ]
diff --git a/test/elf/X86_64/initfini.test b/test/elf/X86_64/initfini.test
index d882352..cb039b9 100644
--- a/test/elf/X86_64/initfini.test
+++ b/test/elf/X86_64/initfini.test
@@ -4,7 +4,7 @@
# in the output ELF.
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/initfini.o \
-RUN: --noinhibit-exec --output-filetype=yaml -o %t
+RUN: --noinhibit-exec --output-filetype=atomic-yaml -o %t
RUN: FileCheck %s < %t
CHECK: - type: data
diff --git a/test/elf/X86_64/largebss.test b/test/elf/X86_64/largebss.test
index d2dde49..61d2fbe 100644
--- a/test/elf/X86_64/largebss.test
+++ b/test/elf/X86_64/largebss.test
@@ -3,7 +3,7 @@
# Any typeZeroFill content wouldn't have space reserved in the file to store
# its content
-RUN: lld -flavor gnu -target x86_64 %p/Inputs/largebss.o --output-filetype=yaml --noinhibit-exec | FileCheck %s
+RUN: lld -flavor gnu -target x86_64 %p/Inputs/largebss.o --output-filetype=atomic-yaml --noinhibit-exec | FileCheck %s
CHECK: - name: largecommon
CHECK: scope: global
diff --git a/test/elf/X86_64/multi-weak-layout.test b/test/elf/X86_64/multi-weak-layout.test
index 4bbf1df..593fc88 100644
--- a/test/elf/X86_64/multi-weak-layout.test
+++ b/test/elf/X86_64/multi-weak-layout.test
@@ -2,7 +2,7 @@
# properly
RUN: lld -flavor gnu -target x86_64 %p/Inputs/multiweaksyms.o \
-RUN: --noinhibit-exec -static --output-filetype=yaml -o %t
+RUN: --noinhibit-exec -static --output-filetype=atomic-yaml -o %t
RUN: FileCheck %s -check-prefix=WEAKSYMS < %t
WEAKSYMS: - type: data
diff --git a/test/elf/X86_64/multi-weak-override.test b/test/elf/X86_64/multi-weak-override.test
index f2d0e0c..ec3d654 100644
--- a/test/elf/X86_64/multi-weak-override.test
+++ b/test/elf/X86_64/multi-weak-override.test
@@ -3,7 +3,7 @@ RUN: lld -flavor gnu -target x86_64 %p/Inputs/multi-weak.o \
RUN: %p/Inputs/multi-ovrd.o -o %t -e main --noinhibit-exec
RUN: llvm-nm -n %t | FileCheck -check-prefix=WEAKORDER %s
RUN: lld -flavor gnu -target x86_64 %p/Inputs/multi-weak.o \
-RUN: %p/Inputs/multi-ovrd.o --output-filetype=yaml -o %t2 --noinhibit-exec
+RUN: %p/Inputs/multi-ovrd.o --output-filetype=atomic-yaml -o %t2 --noinhibit-exec
RUN: FileCheck -check-prefix=WEAKATOMSORDER %s < %t2
WEAKORDER: {{[0-9a-f]+}} T f
diff --git a/test/elf/X86_64/multi-weak-syms-order.test b/test/elf/X86_64/multi-weak-syms-order.test
index 2b41459..d5d2196 100644
--- a/test/elf/X86_64/multi-weak-syms-order.test
+++ b/test/elf/X86_64/multi-weak-syms-order.test
@@ -1,7 +1,7 @@
# Test for weak symbol getting overridden
RUN: lld -flavor gnu -target x86_64 %p/Inputs/multi-weak.o -o %t --noinhibit-exec
RUN: llvm-nm -n %t | FileCheck -check-prefix=WEAKORDER %s
-RUN: lld -flavor gnu -target x86_64 %p/Inputs/multi-weak.o -o %t2 --output-filetype=yaml --noinhibit-exec
+RUN: lld -flavor gnu -target x86_64 %p/Inputs/multi-weak.o -o %t2 --output-filetype=atomic-yaml --noinhibit-exec
RUN: FileCheck -check-prefix=WEAKATOMSORDER %s < %t2
WEAKORDER: {{[0-9a-f]+}} T fn
diff --git a/test/elf/X86_64/orderatoms-by-override.test b/test/elf/X86_64/orderatoms-by-override.test
index 200144b..caadea8 100644
--- a/test/elf/X86_64/orderatoms-by-override.test
+++ b/test/elf/X86_64/orderatoms-by-override.test
@@ -1,7 +1,7 @@
# This testcase tests the behaviour of the layoutpass so that the atoms that
# appear by their override take preference before proceeding to default behaviour
RUN: lld -flavor gnu -target x86_64 %p/Inputs/rwint.o \
-RUN: %p/Inputs/constint.o --output-filetype=yaml -o %t --noinhibit-exec
+RUN: %p/Inputs/constint.o --output-filetype=atomic-yaml -o %t --noinhibit-exec
RUN: FileCheck %s -check-prefix=CHECKORDER < %t
CHECKORDER: - name: b
diff --git a/test/elf/X86_64/sectionchoice.test b/test/elf/X86_64/sectionchoice.test
index 4034d8b..c067da2 100644
--- a/test/elf/X86_64/sectionchoice.test
+++ b/test/elf/X86_64/sectionchoice.test
@@ -1,6 +1,6 @@
# This tests that we are able to properly set the sectionChoice for DefinedAtoms
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/zerosizedsection.o \
-RUN: --noinhibit-exec -o %t --output-filetype=yaml
+RUN: --noinhibit-exec -o %t --output-filetype=atomic-yaml
RUN: FileCheck %s < %t
CHECK-NOT: section-choice: sectionCustomRequired
diff --git a/test/elf/X86_64/weak-override.test b/test/elf/X86_64/weak-override.test
index b68b449..7aea740 100644
--- a/test/elf/X86_64/weak-override.test
+++ b/test/elf/X86_64/weak-override.test
@@ -3,7 +3,7 @@ RUN: lld -flavor gnu -target x86_64 %p/Inputs/weak.o %p/Inputs/ovrd.o \
RUN: -o %t --noinhibit-exec
RUN: llvm-nm %t | FileCheck -check-prefix=WEAKORDER %s
RUN: lld -flavor gnu -target x86_64 %p/Inputs/weak.o \
-RUN: %p/Inputs/ovrd.o -o %t2 --output-filetype=yaml --noinhibit-exec
+RUN: %p/Inputs/ovrd.o -o %t2 --output-filetype=atomic-yaml --noinhibit-exec
RUN: FileCheck -check-prefix=WEAKATOMSORDER %s < %t2
WEAKORDER: {{[0-9a-c]+}} T f
diff --git a/test/elf/X86_64/weak-zero-sized.test b/test/elf/X86_64/weak-zero-sized.test
index 76e0510..a2db53e 100644
--- a/test/elf/X86_64/weak-zero-sized.test
+++ b/test/elf/X86_64/weak-zero-sized.test
@@ -3,7 +3,7 @@ RUN: lld -flavor gnu -target x86_64 %p/Inputs/weak-zero-sized.o -o %t \
RUN: --noinhibit-exec
RUN: llvm-nm %t | FileCheck -check-prefix=WEAKORDER %s
RUN: lld -flavor gnu -target x86_64 %p/Inputs/weak-zero-sized.o \
-RUN: --output-filetype=yaml -o %t2 --noinhibit-exec
+RUN: --output-filetype=atomic-yaml -o %t2 --noinhibit-exec
RUN: FileCheck -check-prefix=WEAKATOMSORDER %s < %t2
WEAKORDER: 004001a4 T _start
diff --git a/test/elf/X86_64/yamlinput.test b/test/elf/X86_64/yamlinput.test
index 3771bb2..b883fc1 100644
--- a/test/elf/X86_64/yamlinput.test
+++ b/test/elf/X86_64/yamlinput.test
@@ -2,7 +2,7 @@
# an input YAML from a previous link
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/initfini.o \
-RUN: --noinhibit-exec --output-filetype=yaml -o %t.objtxt
+RUN: --noinhibit-exec --output-filetype=atomic-yaml -o %t.objtxt
RUN: lld -flavor gnu -target x86_64-linux %t.objtxt \
RUN: --noinhibit-exec -o %t1
RUN: llvm-readobj -sections %t1 | FileCheck %s -check-prefix=SECTIONS
diff --git a/test/elf/abs-dup.objtxt b/test/elf/abs-dup.objtxt
index 7340a29..a3aadf5 100644
--- a/test/elf/abs-dup.objtxt
+++ b/test/elf/abs-dup.objtxt
@@ -1,6 +1,6 @@
# Tests handling an absolute symbol with no name
# RUN: lld -flavor gnu -target x86_64 -r %s \
-# RUN: --output-filetype=yaml | FileCheck %s
+# RUN: --output-filetype=atomic-yaml | FileCheck %s
absolute-atoms:
- name: abs
diff --git a/test/elf/abs.test b/test/elf/abs.test
index a48d6db..f5b5bc8 100644
--- a/test/elf/abs.test
+++ b/test/elf/abs.test
@@ -9,7 +9,7 @@
# built using: "gcc -m32"
#
-RUN: lld -flavor gnu --output-filetype=yaml -r %p/Inputs/abs-test.i386 | FileCheck -check-prefix=YAML %s
+RUN: lld -flavor gnu --output-filetype=atomic-yaml -r %p/Inputs/abs-test.i386 | FileCheck -check-prefix=YAML %s
YAML: absolute-atoms:
YAML: - name: absLocalSymbol
diff --git a/test/elf/allowduplicates.objtxt b/test/elf/allowduplicates.objtxt
index dbad3bd..73e522c 100644
--- a/test/elf/allowduplicates.objtxt
+++ b/test/elf/allowduplicates.objtxt
@@ -1,11 +1,11 @@
# RUN: lld -flavor gnu -target x86_64 --allow-multiple-definition %s \
-# RUN: --output-filetype=yaml --noinhibit-exec | FileCheck %s
+# RUN: --output-filetype=atomic-yaml --noinhibit-exec | FileCheck %s
#
-# RUN: not lld -flavor gnu -target x86_64 %s --output-filetype=yaml \
+# RUN: not lld -flavor gnu -target x86_64 %s --output-filetype=atomic-yaml \
# RUN: --noinhibit-exec 2>&1 | FileCheck -check-prefix=ERROR %s
#
# RUN: lld -flavor gnu -target x86_64 -z muldefs %s \
-# RUN: --noinhibit-exec --output-filetype=yaml | FileCheck %s
+# RUN: --noinhibit-exec --output-filetype=atomic-yaml | FileCheck %s
---
defined-atoms:
diff --git a/test/elf/archive-elf-forceload.test b/test/elf/archive-elf-forceload.test
index a0d1150..3d8a681 100644
--- a/test/elf/archive-elf-forceload.test
+++ b/test/elf/archive-elf-forceload.test
@@ -24,7 +24,7 @@
# gcc -c main.c fn.c fn1.c
RUN: lld -flavor gnu -target x86_64-linux -e main %p/Inputs/mainobj.x86_64 \
-RUN: --whole-archive %p/Inputs/libfnarchive.a --no-whole-archive --output-filetype=yaml \
+RUN: --whole-archive %p/Inputs/libfnarchive.a --no-whole-archive --output-filetype=atomic-yaml \
RUN: | FileCheck -check-prefix FORCELOAD %s
FORCELOAD: defined-atoms:
diff --git a/test/elf/archive-elf.test b/test/elf/archive-elf.test
index ba67746..a59ff1d 100644
--- a/test/elf/archive-elf.test
+++ b/test/elf/archive-elf.test
@@ -23,7 +23,7 @@
# }
# gcc -c main.c fn.c fn1.c
-RUN: lld -flavor gnu -target x86_64-linux --output-filetype=yaml -r \
+RUN: lld -flavor gnu -target x86_64-linux --output-filetype=atomic-yaml -r \
RUN: %p/Inputs/mainobj.x86_64 %p/Inputs/libfnarchive.a | \
RUN: FileCheck -check-prefix NOFORCELOAD %s
diff --git a/test/elf/branch.test b/test/elf/branch.test
index 5e0b4a5..9527a24 100644
--- a/test/elf/branch.test
+++ b/test/elf/branch.test
@@ -1,4 +1,4 @@
-RUN: lld -flavor gnu -target hexagon -static --output-filetype=yaml \
+RUN: lld -flavor gnu -target hexagon -static --output-filetype=atomic-yaml \
RUN: %p/Inputs/branch-test.hexagon %p/Inputs/target-test.hexagon --noinhibit-exec | FileCheck %s -check-prefix hexagon-yaml
RUN: lld -flavor gnu -target hexagon -e target -o %t1 \
RUN: %p/Inputs/branch-test.hexagon %p/Inputs/target-test.hexagon --noinhibit-exec
diff --git a/test/elf/check.test b/test/elf/check.test
index 50df23f..19fa609 100644
--- a/test/elf/check.test
+++ b/test/elf/check.test
@@ -1,9 +1,9 @@
# This tests the basic functionality of ordering data and functions as they
# appear in the inputs
-RUN: lld -flavor gnu -target i386 -e global_func --noinhibit-exec --output-filetype=yaml \
+RUN: lld -flavor gnu -target i386 -e global_func --noinhibit-exec --output-filetype=atomic-yaml \
RUN: %p/Inputs/object-test.elf-i386 -o %t
RUN: FileCheck %s -check-prefix ELF-i386 < %t
-RUN: lld -flavor gnu -target hexagon -e global_func --noinhibit-exec --output-filetype=yaml \
+RUN: lld -flavor gnu -target hexagon -e global_func --noinhibit-exec --output-filetype=atomic-yaml \
RUN: %p/Inputs/object-test.elf-hexagon -o %t1
RUN: FileCheck %s -check-prefix ELF-hexagon < %t1
diff --git a/test/elf/defsym.objtxt b/test/elf/defsym.objtxt
index e9c3922..ad15e7f 100644
--- a/test/elf/defsym.objtxt
+++ b/test/elf/defsym.objtxt
@@ -1,8 +1,8 @@
# RUN: lld -flavor gnu -target x86_64 --defsym=foo=0x1234 -r %s \
-# RUN: --output-filetype=yaml | FileCheck -check-prefix=ABS %s
+# RUN: --output-filetype=atomic-yaml | FileCheck -check-prefix=ABS %s
# RUN: lld -flavor gnu -target x86_64 --defsym=foo=main -r %s \
-# RUN: --output-filetype=yaml | FileCheck -check-prefix=ALIAS %s
+# RUN: --output-filetype=atomic-yaml | FileCheck -check-prefix=ALIAS %s
defined-atoms:
- name: main
diff --git a/test/elf/dynamic.test b/test/elf/dynamic.test
index 7ea6abe..76617fb 100644
--- a/test/elf/dynamic.test
+++ b/test/elf/dynamic.test
@@ -3,7 +3,7 @@ RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/use-shared.x86-64 \
RUN: %p/Inputs/shared.so-x86-64 -o %t -e main --allow-shlib-undefined \
RUN: -rpath /l1:/l2 -rpath /l3
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/use-shared.x86-64 \
-RUN: %p/Inputs/shared.so-x86-64 --output-filetype=yaml -o %t2 --allow-shlib-undefined \
+RUN: %p/Inputs/shared.so-x86-64 --output-filetype=atomic-yaml -o %t2 --allow-shlib-undefined \
RUN: --noinhibit-exec
RUN: llvm-objdump -p %t >> %t2
RUN: llvm-readobj -s -dyn-symbols -dynamic-table %t >> %t2
diff --git a/test/elf/gotpcrel.test b/test/elf/gotpcrel.test
index ae9cb7e..5eb4f71 100644
--- a/test/elf/gotpcrel.test
+++ b/test/elf/gotpcrel.test
@@ -1,5 +1,5 @@
# This test checks that GOTPCREL entries are being handled properly
-RUN: lld -flavor gnu -target x86_64-linux -static -e main --output-filetype=yaml \
+RUN: lld -flavor gnu -target x86_64-linux -static -e main --output-filetype=atomic-yaml \
RUN: --noinhibit-exec %p/Inputs/gotpcrel.x86-64 \
RUN: | FileCheck %s -check-prefix=YAML
diff --git a/test/elf/ifunc.test b/test/elf/ifunc.test
index 43da246..f86d064 100644
--- a/test/elf/ifunc.test
+++ b/test/elf/ifunc.test
@@ -1,9 +1,9 @@
# This test checks that IRELATIVE relocations are created for symbols that
# need relocation even for static links.
-RUN: lld -flavor gnu -target x86_64-linux --output-filetype=yaml -r \
+RUN: lld -flavor gnu -target x86_64-linux --output-filetype=atomic-yaml -r \
RUN: %p/Inputs/ifunc.x86-64 | FileCheck %s
-RUN: lld -flavor gnu -target x86_64-linux --output-filetype=yaml --noinhibit-exec \
+RUN: lld -flavor gnu -target x86_64-linux --output-filetype=atomic-yaml --noinhibit-exec \
RUN: %p/Inputs/ifunc.x86-64 %p/Inputs/ifunc.cpp.x86-64 \
RUN: | FileCheck %s --check-prefix=PLT
@@ -13,7 +13,7 @@ RUN: llvm-objdump -d -s %t| FileCheck %s --check-prefix=BIN
RUN: llvm-readobj -r %t | FileCheck %s --check-prefix=RELATIVEADDEND
# Test that STT_GNU_IFUNC symbols have type Code in SharedLibraryAtom.
-RUN: lld -flavor gnu -target x86_64-linux --output-filetype=yaml \
+RUN: lld -flavor gnu -target x86_64-linux --output-filetype=atomic-yaml \
RUN: --noinhibit-exec %p/Inputs/ifunc.cpp.x86-64 -L%p/Inputs -lifunc.x86-64 \
RUN: | FileCheck %s --check-prefix=SHARED
diff --git a/test/elf/init_array-order.test b/test/elf/init_array-order.test
index 1ebb24b..1ba5f5e 100644
--- a/test/elf/init_array-order.test
+++ b/test/elf/init_array-order.test
@@ -1,6 +1,6 @@
#RUN: yaml2obj -format=elf %s > %t
#RUN: lld -flavor gnu -target x86_64-linux %t --noinhibit-exec \
-#RUN: --output-filetype=yaml | FileCheck %s
+#RUN: --output-filetype=atomic-yaml | FileCheck %s
!ELF
FileHeader:
diff --git a/test/elf/mergeconstants.test b/test/elf/mergeconstants.test
index 3d06d2c..942a86b 100644
--- a/test/elf/mergeconstants.test
+++ b/test/elf/mergeconstants.test
@@ -1,5 +1,5 @@
# The test checks for mergeable strings that appear in the object file
-RUN: lld -flavor gnu --merge-strings --output-filetype=yaml -target x86_64 \
+RUN: lld -flavor gnu --merge-strings --output-filetype=atomic-yaml -target x86_64 \
RUN: %p/Inputs/constants-merge.x86-64 --noinhibit-exec \
RUN: | FileCheck -check-prefix=mergeAtoms %s
diff --git a/test/elf/mergeglobalatoms.test b/test/elf/mergeglobalatoms.test
index 06c0e07..aab0ab6 100644
--- a/test/elf/mergeglobalatoms.test
+++ b/test/elf/mergeglobalatoms.test
@@ -1,6 +1,6 @@
# ELF files can have mergeable strings which are global!, treat them as global
# defined atoms
-RUN: lld -flavor gnu --output-filetype=yaml %p/Inputs/globalconst.o.x86-64 \
+RUN: lld -flavor gnu --output-filetype=atomic-yaml %p/Inputs/globalconst.o.x86-64 \
RUN: --noinhibit-exec | FileCheck -check-prefix=globalatoms %s
globalatoms: - name: mystr
diff --git a/test/elf/quickdata.test b/test/elf/quickdata.test
index 433b77a..c2889ba 100644
--- a/test/elf/quickdata.test
+++ b/test/elf/quickdata.test
@@ -1,4 +1,4 @@
-RUN: lld -flavor gnu -target hexagon --output-filetype=yaml %p/Inputs/quickdata-test.elf-hexagon \
+RUN: lld -flavor gnu -target hexagon --output-filetype=atomic-yaml %p/Inputs/quickdata-test.elf-hexagon \
RUN: --noinhibit-exec | FileCheck %s -check-prefix hexagon
hexagon: - name: init
diff --git a/test/elf/reloc.test b/test/elf/reloc.test
index 0ecf0b1..7826e37 100644
--- a/test/elf/reloc.test
+++ b/test/elf/reloc.test
@@ -1,4 +1,4 @@
-RUN: lld -flavor gnu -target i386 --merge-strings -r --output-filetype=yaml \
+RUN: lld -flavor gnu -target i386 --merge-strings -r --output-filetype=atomic-yaml \
RUN: %p/Inputs/reloc-test.elf-i386 | FileCheck %s -check-prefix ELF-i386
ELF-i386: defined-atoms:
diff --git a/test/elf/roundtrip.test b/test/elf/roundtrip.test
index 0788c25..19f6784 100644
--- a/test/elf/roundtrip.test
+++ b/test/elf/roundtrip.test
@@ -4,7 +4,7 @@
# REQUIRES: asserts
RUN: lld -flavor gnu -target x86_64 %p/Inputs/foo.o.x86-64 --noinhibit-exec \
-RUN: --output-filetype=yaml -o %t1
+RUN: --output-filetype=atomic-yaml -o %t1
RUN: FileCheck %s < %t1
CHECK:path:{{.*}}.native
diff --git a/test/elf/tls.test b/test/elf/tls.test
index 0eb6393..b3ac0f8 100644
--- a/test/elf/tls.test
+++ b/test/elf/tls.test
@@ -1,6 +1,6 @@
# This tests verifies that TLS variables have correct offsets
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/tls.x86-64 -static \
-RUN: --output-filetype=yaml --noinhibit-exec | FileCheck %s -check-prefix=YAML
+RUN: --output-filetype=atomic-yaml --noinhibit-exec | FileCheck %s -check-prefix=YAML
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/tls.x86-64 -o %t \
RUN: --noinhibit-exec -e main -static && llvm-objdump -d %t | FileCheck %s
diff --git a/test/elf/x86-64-dynamic-relocs.test b/test/elf/x86-64-dynamic-relocs.test
index 325693e..1c47441 100644
--- a/test/elf/x86-64-dynamic-relocs.test
+++ b/test/elf/x86-64-dynamic-relocs.test
@@ -1,5 +1,5 @@
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/relocs-dynamic.x86-64 \
-RUN: --output-filetype=yaml --noinhibit-exec | FileCheck %s
+RUN: --output-filetype=atomic-yaml --noinhibit-exec | FileCheck %s
path: <linker-internal>
defined-atoms:
diff --git a/test/elf/x86-64-dynamic.test b/test/elf/x86-64-dynamic.test
index 64dfac6..45c501d 100644
--- a/test/elf/x86-64-dynamic.test
+++ b/test/elf/x86-64-dynamic.test
@@ -1,11 +1,11 @@
# Checks that linking an object file with a shared object creates the necessary
# PLT/GOT Entries
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/use-shared.x86-64 \
-RUN: %p/Inputs/shared.so-x86-64 --output-filetype=yaml -o %t1 --noinhibit-exec
+RUN: %p/Inputs/shared.so-x86-64 --output-filetype=atomic-yaml -o %t1 --noinhibit-exec
RUN: FileCheck %s < %t1
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/use-shared-32s.x86-64 \
-RUN: %p/Inputs/shared.so-x86-64 --output-filetype=yaml --noinhibit-exec \
+RUN: %p/Inputs/shared.so-x86-64 --output-filetype=atomic-yaml --noinhibit-exec \
RUN: | FileCheck %s --check-prefix=32S
// Don't check the GOT and PLT names as they are only present in assert builds.
diff --git a/test/elf/x86.test b/test/elf/x86.test
index 6b68837..2052d99 100644
--- a/test/elf/x86.test
+++ b/test/elf/x86.test
@@ -18,7 +18,7 @@
#
# Assembled with: "as --32"
-RUN: lld -flavor gnu -target i386 -e back --output-filetype=yaml %p/Inputs/reloc-xb.x86 %p/Inputs/reloc-xt.x86 | FileCheck %s -check-prefix x86-yaml
+RUN: lld -flavor gnu -target i386 -e back --output-filetype=atomic-yaml %p/Inputs/reloc-xb.x86 %p/Inputs/reloc-xt.x86 | FileCheck %s -check-prefix x86-yaml
x86-yaml: - name: back
x86-yaml: scope: global
diff --git a/test/elf/x86_64-kinds.test b/test/elf/x86_64-kinds.test
index 2844fc7..f60ee15 100644
--- a/test/elf/x86_64-kinds.test
+++ b/test/elf/x86_64-kinds.test
@@ -2,7 +2,7 @@ RUN: lld -flavor gnu -target x86_64-linux -o %t1 %p/Inputs/relocs.x86-64 \
RUN: -e _start -static
RUN: llvm-objdump -d %t1 | FileCheck %s -check-prefix=RELOCS
-RUN: lld -flavor gnu -target x86_64-linux --output-filetype=yaml -e _start -static \
+RUN: lld -flavor gnu -target x86_64-linux --output-filetype=atomic-yaml -e _start -static \
RUN: %p/Inputs/relocs.x86-64 | FileCheck %s -check-prefix=X86_64
RELOCS: ELF64-x86-64
diff --git a/test/mach-o/parse-aliases.yaml b/test/mach-o/parse-aliases.yaml
index 457ea58..4439a14 100644
--- a/test/mach-o/parse-aliases.yaml
+++ b/test/mach-o/parse-aliases.yaml
@@ -1,4 +1,4 @@
-# RUN: lld -flavor darwin -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s
+# RUN: lld -flavor darwin -arch x86_64 -r -output_filetype atomic-yaml %s | FileCheck %s
#
# Test multiple labels to same address parse into aliases.
#
diff --git a/test/mach-o/parse-cfstring32.yaml b/test/mach-o/parse-cfstring32.yaml
index 8f4b041..88e2bae 100644
--- a/test/mach-o/parse-cfstring32.yaml
+++ b/test/mach-o/parse-cfstring32.yaml
@@ -1,4 +1,4 @@
-# RUN: lld -flavor darwin -arch i386 -r -print_atoms %s -o %t | FileCheck %s
+# RUN: lld -flavor darwin -arch i386 -r -output_filetype atomic-yaml %s | FileCheck %s
#
# Test parsing of mach-o functions.
#
diff --git a/test/mach-o/parse-cfstring64.yaml b/test/mach-o/parse-cfstring64.yaml
index ebb02a7..ec13c85 100644
--- a/test/mach-o/parse-cfstring64.yaml
+++ b/test/mach-o/parse-cfstring64.yaml
@@ -1,4 +1,4 @@
-# RUN: lld -flavor darwin -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s
+# RUN: lld -flavor darwin -arch x86_64 -r -output_filetype atomic-yaml %s | FileCheck %s
#
# Test parsing of CFString constants.
#
diff --git a/test/mach-o/parse-compact-unwind32.yaml b/test/mach-o/parse-compact-unwind32.yaml
index ff613f0..1979671 100644
--- a/test/mach-o/parse-compact-unwind32.yaml
+++ b/test/mach-o/parse-compact-unwind32.yaml
@@ -1,4 +1,4 @@
-# RUN: lld -flavor darwin -arch i386 -r -print_atoms %s -o %t | FileCheck %s
+# RUN: lld -flavor darwin -arch i386 -r -output_filetype atomic-yaml %s | FileCheck %s
#
# Test parsing of __LD/__compact_unwind (compact unwind) section.
#
diff --git a/test/mach-o/parse-compact-unwind64.yaml b/test/mach-o/parse-compact-unwind64.yaml
index b61961a..d66c48e 100644
--- a/test/mach-o/parse-compact-unwind64.yaml
+++ b/test/mach-o/parse-compact-unwind64.yaml
@@ -1,4 +1,4 @@
-# RUN: lld -flavor darwin -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s
+# RUN: lld -flavor darwin -arch x86_64 -r -output_filetype atomic-yaml %s | FileCheck %s
#
# Test parsing of __LD/__compact_unwind (compact unwind) section.
#
diff --git a/test/mach-o/parse-data.yaml b/test/mach-o/parse-data.yaml
index 61d7729..8c139d1 100644
--- a/test/mach-o/parse-data.yaml
+++ b/test/mach-o/parse-data.yaml
@@ -1,4 +1,4 @@
-# RUN: lld -flavor darwin -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s
+# RUN: lld -flavor darwin -arch x86_64 -r -output_filetype atomic-yaml %s | FileCheck %s
#
# Test parsing of mach-o data symbols.
#
diff --git a/test/mach-o/parse-eh-frame.yaml b/test/mach-o/parse-eh-frame.yaml
index da143fe..af1748e 100644
--- a/test/mach-o/parse-eh-frame.yaml
+++ b/test/mach-o/parse-eh-frame.yaml
@@ -1,4 +1,4 @@
-# RUN: lld -flavor darwin -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s
+# RUN: lld -flavor darwin -arch x86_64 -r -output_filetype atomic-yaml %s | FileCheck %s
#
# Test parsing of __eh_frame (dwarf unwind) section.
#
diff --git a/test/mach-o/parse-function.yaml b/test/mach-o/parse-function.yaml
index 9054665..75d3cc8 100644
--- a/test/mach-o/parse-function.yaml
+++ b/test/mach-o/parse-function.yaml
@@ -1,5 +1,5 @@
-# RUN: lld -flavor darwin -arch x86_64 -r %s -o %t
-# RUN: lld -flavor darwin -arch x86_64 -r %t -print_atoms -o %t2 | FileCheck %s
+# RUN: lld -flavor darwin -arch x86_64 -r %s -o %t
+# RUN: lld -flavor darwin -arch x86_64 -r %t -output_filetype atomic-yaml | FileCheck %s
#
# Test parsing of mach-o functions.
#
diff --git a/test/mach-o/parse-initializers32.yaml b/test/mach-o/parse-initializers32.yaml
index ede7b90..a19dde8 100644
--- a/test/mach-o/parse-initializers32.yaml
+++ b/test/mach-o/parse-initializers32.yaml
@@ -1,4 +1,4 @@
-# RUN: lld -flavor darwin -arch i386 -r -print_atoms %s -o %t | FileCheck %s
+# RUN: lld -flavor darwin -arch i386 -r -output_filetype atomic-yaml %s | FileCheck %s
#
# Test parsing of literal sections.
#
diff --git a/test/mach-o/parse-initializers64.yaml b/test/mach-o/parse-initializers64.yaml
index d44ce1f..db3b9e4 100644
--- a/test/mach-o/parse-initializers64.yaml
+++ b/test/mach-o/parse-initializers64.yaml
@@ -1,4 +1,4 @@
-# RUN: lld -flavor darwin -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s
+# RUN: lld -flavor darwin -arch x86_64 -r -output_filetype atomic-yaml %s | FileCheck %s
#
# Test parsing of literal sections.
#
diff --git a/test/mach-o/parse-literals-error.yaml b/test/mach-o/parse-literals-error.yaml
index be21d6e..23ce291 100644
--- a/test/mach-o/parse-literals-error.yaml
+++ b/test/mach-o/parse-literals-error.yaml
@@ -1,4 +1,4 @@
-# RUN: not lld -flavor darwin -arch x86_64 -r -print_atoms %s -o %t 2> %t.err
+# RUN: not lld -flavor darwin -arch x86_64 -r -output_filetype atomic-yaml %s -o %t 2> %t.err
# RUN: FileCheck %s < %t.err
#
# Test for error if literal section is not correct size mulitple.
diff --git a/test/mach-o/parse-literals.yaml b/test/mach-o/parse-literals.yaml
index 24568ea..f9ae3c8 100644
--- a/test/mach-o/parse-literals.yaml
+++ b/test/mach-o/parse-literals.yaml
@@ -1,4 +1,4 @@
-# RUN: lld -flavor darwin -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s
+# RUN: lld -flavor darwin -arch x86_64 -r -output_filetype atomic-yaml %s | FileCheck %s
#
# Test parsing of literal sections.
#
diff --git a/test/mach-o/parse-non-lazy-pointers.yaml b/test/mach-o/parse-non-lazy-pointers.yaml
index afdf2e6..80ed196 100644
--- a/test/mach-o/parse-non-lazy-pointers.yaml
+++ b/test/mach-o/parse-non-lazy-pointers.yaml
@@ -1,4 +1,4 @@
-# RUN: lld -flavor darwin -arch i386 -r -print_atoms %s -o %t | FileCheck %s
+# RUN: lld -flavor darwin -arch i386 -r -output_filetype atomic-yaml %s | FileCheck %s
#
# Test parsing of non-lazy-pointer sections.
#
diff --git a/test/mach-o/parse-section-no-symbol.yaml b/test/mach-o/parse-section-no-symbol.yaml
index 46d005a..f529352 100644
--- a/test/mach-o/parse-section-no-symbol.yaml
+++ b/test/mach-o/parse-section-no-symbol.yaml
@@ -1,4 +1,4 @@
-# RUN: lld -flavor darwin -arch x86_64 -r %s -print_atoms -o %t2 | FileCheck %s
+# RUN: lld -flavor darwin -arch x86_64 -r %s -output_filetype atomic-yaml | FileCheck %s
#
# Test parsing of mach-o functions with no symbols at all.
#
diff --git a/test/mach-o/parse-tentative-defs.yaml b/test/mach-o/parse-tentative-defs.yaml
index fc75167..934babb 100644
--- a/test/mach-o/parse-tentative-defs.yaml
+++ b/test/mach-o/parse-tentative-defs.yaml
@@ -1,4 +1,4 @@
-# RUN: lld -flavor darwin -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s
+# RUN: lld -flavor darwin -arch x86_64 -r -output_filetype atomic-yaml %s | FileCheck %s
#
# Test parsing of tentative definitions, including size, scope, and alignment.
#
More information about the llvm-commits
mailing list