[lld] r200182 - Fix trailing whitespace.
Shankar Easwaran
shankare at codeaurora.org
Sun Jan 26 19:09:27 PST 2014
Author: shankare
Date: Sun Jan 26 21:09:26 2014
New Revision: 200182
URL: http://llvm.org/viewvc/llvm-project?rev=200182&view=rev
Log:
Fix trailing whitespace.
Modified:
lld/trunk/docs/C++11.rst
lld/trunk/docs/Driver.rst
lld/trunk/docs/Readers.rst
lld/trunk/docs/design.rst
lld/trunk/docs/llvm-theme/static/llvm.css
lld/trunk/lib/Core/CMakeLists.txt
lld/trunk/lib/Driver/DarwinLdDriver.cpp
lld/trunk/lib/Driver/GnuLdOptions.td
lld/trunk/lib/ReaderWriter/ELF/CreateELF.h
lld/trunk/lib/ReaderWriter/MachO/GOTPass.hpp
lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFile.h
lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h
lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
lld/trunk/lib/ReaderWriter/MachO/StubAtoms.hpp
lld/trunk/lib/ReaderWriter/MachO/WriterMachO.cpp
lld/trunk/lib/ReaderWriter/Reader.cpp
lld/trunk/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp
lld/trunk/test/Driver/undef-basic.objtxt
lld/trunk/test/core/absolute-basic.objtxt
lld/trunk/test/core/archive-chain.objtxt
lld/trunk/test/core/auto-hide-coalesce.objtxt
lld/trunk/test/core/constants-coalesce.objtxt
lld/trunk/test/core/cstring-coalesce.objtxt
lld/trunk/test/core/custom-section.objtxt
lld/trunk/test/core/dead-strip-basic.objtxt
lld/trunk/test/core/dead-strip-globals.objtxt
lld/trunk/test/core/error-atom-attribute.objtxt
lld/trunk/test/core/error-atom-content-byte-value.objtxt
lld/trunk/test/core/error-atom-content-bytes.objtxt
lld/trunk/test/core/error-atom-type.objtxt
lld/trunk/test/core/error-atom-undefined-wrong-attribue.objtxt
lld/trunk/test/core/error-file-attribute.objtxt
lld/trunk/test/core/fixups-addend.objtxt
lld/trunk/test/core/fixups-dup-named.objtxt
lld/trunk/test/core/fixups-named.objtxt
lld/trunk/test/core/fixups-unnamed.objtxt
lld/trunk/test/core/ingroup-test-big.objtxt
lld/trunk/test/core/ingroup-test-loop.objtxt
lld/trunk/test/core/ingroup-test-with-layout-after.objtxt
lld/trunk/test/core/ingroup-test.objtxt
lld/trunk/test/core/layoutafter-test.objtxt
lld/trunk/test/core/layoutbefore-test.objtxt
lld/trunk/test/core/pass-got-basic.objtxt
lld/trunk/test/core/pass-stubs-basic.objtxt
lld/trunk/test/core/permissions.objtxt
lld/trunk/test/core/section-position.objtxt
lld/trunk/test/core/shared-library-basic.objtxt
lld/trunk/test/core/shared-library-coalesce.objtxt
lld/trunk/test/core/undef-coalesce-error.objtxt
lld/trunk/test/core/undef-coalesce.objtxt
lld/trunk/test/darwin/hello-world.objtxt
lld/trunk/test/darwin/native-and-mach-o.objtxt
lld/trunk/test/elf/Hexagon/Inputs/dynobj.c
lld/trunk/test/elf/Hexagon/dynlib-gotoff.test
lld/trunk/test/elf/Hexagon/dynlib.test
lld/trunk/test/elf/Hexagon/hexagon-plt-setup.test
lld/trunk/test/elf/Hexagon/initfini-option.test
lld/trunk/test/elf/Hexagon/rela-order.test
lld/trunk/test/elf/Mips/dynlib-dynamic.test
lld/trunk/test/elf/Mips/dynlib-dynsym.test
lld/trunk/test/elf/Mips/dynlib-fileheader.test
lld/trunk/test/elf/Mips/got16.test
lld/trunk/test/elf/Mips/gotsym.test
lld/trunk/test/elf/Mips/hilo16-1.test
lld/trunk/test/elf/X86_64/dontignorezerosize-sections.test
lld/trunk/test/elf/X86_64/extern-tls.test
lld/trunk/test/elf/X86_64/initfini-option.test
lld/trunk/test/elf/X86_64/initfini.test
lld/trunk/test/elf/X86_64/layoutpass-order.test
lld/trunk/test/elf/X86_64/multi-weak-layout.test
lld/trunk/test/elf/X86_64/rodata.test
lld/trunk/test/elf/X86_64/sectionmap.test
lld/trunk/test/elf/X86_64/startGroupEndGroupWithDynlib.test
lld/trunk/test/elf/X86_64/weak-override.test
lld/trunk/test/elf/X86_64/weak-zero-sized.test
lld/trunk/test/elf/abs.test
lld/trunk/test/elf/archive-elf-forceload.test
lld/trunk/test/elf/branch.test
lld/trunk/test/elf/check.test
lld/trunk/test/elf/dynamic-undef.test
lld/trunk/test/elf/entry.objtxt
lld/trunk/test/elf/gotpcrel.test
lld/trunk/test/elf/hexagon-quickdata-sort.test
lld/trunk/test/elf/hexagon-quickdata-sortcommon.test
lld/trunk/test/elf/ifunc.test
lld/trunk/test/elf/mergeconstants.test
lld/trunk/test/elf/options/dynamic-linker.test
lld/trunk/test/elf/reloc.test
lld/trunk/test/elf/symbols.test
lld/trunk/test/elf/tls.test
lld/trunk/test/elf/tlsAddr.test
Modified: lld/trunk/docs/C++11.rst
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/docs/C%2B%2B11.rst?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/docs/C++11.rst (original)
+++ lld/trunk/docs/C++11.rst Sun Jan 26 21:09:26 2014
@@ -21,7 +21,7 @@ to omit (such as final or = delete) may
* Forward enum declarations
* Lambdas
* Local and unnamed types as template args
-* Trailing return type
+* Trailing return type
* nullptr
* >> instead of > >
* R-Value references excluding R-Value references for this
Modified: lld/trunk/docs/Driver.rst
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/docs/Driver.rst?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/docs/Driver.rst (original)
+++ lld/trunk/docs/Driver.rst Sun Jan 26 21:09:26 2014
@@ -23,7 +23,7 @@ Flavors
-------
Each of these different interfaces is referred to as a flavor. There is also an
-extra flavor "core" which is used to exercise the core functionality of the
+extra flavor "core" which is used to exercise the core functionality of the
linker it the test suite.
* gnu
@@ -51,7 +51,7 @@ Adding an Option to an existing Flavor
#. Add to :cpp:class:`lld::FlavorLinkingContext` a getter and setter method
for the option.
-
+
#. Modify :cpp:func:`lld::FlavorDriver::parse` in :file:
`lib/Driver/{Flavor}Driver.cpp` to call the targetInfo setter
for corresponding to the option.
@@ -66,7 +66,7 @@ Adding a Flavor
:cpp:class:`lld::UniversalDriver::Flavor`.
#. Add an entry in :file:`lib/Driver/UniversalDriver.cpp` to
- :cpp:func:`lld::Driver::strToFlavor` and
+ :cpp:func:`lld::Driver::strToFlavor` and
:cpp:func:`lld::UniversalDriver::link`.
This allows the flavor to be selected via symlink and :option:`-flavor`.
@@ -76,4 +76,4 @@ Adding a Flavor
must also be added to :file:`lib/Driver/CMakeLists.txt`.
#. Add a ``{flavor}Driver`` as a subclass of :cpp:class:`lld::Driver`
- in :file:`lib/Driver/{flavor}Driver.cpp`.
+ in :file:`lib/Driver/{flavor}Driver.cpp`.
Modified: lld/trunk/docs/Readers.rst
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/docs/Readers.rst?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/docs/Readers.rst (original)
+++ lld/trunk/docs/Readers.rst Sun Jan 26 21:09:26 2014
@@ -20,7 +20,7 @@ following pieces in order to fit into ll
.. cpp:class:: ReaderOptionsFoo : public ReaderOptions
- This Options class is the only way to configure how the Reader will
+ This Options class is the only way to configure how the Reader will
parse any file into an `lld::Reader`:cpp:class: object. This class
should be declared in the `lld`:cpp:class: namespace.
Modified: lld/trunk/docs/design.rst
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/docs/design.rst?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/docs/design.rst (original)
+++ lld/trunk/docs/design.rst Sun Jan 26 21:09:26 2014
@@ -46,20 +46,20 @@ There are only four different types of a
* DefinedAtom
95% of all atoms. This is a chunk of code or data
-
- * UndefinedAtom
+
+ * UndefinedAtom
This is a place holder in object files for a reference to some atom
outside the translation unit.During core linking it is usually replaced
by (coalesced into) another Atom.
-
+
* SharedLibraryAtom
- If a required symbol name turns out to be defined in a dynamic shared
- library (and not some object file). A SharedLibraryAtom is the
+ If a required symbol name turns out to be defined in a dynamic shared
+ library (and not some object file). A SharedLibraryAtom is the
placeholder Atom used to represent that fact.
-
- It is similar to an UndefinedAtom, but it also tracks information
+
+ It is similar to an UndefinedAtom, but it also tracks information
about the associated shared library.
-
+
* AbsoluteAtom
This is for embedded support where some stuff is implemented in ROM at
some fixed address. This atom has no content. It is just an address
@@ -112,7 +112,7 @@ instantiated by the by the reader which
Linking Steps
-------------
-Through the use of abstract Atoms, the core of linking is architecture
+Through the use of abstract Atoms, the core of linking is architecture
independent and file format independent. All command line parsing is factored
out into a separate "options" abstraction which enables the linker to be driven
with different command line sets.
@@ -136,27 +136,27 @@ they have no notion of file formats such
Input Files
~~~~~~~~~~~
-Existing developer tools using different file formats for object files.
+Existing developer tools using different file formats for object files.
A goal of lld is to be file format independent. This is done
through a plug-in model for reading object files. The lld::Reader is the base
class for all object file readers. A Reader follows the factory method pattern.
A Reader instantiates an lld::File object (which is a graph of Atoms) from a
given object file (on disk or in-memory).
-Every Reader subclass defines its own "options" class (for instance the mach-o
-Reader defines the class ReaderOptionsMachO). This options class is the
+Every Reader subclass defines its own "options" class (for instance the mach-o
+Reader defines the class ReaderOptionsMachO). This options class is the
one-and-only way to control how the Reader operates when parsing an input file
into an Atom graph. For instance, you may want the Reader to only accept
certain architectures. The options class can be instantiated from command
-line options, or it can be subclassed and the ivars programmatically set.
+line options, or it can be subclassed and the ivars programmatically set.
Resolving
~~~~~~~~~
-The resolving step takes all the atoms' graphs from each object file and
-combines them into one master object graph. Unfortunately, it is not as simple
-as appending the atom list from each file into one big list. There are many
+The resolving step takes all the atoms' graphs from each object file and
+combines them into one master object graph. Unfortunately, it is not as simple
+as appending the atom list from each file into one big list. There are many
cases where atoms need to be coalesced. That is, two or more atoms need to be
coalesced into one atom. This is necessary to support: C language "tentative
definitions", C++ weak symbols for templates and inlines defined in headers,
@@ -241,30 +241,30 @@ object. The writer's job is to create t
place the content of the atoms into it.
lld uses a plug-in model for writing output files. All concrete writers (e.g.
-ELF, mach-o, etc) are subclasses of the lld::Writer class.
+ELF, mach-o, etc) are subclasses of the lld::Writer class.
Unlike the Reader class which has just one method to instantiate an lld::File,
-the Writer class has multiple methods. The crucial method is to generate the
+the Writer class has multiple methods. The crucial method is to generate the
output file, but there are also methods which allow the Writer to contribute
-Atoms to the resolver and specify passes to run.
+Atoms to the resolver and specify passes to run.
An example of contributing
atoms is that if the Writer knows a main executable is being linked and such
an executable requires a specially named entry point (e.g. "_main"), the Writer
-can add an UndefinedAtom with that special name to the resolver. This will
-cause the resolver to issue an error if that symbol is not defined.
+can add an UndefinedAtom with that special name to the resolver. This will
+cause the resolver to issue an error if that symbol is not defined.
Sometimes a Writer supports lazily created symbols, such as names for the start
-of sections. To support this, the Writer can create a File object which vends
-no initial atoms, but does lazily supply atoms by name as needed.
+of sections. To support this, the Writer can create a File object which vends
+no initial atoms, but does lazily supply atoms by name as needed.
-Every Writer subclass defines its own "options" class (for instance the mach-o
-Writer defines the class WriterOptionsMachO). This options class is the
-one-and-only way to control how the Writer operates when producing an output
+Every Writer subclass defines its own "options" class (for instance the mach-o
+Writer defines the class WriterOptionsMachO). This options class is the
+one-and-only way to control how the Writer operates when producing an output
file from an Atom graph. For instance, you may want the Writer to optimize
-the output for certain OS versions, or strip local symbols, etc. The options
-class can be instantiated from command line options, or it can be subclassed
-and the ivars programmatically set.
+the output for certain OS versions, or strip local symbols, etc. The options
+class can be instantiated from command line options, or it can be subclassed
+and the ivars programmatically set.
lld::File representations
@@ -317,11 +317,11 @@ updated to do its best to model (the lac
data in existing native object files.
With this model for the native file format, files can be read and turned
-into the in-memory graph of lld::Atoms with just a few memory allocations.
+into the in-memory graph of lld::Atoms with just a few memory allocations.
And the format can easily adapt over time to new features.
-The binary file format follows the ReaderWriter patterns used in lld. The lld
-library comes with the classes: ReaderNative and WriterNative. So, switching
+The binary file format follows the ReaderWriter patterns used in lld. The lld
+library comes with the classes: ReaderNative and WriterNative. So, switching
between file formats is as easy as switching which Reader subclass is used.
@@ -335,7 +335,7 @@ that those can be omitted from the text
simple hello world program expressed in YAML::
target-triple: x86_64-apple-darwin11
-
+
atoms:
- name: _main
scope: global
@@ -349,10 +349,10 @@ simple hello world program expressed in
- offset: 0E
kind: call32
target: _fprintf
-
+
- type: c-string
content: [ 73, 5A, 00 ]
-
+
...
The biggest use for the textual format will be writing test cases. Writing test
@@ -362,8 +362,8 @@ feature trying to be tested. By writing
format, we can exactly specify every attribute of every atom and thus target
specific linker logic.
-The textual/YAML format follows the ReaderWriter patterns used in lld. The lld
-library comes with the classes: ReaderYAML and WriterYAML.
+The textual/YAML format follows the ReaderWriter patterns used in lld. The lld
+library comes with the classes: ReaderYAML and WriterYAML.
Testing
@@ -397,11 +397,11 @@ undefined atom from one file will be rep
file::
# RUN: lld-core %s | FileCheck %s
-
+
#
# Test that undefined atoms are replaced with defined atoms.
#
-
+
---
atoms:
- name: foo
@@ -412,7 +412,7 @@ file::
scope: global
type: code
...
-
+
# CHECK: name: foo
# CHECK: scope: global
# CHECK: type: code
Modified: lld/trunk/docs/llvm-theme/static/llvm.css
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/docs/llvm-theme/static/llvm.css?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/docs/llvm-theme/static/llvm.css (original)
+++ lld/trunk/docs/llvm-theme/static/llvm.css Sun Jan 26 21:09:26 2014
@@ -140,7 +140,7 @@ div.footer a {
/* -- body styles ----------------------------------------------------------- */
-p {
+p {
margin: 0.8em 0 0.5em 0;
}
Modified: lld/trunk/lib/Core/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/CMakeLists.txt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/lib/Core/CMakeLists.txt (original)
+++ lld/trunk/lib/Core/CMakeLists.txt Sun Jan 26 21:09:26 2014
@@ -11,7 +11,7 @@ add_lld_library(lldCore
SymbolTable.cpp
)
-target_link_libraries(lldCore
+target_link_libraries(lldCore
lldNative
lldYAML
)
Modified: lld/trunk/lib/Driver/DarwinLdDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/DarwinLdDriver.cpp?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/lib/Driver/DarwinLdDriver.cpp (original)
+++ lld/trunk/lib/Driver/DarwinLdDriver.cpp Sun Jan 26 21:09:26 2014
@@ -251,7 +251,7 @@ bool DarwinLdDriver::parse(int argc, con
}
}
- // Handle -mllvm
+ // Handle -mllvm
for (llvm::opt::arg_iterator it = parsedArgs->filtered_begin(OPT_mllvm),
ie = parsedArgs->filtered_end();
it != ie; ++it) {
Modified: lld/trunk/lib/Driver/GnuLdOptions.td
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/GnuLdOptions.td?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/lib/Driver/GnuLdOptions.td (original)
+++ lld/trunk/lib/Driver/GnuLdOptions.td Sun Jan 26 21:09:26 2014
@@ -189,7 +189,7 @@ def use_shlib_undefs: Flag<["--"], "use-
Group<grp_resolveropt>;
//===----------------------------------------------------------------------===//
-/// Custom Options
+/// Custom Options
//===----------------------------------------------------------------------===//
def grp_customopts : OptionGroup<"opts">,
HelpText<"CUSTOM OPTIONS">;
Modified: lld/trunk/lib/ReaderWriter/ELF/CreateELF.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/CreateELF.h?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/CreateELF.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/CreateELF.h Sun Jan 26 21:09:26 2014
@@ -99,7 +99,7 @@ typename Traits::result_type createELF(
LLVM_CREATE_ELF_IMPL(std::forward<T1>(t1), std::forward<T2>(t2),
std::forward<T3>(t3))
}
-
+
template <class Traits, class T1, class T2, class T3, class T4>
typename Traits::result_type createELF(
std::pair<unsigned char, unsigned char> ident, std::size_t maxAlignment,
Modified: lld/trunk/lib/ReaderWriter/MachO/GOTPass.hpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/GOTPass.hpp?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/GOTPass.hpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/GOTPass.hpp Sun Jan 26 21:09:26 2014
@@ -34,18 +34,18 @@ public:
}
virtual void updateReferenceToGOT(const Reference*, bool targetIsNowGOT) {
-
+
}
virtual const DefinedAtom* makeGOTEntry(const Atom&) {
return nullptr;
}
-
+
};
-} // namespace mach_o
-} // namespace lld
+} // namespace mach_o
+} // namespace lld
#endif // LLD_READER_WRITER_MACHO_GOT_PASS_H
Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFile.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFile.h?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFile.h (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFile.h Sun Jan 26 21:09:26 2014
@@ -10,34 +10,34 @@
///
/// \file These data structures comprise the "normalized" view of
/// mach-o object files. The normalized view is an in-memory only data structure
-/// which is always in native endianness and pointer size.
-///
-/// The normalized view easily converts to and from YAML using YAML I/O.
+/// which is always in native endianness and pointer size.
+///
+/// The normalized view easily converts to and from YAML using YAML I/O.
///
/// The normalized view converts to and from binary mach-o object files using
/// the writeBinary() and readBinary() functions.
///
-/// The normalized view converts to and from lld::Atoms using the
+/// The normalized view converts to and from lld::Atoms using the
/// normalizedToAtoms() and normalizedFromAtoms().
///
/// Overall, the conversion paths available look like:
///
-/// +---------------+
-/// | binary mach-o |
-/// +---------------+
+/// +---------------+
+/// | binary mach-o |
+/// +---------------+
/// ^
/// |
/// v
-/// +------------+ +------+
-/// | normalized | <-> | yaml |
-/// +------------+ +------+
+/// +------------+ +------+
+/// | normalized | <-> | yaml |
+/// +------------+ +------+
/// ^
/// |
/// v
-/// +-------+
+/// +-------+
/// | Atoms |
-/// +-------+
-///
+/// +-------+
+///
#include "lld/Core/Error.h"
#include "lld/Core/LLVM.h"
@@ -76,9 +76,9 @@ namespace normalized {
/// encoded in one of two different bit-field patterns. This
/// normalized form has the union of all possible fields.
struct Relocation {
- Relocation() : offset(0), scattered(false),
- type(llvm::MachO::GENERIC_RELOC_VANILLA),
- length(0), pcRel(false), isExtern(false), value(0),
+ Relocation() : offset(0), scattered(false),
+ type(llvm::MachO::GENERIC_RELOC_VANILLA),
+ length(0), pcRel(false), isExtern(false), value(0),
symbol(0) { }
Hex32 offset;
@@ -106,7 +106,7 @@ LLVM_YAML_STRONG_TYPEDEF(uint32_t, Secti
/// Mach-O has a 32-bit and 64-bit section record. This normalized form
/// can support either kind.
struct Section {
- Section() : type(llvm::MachO::S_REGULAR),
+ Section() : type(llvm::MachO::S_REGULAR),
attributes(0), alignment(0), address(0) { }
StringRef segmentName;
@@ -129,7 +129,7 @@ LLVM_YAML_STRONG_TYPEDEF(uint16_t, Symbo
/// Mach-O has a 32-bit and 64-bit symbol table entry (nlist), and the symbol
/// type and scope and mixed in the same n_type field. This normalized form
-/// works for any pointer size and separates out the type and scope.
+/// works for any pointer size and separates out the type and scope.
struct Symbol {
Symbol() : type(llvm::MachO::N_UNDF), scope(0), sect(0), desc(0), value(0) { }
@@ -195,25 +195,25 @@ struct Export {
/// A typedef so that YAML I/O can encode/decode mach_header.flags.
LLVM_YAML_STRONG_TYPEDEF(uint32_t, FileFlags);
-///
+///
struct NormalizedFile {
- NormalizedFile() : arch(MachOLinkingContext::arch_unknown),
+ NormalizedFile() : arch(MachOLinkingContext::arch_unknown),
fileType(llvm::MachO::MH_OBJECT),
- flags(0),
- hasUUID(false),
+ flags(0),
+ hasUUID(false),
os(MachOLinkingContext::OS::unknown) { }
-
+
MachOLinkingContext::Arch arch;
HeaderFileType fileType;
FileFlags flags;
std::vector<Segment> segments; // Not used in object files.
std::vector<Section> sections;
-
+
// Symbols sorted by kind.
std::vector<Symbol> localSymbols;
std::vector<Symbol> globalSymbols;
std::vector<Symbol> undefinedSymbols;
-
+
// Maps to load commands with no LINKEDIT content (final linked images only).
std::vector<DependentDylib> dependentDylibs;
StringRef installName;
@@ -224,20 +224,20 @@ struct NormalizedFile {
Hex64 sourceVersion;
Hex32 minOSverson;
Hex32 sdkVersion;
-
+
// Maps to load commands with LINKEDIT content (final linked images only).
std::vector<RebaseLocation> rebasingInfo;
std::vector<BindLocation> bindingInfo;
std::vector<BindLocation> weakBindingInfo;
std::vector<BindLocation> lazyBindingInfo;
std::vector<Export> exportInfo;
-
+
// TODO:
// code-signature
// split-seg-info
// function-starts
// data-in-code
-
+
// For any allocations in this struct which need to be owned by this struct.
BumpPtrAllocator ownedAllocations;
};
@@ -249,28 +249,28 @@ readBinary(std::unique_ptr<MemoryBuffer>
const MachOLinkingContext::Arch arch);
/// Takes in-memory normalized view and writes a mach-o object file.
-error_code
+error_code
writeBinary(const NormalizedFile &file, StringRef path);
size_t headerAndLoadCommandsSize(const NormalizedFile &file);
/// Parses a yaml encoded mach-o file to produce an in-memory normalized view.
-ErrorOr<std::unique_ptr<NormalizedFile>>
+ErrorOr<std::unique_ptr<NormalizedFile>>
readYaml(std::unique_ptr<MemoryBuffer> &mb);
/// Writes a yaml encoded mach-o files given an in-memory normalized view.
-error_code
+error_code
writeYaml(const NormalizedFile &file, raw_ostream &out);
/// Takes in-memory normalized dylib or object and parses it into lld::File
ErrorOr<std::unique_ptr<lld::File>>
-normalizedToAtoms(const NormalizedFile &normalizedFile, StringRef path,
+normalizedToAtoms(const NormalizedFile &normalizedFile, StringRef path,
bool copyRefs);
/// Takes atoms and generates a normalized macho-o view.
-ErrorOr<std::unique_ptr<NormalizedFile>>
+ErrorOr<std::unique_ptr<NormalizedFile>>
normalizedFromAtoms(const lld::File &atomFile, const MachOLinkingContext &ctxt);
Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp Sun Jan 26 21:09:26 2014
@@ -50,9 +50,9 @@ namespace mach_o {
namespace normalized {
// Utility to call a lambda expression on each load command.
-static error_code
+static error_code
forEachLoadCommand(StringRef lcRange, unsigned lcCount, bool swap, bool is64,
- std::function<bool (uint32_t cmd, uint32_t size,
+ std::function<bool (uint32_t cmd, uint32_t size,
const char* lc)> func) {
const char* p = lcRange.begin();
for (unsigned i=0; i < lcCount; ++i) {
@@ -66,25 +66,25 @@ forEachLoadCommand(StringRef lcRange, un
}
if ( (p + slc->cmdsize) > lcRange.end() )
return llvm::make_error_code(llvm::errc::executable_format_error);
-
+
if (func(slc->cmd, slc->cmdsize, p))
return error_code::success();
-
+
p += slc->cmdsize;
- }
-
+ }
+
return error_code::success();
}
-static error_code
-appendRelocations(Relocations &relocs, StringRef buffer, bool swap,
+static error_code
+appendRelocations(Relocations &relocs, StringRef buffer, bool swap,
bool bigEndian, uint32_t reloff, uint32_t nreloc) {
if ((reloff + nreloc*8) > buffer.size())
return llvm::make_error_code(llvm::errc::executable_format_error);
- const any_relocation_info* relocsArray =
+ const any_relocation_info* relocsArray =
reinterpret_cast<const any_relocation_info*>(buffer.begin()+reloff);
-
+
for(uint32_t i=0; i < nreloc; ++i) {
relocs.push_back(unpackRelocation(relocsArray[i], swap, bigEndian));
}
@@ -186,27 +186,27 @@ readBinary(std::unique_ptr<MemoryBuffer>
// Walk load commands looking for segments/sections and the symbol table.
- error_code ec = forEachLoadCommand(lcRange, lcCount, swap, is64,
+ error_code ec = forEachLoadCommand(lcRange, lcCount, swap, is64,
[&] (uint32_t cmd, uint32_t size, const char* lc) -> bool {
if (is64) {
if (cmd == LC_SEGMENT_64) {
- const segment_command_64 *seg =
+ const segment_command_64 *seg =
reinterpret_cast<const segment_command_64*>(lc);
const unsigned sectionCount = (swap ? SwapByteOrder(seg->nsects)
: seg->nsects);
const section_64 *sects = reinterpret_cast<const section_64*>
(lc + sizeof(segment_command_64));
- const unsigned lcSize = sizeof(segment_command_64)
+ const unsigned lcSize = sizeof(segment_command_64)
+ sectionCount*sizeof(section_64);
// Verify sections don't extend beyond end of segment load command.
- if (lcSize > size)
+ if (lcSize > size)
return llvm::make_error_code(llvm::errc::executable_format_error);
for (unsigned i=0; i < sectionCount; ++i) {
const section_64 *sect = §s[i];
Section section;
section.segmentName = getString16(sect->segname);
section.sectionName = getString16(sect->sectname);
- section.type = (SectionType)(read32(swap, sect->flags)
+ section.type = (SectionType)(read32(swap, sect->flags)
& SECTION_TYPE);
section.attributes = read32(swap, sect->flags) & SECTION_ATTRIBUTES;
section.alignment = read32(swap, sect->align);
@@ -217,31 +217,31 @@ readBinary(std::unique_ptr<MemoryBuffer>
// Note: this assign() is copying the content bytes. Ideally,
// we can use a custom allocator for vector to avoid the copy.
section.content = llvm::makeArrayRef(content, contentSize);
- appendRelocations(section.relocations, mb->getBuffer(),
- swap, isBigEndianArch, read32(swap, sect->reloff),
+ appendRelocations(section.relocations, mb->getBuffer(),
+ swap, isBigEndianArch, read32(swap, sect->reloff),
read32(swap, sect->nreloc));
f->sections.push_back(section);
}
}
} else {
if (cmd == LC_SEGMENT) {
- const segment_command *seg =
+ const segment_command *seg =
reinterpret_cast<const segment_command*>(lc);
const unsigned sectionCount = (swap ? SwapByteOrder(seg->nsects)
: seg->nsects);
const section *sects = reinterpret_cast<const section*>
(lc + sizeof(segment_command));
- const unsigned lcSize = sizeof(segment_command)
+ const unsigned lcSize = sizeof(segment_command)
+ sectionCount*sizeof(section);
// Verify sections don't extend beyond end of segment load command.
- if (lcSize > size)
+ if (lcSize > size)
return llvm::make_error_code(llvm::errc::executable_format_error);
for (unsigned i=0; i < sectionCount; ++i) {
const section *sect = §s[i];
Section section;
section.segmentName = getString16(sect->segname);
section.sectionName = getString16(sect->sectname);
- section.type = (SectionType)(read32(swap, sect->flags)
+ section.type = (SectionType)(read32(swap, sect->flags)
& SECTION_TYPE);
section.attributes = read32(swap, sect->flags) & SECTION_ATTRIBUTES;
section.alignment = read32(swap, sect->align);
@@ -252,8 +252,8 @@ readBinary(std::unique_ptr<MemoryBuffer>
// Note: this assign() is copying the content bytes. Ideally,
// we can use a custom allocator for vector to avoid the copy.
section.content = llvm::makeArrayRef(content, contentSize);
- appendRelocations(section.relocations, mb->getBuffer(),
- swap, isBigEndianArch, read32(swap, sect->reloff),
+ appendRelocations(section.relocations, mb->getBuffer(),
+ swap, isBigEndianArch, read32(swap, sect->reloff),
read32(swap, sect->nreloc));
f->sections.push_back(section);
}
@@ -264,7 +264,7 @@ readBinary(std::unique_ptr<MemoryBuffer>
const char *strings = start + read32(swap, st->stroff);
const uint32_t strSize = read32(swap, st->strsize);
// Validate string pool and symbol table all in buffer.
- if ( read32(swap, st->stroff)+read32(swap, st->strsize)
+ if ( read32(swap, st->stroff)+read32(swap, st->strsize)
> objSize )
return llvm::make_error_code(llvm::errc::executable_format_error);
if (is64) {
@@ -282,7 +282,7 @@ readBinary(std::unique_ptr<MemoryBuffer>
tempSym = *sin; swapStruct(tempSym); sin = &tempSym;
}
Symbol sout;
- if (sin->n_strx > strSize)
+ if (sin->n_strx > strSize)
return llvm::make_error_code(llvm::errc::executable_format_error);
sout.name = &strings[sin->n_strx];
sout.type = (NListType)(sin->n_type & N_TYPE);
@@ -297,7 +297,7 @@ readBinary(std::unique_ptr<MemoryBuffer>
else
f->localSymbols.push_back(sout);
}
- } else {
+ } else {
const uint32_t symOffset = read32(swap, st->symoff);
const uint32_t symCount = read32(swap, st->nsyms);
if ( symOffset+(symCount*sizeof(nlist)) > objSize)
@@ -312,7 +312,7 @@ readBinary(std::unique_ptr<MemoryBuffer>
tempSym = *sin; swapStruct(tempSym); sin = &tempSym;
}
Symbol sout;
- if (sin->n_strx > strSize)
+ if (sin->n_strx > strSize)
return llvm::make_error_code(llvm::errc::executable_format_error);
sout.name = &strings[sin->n_strx];
sout.type = (NListType)(sin->n_type & N_TYPE);
@@ -329,12 +329,12 @@ readBinary(std::unique_ptr<MemoryBuffer>
}
}
} else if (cmd == LC_DYSYMTAB) {
- // TODO: indirect symbols
+ // TODO: indirect symbols
}
return false;
});
- if (ec)
+ if (ec)
return ec;
return std::move(f);
Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h Sun Jan 26 21:09:26 2014
@@ -194,30 +194,30 @@ inline uint64_t read64(bool swap, uint64
-inline uint32_t
-bitFieldExtract(uint32_t value, bool isBigEndianBigField, uint8_t firstBit,
+inline uint32_t
+bitFieldExtract(uint32_t value, bool isBigEndianBigField, uint8_t firstBit,
uint8_t bitCount) {
- const uint32_t mask = ((1<<bitCount)-1);
+ const uint32_t mask = ((1<<bitCount)-1);
const uint8_t shift = isBigEndianBigField ? (32-firstBit-bitCount) : firstBit;
return (value >> shift) & mask;
}
-inline void
-bitFieldSet(uint32_t &bits, bool isBigEndianBigField, uint32_t newBits,
+inline void
+bitFieldSet(uint32_t &bits, bool isBigEndianBigField, uint32_t newBits,
uint8_t firstBit, uint8_t bitCount) {
- const uint32_t mask = ((1<<bitCount)-1);
+ const uint32_t mask = ((1<<bitCount)-1);
assert((newBits & mask) == newBits);
const uint8_t shift = isBigEndianBigField ? (32-firstBit-bitCount) : firstBit;
bits &= ~(mask << shift);
bits |= (newBits << shift);
}
-inline Relocation
-unpackRelocation(const llvm::MachO::any_relocation_info &r, bool swap,
+inline Relocation
+unpackRelocation(const llvm::MachO::any_relocation_info &r, bool swap,
bool isBigEndian) {
uint32_t r0 = read32(swap, r.r_word0);
uint32_t r1 = read32(swap, r.r_word1);
-
+
Relocation result;
if (r0 & llvm::MachO::R_SCATTERED) {
// scattered relocation record always laid out like big endian bit field
@@ -242,14 +242,14 @@ unpackRelocation(const llvm::MachO::any_
result.symbol = bitFieldExtract(r1, isBigEndian, 0, 24);
}
return result;
-}
+}
-inline llvm::MachO::any_relocation_info
+inline llvm::MachO::any_relocation_info
packRelocation(const Relocation &r, bool swap, bool isBigEndian) {
uint32_t r0 = 0;
uint32_t r1 = 0;
-
+
if (r.scattered) {
r1 = r.value;
bitFieldSet(r0, true, r.offset, 8, 24);
@@ -265,12 +265,12 @@ packRelocation(const Relocation &r, bool
bitFieldSet(r1, isBigEndian, r.pcRel, 24, 1);
bitFieldSet(r1, isBigEndian, r.symbol, 0, 24);
}
-
+
llvm::MachO::any_relocation_info result;
result.r_word0 = swap ? SwapByteOrder(r0) : r0;
result.r_word1 = swap ? SwapByteOrder(r1) : r1;
return result;
-}
+}
inline StringRef getString16(const char s[16]) {
StringRef x = s;
Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp Sun Jan 26 21:09:26 2014
@@ -8,18 +8,18 @@
//===----------------------------------------------------------------------===//
///
-/// \file For mach-o object files, this implementation converts normalized
+/// \file For mach-o object files, this implementation converts normalized
/// mach-o in memory to mach-o binary on disk.
///
-/// +---------------+
-/// | binary mach-o |
-/// +---------------+
+/// +---------------+
+/// | binary mach-o |
+/// +---------------+
/// ^
/// |
/// |
-/// +------------+
-/// | normalized |
-/// +------------+
+/// +------------+
+/// | normalized |
+/// +------------+
#include "MachONormalizedFile.h"
#include "MachONormalizedFileBinaryUtils.h"
@@ -51,7 +51,7 @@ namespace mach_o {
namespace normalized {
/// Utility class for writing a mach-o binary file given an in-memory
-/// normalized file.
+/// normalized file.
class MachOFileLayout {
public:
/// All layout computation is done in the constructor.
@@ -60,11 +60,11 @@ public:
/// Returns the final file size as computed in the constructor.
size_t size() const;
- /// Writes the normalized file as a binary mach-o file to the specified
+ /// Writes the normalized file as a binary mach-o file to the specified
/// path. This does not have a stream interface because the generated
/// file may need the 'x' bit set.
error_code writeBinary(StringRef path);
-
+
private:
uint32_t loadCommandsSize(uint32_t &count);
void buildFileOffsets();
@@ -101,7 +101,7 @@ private:
typedef llvm::MachO::section section;
enum { LC = llvm::MachO::LC_SEGMENT };
};
-
+
template <typename T>
error_code writeSingleSegmentLoadCommand(uint8_t *&lc);
template <typename T>
@@ -109,7 +109,7 @@ private:
uint32_t pointerAlign(uint32_t value);
static StringRef dyldPath();
-
+
class ByteBuffer {
public:
ByteBuffer() : _ostream(_bytes) { }
@@ -141,7 +141,7 @@ private:
// Stream ivar must be after SmallVector ivar to construct properly.
llvm::raw_svector_ostream _ostream;
};
-
+
struct SegExtraInfo {
uint32_t fileOffset;
@@ -152,7 +152,7 @@ private:
uint32_t fileOffset;
};
typedef std::map<const Section*, SectionExtraInfo> SectionMap;
-
+
const NormalizedFile &_file;
error_code _ec;
uint8_t *_buffer;
@@ -207,19 +207,19 @@ StringRef MachOFileLayout::dyldPath() {
uint32_t MachOFileLayout::pointerAlign(uint32_t value) {
return llvm::RoundUpToAlignment(value, _is64 ? 8 : 4);
-}
+}
-
-MachOFileLayout::MachOFileLayout(const NormalizedFile &file)
+
+MachOFileLayout::MachOFileLayout(const NormalizedFile &file)
: _file(file),
_is64(MachOLinkingContext::is64Bit(file.arch)),
_swap(!MachOLinkingContext::isHostEndian(file.arch)),
_bigEndianArch(MachOLinkingContext::isBigEndian(file.arch)),
_seg1addr(INT64_MAX) {
_startOfLoadCommands = _is64 ? sizeof(mach_header_64) : sizeof(mach_header);
- const size_t segCommandBaseSize =
+ const size_t segCommandBaseSize =
(_is64 ? sizeof(segment_command_64) : sizeof(segment_command));
const size_t sectsSize = (_is64 ? sizeof(section_64) : sizeof(section));
if (file.fileType == llvm::MachO::MH_OBJECT) {
@@ -229,7 +229,7 @@ MachOFileLayout::MachOFileLayout(const N
+ file.sections.size() * sectsSize
+ sizeof(symtab_command);
_countOfLoadCommands = 2;
-
+
// Accumulate size of each section.
_startOfSectionsContent = _endOfLoadCommands;
_endOfSectionsContent = _startOfSectionsContent;
@@ -239,21 +239,21 @@ MachOFileLayout::MachOFileLayout(const N
_endOfSectionsContent += sect.content.size();
relocCount += sect.relocations.size();
}
-
+
computeSymbolTableSizes();
-
+
// Align start of relocations.
- _startOfRelocations = pointerAlign(_endOfSectionsContent);
+ _startOfRelocations = pointerAlign(_endOfSectionsContent);
_startOfSymbols = _startOfRelocations + relocCount * 8;
// Add Indirect symbol table.
_startOfIndirectSymbols = _startOfSymbols + _symbolTableSize;
// Align start of symbol table and symbol strings.
- _startOfSymbolStrings = _startOfIndirectSymbols
+ _startOfSymbolStrings = _startOfIndirectSymbols
+ pointerAlign(_indirectSymbolTableCount * sizeof(uint32_t));
- _endOfSymbolStrings = _startOfSymbolStrings
+ _endOfSymbolStrings = _startOfSymbolStrings
+ pointerAlign(_symbolStringPoolSize);
_endOfLinkEdit = _endOfSymbolStrings;
- DEBUG_WITH_TYPE("MachOFileLayout",
+ DEBUG_WITH_TYPE("MachOFileLayout",
llvm::dbgs() << "MachOFileLayout()\n"
<< " startOfLoadCommands=" << _startOfLoadCommands << "\n"
<< " countOfLoadCommands=" << _countOfLoadCommands << "\n"
@@ -266,13 +266,13 @@ MachOFileLayout::MachOFileLayout(const N
<< " endOfSectionsContent=" << _endOfSectionsContent << "\n");
} else {
// Final linked images have one load command per segment.
- _endOfLoadCommands = _startOfLoadCommands
+ _endOfLoadCommands = _startOfLoadCommands
+ loadCommandsSize(_countOfLoadCommands);
// Assign section file offsets.
buildFileOffsets();
buildLinkEditInfo();
-
+
// LINKEDIT of final linked images has in order:
// rebase info, binding info, lazy binding info, weak binding info,
// indirect symbol table, symbol table, symbol table strings.
@@ -285,12 +285,12 @@ MachOFileLayout::MachOFileLayout(const N
_startOfSymbols = _endOfLazyBindingInfo;
_startOfIndirectSymbols = _startOfSymbols + _symbolTableSize;
- _startOfSymbolStrings = _startOfIndirectSymbols
+ _startOfSymbolStrings = _startOfIndirectSymbols
+ pointerAlign(_indirectSymbolTableCount * sizeof(uint32_t));
- _endOfSymbolStrings = _startOfSymbolStrings
+ _endOfSymbolStrings = _startOfSymbolStrings
+ pointerAlign(_symbolStringPoolSize);
_endOfLinkEdit = _endOfSymbolStrings;
- DEBUG_WITH_TYPE("MachOFileLayout",
+ DEBUG_WITH_TYPE("MachOFileLayout",
llvm::dbgs() << "MachOFileLayout()\n"
<< " startOfLoadCommands=" << _startOfLoadCommands << "\n"
<< " countOfLoadCommands=" << _countOfLoadCommands << "\n"
@@ -312,8 +312,8 @@ MachOFileLayout::MachOFileLayout(const N
uint32_t MachOFileLayout::loadCommandsSize(uint32_t &count) {
uint32_t size = 0;
count = 0;
-
- const size_t segCommandSize =
+
+ const size_t segCommandSize =
(_is64 ? sizeof(segment_command_64) : sizeof(segment_command));
const size_t sectionSize = (_is64 ? sizeof(section_64) : sizeof(section));
@@ -325,21 +325,21 @@ uint32_t MachOFileLayout::loadCommandsSi
// Add one LC_SEGMENT for implicit __LINKEDIT segment
size += segCommandSize;
++count;
-
+
// Add LC_DYLD_INFO
size += sizeof(dyld_info_command);
++count;
-
+
// Add LC_SYMTAB
size += sizeof(symtab_command);
++count;
-
+
// Add LC_DYSYMTAB
if (_file.fileType != llvm::MachO::MH_PRELOAD) {
size += sizeof(dysymtab_command);
++count;
}
-
+
// If main executable add LC_LOAD_DYLINKER and LC_MAIN
if (_file.fileType == llvm::MachO::MH_EXECUTE) {
size += pointerAlign(sizeof(dylinker_command) + dyldPath().size()+1);
@@ -347,13 +347,13 @@ uint32_t MachOFileLayout::loadCommandsSi
size += sizeof(entry_point_command);
++count;
}
-
+
// Add LC_LOAD_DYLIB for each dependent dylib.
for (const DependentDylib &dep : _file.dependentDylibs) {
size += sizeof(dylib_command) + pointerAlign(dep.path.size()+1);
++count;
}
-
+
return size;
}
@@ -385,8 +385,8 @@ void MachOFileLayout::buildFileOffsets()
}
}
}
-
- // Verify no sections overlap
+
+ // Verify no sections overlap
for (const Section &s1 : _file.sections) {
for (const Section &s2 : _file.sections) {
if (&s1 == &s2)
@@ -397,7 +397,7 @@ void MachOFileLayout::buildFileOffsets()
}
}
}
-
+
// Build side table of extra info about segments and sections.
SegExtraInfo t;
t.fileOffset = 0;
@@ -410,7 +410,7 @@ void MachOFileLayout::buildFileOffsets()
for (const Section &s : _file.sections) {
_sectInfo[&s] = t2;
for (const Segment &sg : _file.segments) {
- if ((s.address >= sg.address)
+ if ((s.address >= sg.address)
&& (s.address+s.content.size() <= sg.address+sg.size)) {
if (!sg.name.equals(s.segmentName)) {
_ec = llvm::make_error_code(llvm::errc::executable_format_error);
@@ -420,23 +420,23 @@ void MachOFileLayout::buildFileOffsets()
}
}
}
-
+
// Assign file offsets.
uint32_t fileOffset = 0;
- DEBUG_WITH_TYPE("MachOFileLayout",
+ DEBUG_WITH_TYPE("MachOFileLayout",
llvm::dbgs() << "buildFileOffsets()\n");
for (const Segment &sg : _file.segments) {
// FIXME: 4096 should be inferred from segments in normalized file.
_segInfo[&sg].fileOffset = llvm::RoundUpToAlignment(fileOffset, 4096);
if ((_seg1addr == INT64_MAX) && sg.access)
_seg1addr = sg.address;
- DEBUG_WITH_TYPE("MachOFileLayout",
+ DEBUG_WITH_TYPE("MachOFileLayout",
llvm::dbgs() << " segment=" << sg.name
<< ", fileOffset=" << _segInfo[&sg].fileOffset << "\n");
for (const Section *s : _segInfo[&sg].sections) {
fileOffset = s->address - sg.address + _segInfo[&sg].fileOffset;
_sectInfo[s].fileOffset = fileOffset;
- DEBUG_WITH_TYPE("MachOFileLayout",
+ DEBUG_WITH_TYPE("MachOFileLayout",
llvm::dbgs() << " section=" << s->sectionName
<< ", fileOffset=" << fileOffset << "\n");
}
@@ -463,7 +463,7 @@ void MachOFileLayout::writeMachHeader()
swapStruct(*mh);
}
-uint32_t MachOFileLayout::indirectSymbolIndex(const Section §,
+uint32_t MachOFileLayout::indirectSymbolIndex(const Section §,
uint32_t &index) {
if (sect.indirectSymbols.empty())
return 0;
@@ -486,7 +486,7 @@ template <typename T>
error_code MachOFileLayout::writeSingleSegmentLoadCommand(uint8_t *&lc) {
typename T::command* seg = reinterpret_cast<typename T::command*>(lc);
seg->cmd = T::LC;
- seg->cmdsize = sizeof(typename T::command)
+ seg->cmdsize = sizeof(typename T::command)
+ _file.sections.size() * sizeof(typename T::section);
uint8_t *next = lc + seg->cmdsize;
memset(seg->segname, 0, 16);
@@ -536,7 +536,7 @@ error_code MachOFileLayout::writeSegment
SegExtraInfo &segInfo = _segInfo[&seg];
typename T::command* cmd = reinterpret_cast<typename T::command*>(lc);
cmd->cmd = T::LC;
- cmd->cmdsize = sizeof(typename T::command)
+ cmd->cmdsize = sizeof(typename T::command)
+ segInfo.sections.size() * sizeof(typename T::section);
uint8_t *next = lc + cmd->cmdsize;
setString16(seg.name, cmd->segname);
@@ -567,7 +567,7 @@ error_code MachOFileLayout::writeSegment
if (_swap)
swapStruct(*sect);
++sect;
- }
+ }
lc = reinterpret_cast<uint8_t*>(next);
}
// Add implicit __LINKEDIT segment
@@ -605,7 +605,7 @@ error_code MachOFileLayout::writeLoadCom
st->cmd = LC_SYMTAB;
st->cmdsize = sizeof(symtab_command);
st->symoff = _startOfSymbols;
- st->nsyms = _file.localSymbols.size() + _file.globalSymbols.size()
+ st->nsyms = _file.localSymbols.size() + _file.globalSymbols.size()
+ _file.undefinedSymbols.size();
st->stroff = _startOfSymbolStrings;
st->strsize = _endOfSymbolStrings - _startOfSymbolStrings;
@@ -617,7 +617,7 @@ error_code MachOFileLayout::writeLoadCom
ec = writeSegmentLoadCommands<MachO64Trait>(lc);
else
ec = writeSegmentLoadCommands<MachO32Trait>(lc);
-
+
// Add LC_DYLD_INFO_ONLY.
dyld_info_command* di = reinterpret_cast<dyld_info_command*>(lc);
di->cmd = LC_DYLD_INFO_ONLY;
@@ -641,14 +641,14 @@ error_code MachOFileLayout::writeLoadCom
st->cmd = LC_SYMTAB;
st->cmdsize = sizeof(symtab_command);
st->symoff = _startOfSymbols;
- st->nsyms = _file.localSymbols.size() + _file.globalSymbols.size()
+ st->nsyms = _file.localSymbols.size() + _file.globalSymbols.size()
+ _file.undefinedSymbols.size();
st->stroff = _startOfSymbolStrings;
st->strsize = _endOfSymbolStrings - _startOfSymbolStrings;
if (_swap)
swapStruct(*st);
lc += sizeof(symtab_command);
-
+
// Add LC_DYSYMTAB
if (_file.fileType != llvm::MachO::MH_PRELOAD) {
dysymtab_command* dst = reinterpret_cast<dysymtab_command*>(lc);
@@ -666,7 +666,7 @@ error_code MachOFileLayout::writeLoadCom
dst->nmodtab = 0;
dst->extrefsymoff = 0;
dst->nextrefsyms = 0;
- dst->indirectsymoff = _startOfIndirectSymbols;
+ dst->indirectsymoff = _startOfIndirectSymbols;
dst->nindirectsyms = _indirectSymbolTableCount;
dst->extreloff = 0;
dst->nextrel = 0;
@@ -676,7 +676,7 @@ error_code MachOFileLayout::writeLoadCom
swapStruct(*dst);
lc += sizeof(dysymtab_command);
}
-
+
// If main executable, add LC_LOAD_DYLINKER and LC_MAIN.
if (_file.fileType == llvm::MachO::MH_EXECUTE) {
// Build LC_LOAD_DYLINKER load command.
@@ -700,7 +700,7 @@ error_code MachOFileLayout::writeLoadCom
swapStruct(*ep);
lc += sizeof(entry_point_command);
}
-
+
// Add LC_LOAD_DYLIB commands
for (const DependentDylib &dep : _file.dependentDylibs) {
dylib_command* dc = reinterpret_cast<dylib_command*>(lc);
@@ -717,7 +717,7 @@ error_code MachOFileLayout::writeLoadCom
lc[sizeof(dylib_command)+dep.path.size()] = '\0';
lc += size;
}
-
+
}
return ec;
}
@@ -818,12 +818,12 @@ void MachOFileLayout::writeRebaseInfo()
}
void MachOFileLayout::writeBindingInfo() {
- memcpy(&_buffer[_startOfBindingInfo],
+ memcpy(&_buffer[_startOfBindingInfo],
_bindingInfo.bytes(), _bindingInfo.size());
}
void MachOFileLayout::writeLazyBindingInfo() {
- memcpy(&_buffer[_startOfLazyBindingInfo],
+ memcpy(&_buffer[_startOfLazyBindingInfo],
_lazyBindingInfo.bytes(), _lazyBindingInfo.size());
}
@@ -842,12 +842,12 @@ void MachOFileLayout::buildRebaseInfo()
// TODO: compress rebasing info.
for (const RebaseLocation& entry : _file.rebasingInfo) {
_rebaseInfo.append_byte(REBASE_OPCODE_SET_TYPE_IMM | entry.kind);
- _rebaseInfo.append_byte(REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
+ _rebaseInfo.append_byte(REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
| entry.segIndex);
_rebaseInfo.append_uleb128(entry.segOffset);
_rebaseInfo.append_uleb128(REBASE_OPCODE_DO_REBASE_IMM_TIMES | 1);
}
- _rebaseInfo.append_byte(REBASE_OPCODE_DONE);
+ _rebaseInfo.append_byte(REBASE_OPCODE_DONE);
_rebaseInfo.align(_is64 ? 8 : 4);
}
@@ -855,7 +855,7 @@ void MachOFileLayout::buildBindInfo() {
// TODO: compress bind info.
for (const BindLocation& entry : _file.bindingInfo) {
_bindingInfo.append_byte(BIND_OPCODE_SET_TYPE_IMM | entry.kind);
- _bindingInfo.append_byte(BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
+ _bindingInfo.append_byte(BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
| entry.segIndex);
_bindingInfo.append_uleb128(entry.segOffset);
_bindingInfo.append_byte(BIND_OPCODE_SET_DYLIB_ORDINAL_IMM | entry.ordinal);
@@ -867,14 +867,14 @@ void MachOFileLayout::buildBindInfo() {
}
_bindingInfo.append_byte(BIND_OPCODE_DO_BIND);
}
- _bindingInfo.append_byte(BIND_OPCODE_DONE);
+ _bindingInfo.append_byte(BIND_OPCODE_DONE);
_bindingInfo.align(_is64 ? 8 : 4);
}
void MachOFileLayout::buildLazyBindInfo() {
for (const BindLocation& entry : _file.lazyBindingInfo) {
_lazyBindingInfo.append_byte(BIND_OPCODE_SET_TYPE_IMM | entry.kind);
- _lazyBindingInfo.append_byte(BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
+ _lazyBindingInfo.append_byte(BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
| entry.segIndex);
_lazyBindingInfo.append_uleb128(entry.segOffset);
_lazyBindingInfo.append_byte(BIND_OPCODE_SET_DYLIB_ORDINAL_IMM | entry.ordinal);
@@ -882,17 +882,17 @@ void MachOFileLayout::buildLazyBindInfo(
_lazyBindingInfo.append_string(entry.symbolName);
_lazyBindingInfo.append_byte(BIND_OPCODE_DO_BIND);
}
- _lazyBindingInfo.append_byte(BIND_OPCODE_DONE);
+ _lazyBindingInfo.append_byte(BIND_OPCODE_DONE);
_lazyBindingInfo.align(_is64 ? 8 : 4);
}
void MachOFileLayout::computeSymbolTableSizes() {
// MachO symbol tables have three ranges: locals, globals, and undefines
const size_t nlistSize = (_is64 ? sizeof(nlist_64) : sizeof(nlist));
- _symbolTableSize = nlistSize * (_file.localSymbols.size()
+ _symbolTableSize = nlistSize * (_file.localSymbols.size()
+ _file.globalSymbols.size()
+ _file.undefinedSymbols.size());
- _symbolStringPoolSize = 0;
+ _symbolStringPoolSize = 0;
for (const Symbol &sym : _file.localSymbols) {
_symbolStringPoolSize += (sym.name.size()+1);
}
@@ -904,7 +904,7 @@ void MachOFileLayout::computeSymbolTable
}
_symbolTableLocalsStartIndex = 0;
_symbolTableGlobalsStartIndex = _file.localSymbols.size();
- _symbolTableUndefinesStartIndex = _symbolTableGlobalsStartIndex
+ _symbolTableUndefinesStartIndex = _symbolTableGlobalsStartIndex
+ _file.globalSymbols.size();
_indirectSymbolTableCount = 0;
@@ -941,7 +941,7 @@ error_code MachOFileLayout::writeBinary(
ec = llvm::FileOutputBuffer::create(path, size(), fob, flags);
if (ec)
return ec;
-
+
// Write content.
_buffer = fob->getBufferStart();
writeMachHeader();
@@ -958,7 +958,7 @@ error_code MachOFileLayout::writeBinary(
/// Takes in-memory normalized view and writes a mach-o object file.
-error_code
+error_code
writeBinary(const NormalizedFile &file, StringRef path) {
MachOFileLayout layout(file);
return layout.writeBinary(path);
Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp Sun Jan 26 21:09:26 2014
@@ -16,9 +16,9 @@
/// ^
/// |
/// |
-/// +-------+
+/// +-------+
/// | Atoms |
-/// +-------+
+/// +-------+
#include "MachONormalizedFile.h"
#include "ReferenceKinds.h"
@@ -53,7 +53,7 @@ struct AtomInfo {
struct SectionInfo {
SectionInfo(StringRef seg, StringRef sect, SectionType type, uint32_t attr=0);
-
+
StringRef segmentName;
StringRef sectionName;
SectionType type;
@@ -66,15 +66,15 @@ struct SectionInfo {
uint32_t finalSectionIndex;
};
-SectionInfo::SectionInfo(StringRef sg, StringRef sct, SectionType t, uint32_t a)
- : segmentName(sg), sectionName(sct), type(t), attributes(a),
- address(0), size(0), alignment(0),
+SectionInfo::SectionInfo(StringRef sg, StringRef sct, SectionType t, uint32_t a)
+ : segmentName(sg), sectionName(sct), type(t), attributes(a),
+ address(0), size(0), alignment(0),
normalizedSectionIndex(0), finalSectionIndex(0) {
}
struct SegmentInfo {
SegmentInfo(StringRef name);
-
+
StringRef name;
uint64_t address;
uint64_t size;
@@ -82,7 +82,7 @@ struct SegmentInfo {
std::vector<SectionInfo*> sections;
};
-SegmentInfo::SegmentInfo(StringRef n)
+SegmentInfo::SegmentInfo(StringRef n)
: name(n), address(0), size(0), access(0) {
}
@@ -108,10 +108,10 @@ public:
private:
typedef std::map<DefinedAtom::ContentType, SectionInfo*> TypeToSection;
typedef llvm::DenseMap<const Atom*, uint64_t> AtomToAddress;
-
+
struct DylibInfo { int ordinal; bool hasWeak; bool hasNonWeak; };
typedef llvm::StringMap<DylibInfo> DylibPathToInfo;
-
+
SectionInfo *sectionForAtom(const DefinedAtom*);
SectionInfo *makeSection(DefinedAtom::ContentType);
void appendAtom(SectionInfo *sect, const DefinedAtom *atom);
@@ -121,15 +121,15 @@ private:
void copySectionContent(SectionInfo *si, ContentBytes &content);
uint8_t scopeBits(const DefinedAtom* atom);
int dylibOrdinal(const SharedLibraryAtom *sa);
- void segIndexForSection(const SectionInfo *sect,
+ void segIndexForSection(const SectionInfo *sect,
uint8_t &segmentIndex, uint64_t &segmentStartAddr);
const Atom *targetOfLazyPointer(const DefinedAtom *lpAtom);
const Atom *targetOfStub(const DefinedAtom *stubAtom);
bool belongsInGlobalSymbolsSection(const DefinedAtom* atom);
void appendSection(SectionInfo *si, NormalizedFile &file);
- void appendReloc(const DefinedAtom *atom, const Reference *ref,
+ void appendReloc(const DefinedAtom *atom, const Reference *ref,
Relocations &relocations);
-
+
static uint64_t alignTo(uint64_t value, uint8_t align2);
typedef llvm::DenseMap<const Atom*, uint32_t> AtomToIndex;
struct AtomAndIndex { const Atom *atom; uint32_t index; };
@@ -160,7 +160,7 @@ SectionInfo *Util::makeSection(DefinedAt
switch ( type ) {
case DefinedAtom::typeCode:
return new (_allocator) SectionInfo("__TEXT", "__text",
- S_REGULAR, S_ATTR_PURE_INSTRUCTIONS
+ S_REGULAR, S_ATTR_PURE_INSTRUCTIONS
| S_ATTR_SOME_INSTRUCTIONS);
case DefinedAtom::typeCString:
return new (_allocator) SectionInfo("__TEXT", "__cstring",
@@ -195,7 +195,7 @@ SectionInfo *Util::sectionForAtom(const
_sectionMap[type] = si;
return si;
}
-
+
void Util::appendAtom(SectionInfo *sect, const DefinedAtom *atom) {
// Figure out offset for atom in this section given alignment constraints.
@@ -250,7 +250,7 @@ unsigned Util::SegmentSorter::weight(con
.Default(100);
}
-bool Util::SegmentSorter::operator()(const SegmentInfo *left,
+bool Util::SegmentSorter::operator()(const SegmentInfo *left,
const SegmentInfo *right) {
return (weight(left) < weight(right));
}
@@ -267,7 +267,7 @@ unsigned Util::TextSectionSorter::weight
.Default(10);
}
-bool Util::TextSectionSorter::operator()(const SectionInfo *left,
+bool Util::TextSectionSorter::operator()(const SectionInfo *left,
const SectionInfo *right) {
return (weight(left) < weight(right));
}
@@ -291,15 +291,15 @@ void Util::organizeSections() {
}
// Sort segments.
std::sort(_segmentInfos.begin(), _segmentInfos.end(), SegmentSorter());
-
+
// Sort sections within segments.
for (SegmentInfo *seg : _segmentInfos) {
if (seg->name.equals("__TEXT")) {
- std::sort(seg->sections.begin(), seg->sections.end(),
+ std::sort(seg->sections.begin(), seg->sections.end(),
TextSectionSorter());
}
}
-
+
// Record final section indexes.
uint32_t sectionIndex = 1;
for (SegmentInfo *seg : _segmentInfos) {
@@ -331,7 +331,7 @@ void Util::layoutSectionsInTextSegment(S
seg->address = addr;
// Walks sections starting at end to calculate padding for start.
int64_t taddr = 0;
- for (auto it = seg->sections.rbegin(); it != seg->sections.rend(); ++it) {
+ for (auto it = seg->sections.rbegin(); it != seg->sections.rend(); ++it) {
SectionInfo *sect = *it;
taddr -= sect->size;
taddr = taddr & (0 - (1 << sect->alignment));
@@ -362,17 +362,17 @@ void Util::assignAddressesToSections() {
else
layoutSectionsInSegment(seg, address);
}
- DEBUG_WITH_TYPE("WriterMachO-norm",
+ DEBUG_WITH_TYPE("WriterMachO-norm",
llvm::dbgs() << "assignAddressesToSections()\n";
for (SegmentInfo *sgi : _segmentInfos) {
llvm::dbgs() << " address=" << llvm::format("0x%08llX", sgi->address)
<< ", size=" << llvm::format("0x%08llX", sgi->size)
- << ", segment-name='" << sgi->name
+ << ", segment-name='" << sgi->name
<< "'\n";
for (SectionInfo *si : sgi->sections) {
llvm::dbgs()<< " addr=" << llvm::format("0x%08llX", si->address)
<< ", size=" << llvm::format("0x%08llX", si->size)
- << ", section-name='" << si->sectionName
+ << ", section-name='" << si->sectionName
<< "\n";
}
}
@@ -382,10 +382,10 @@ void Util::assignAddressesToSections() {
sect->address = alignTo(address, sect->alignment);
address = sect->address + sect->size;
}
- DEBUG_WITH_TYPE("WriterMachO-norm",
+ DEBUG_WITH_TYPE("WriterMachO-norm",
llvm::dbgs() << "assignAddressesToSections()\n";
for (SectionInfo *si : _sectionInfos) {
- llvm::dbgs() << " section=" << si->sectionName
+ llvm::dbgs() << " section=" << si->sectionName
<< " address= " << llvm::format("0x%08X", si->address)
<< " size= " << llvm::format("0x%08X", si->size)
<< "\n";
@@ -499,19 +499,19 @@ uint8_t Util::scopeBits(const DefinedAto
llvm_unreachable("Unknown scope");
}
-bool Util::AtomSorter::operator()(const AtomAndIndex &left,
+bool Util::AtomSorter::operator()(const AtomAndIndex &left,
const AtomAndIndex &right) {
return (left.atom->name().compare(right.atom->name()) < 0);
}
-
+
bool Util::belongsInGlobalSymbolsSection(const DefinedAtom* atom) {
return (atom->scope() == Atom::scopeGlobal);
}
void Util::addSymbols(const lld::File &atomFile, NormalizedFile &file) {
// Mach-O symbol table has three regions: locals, globals, undefs.
-
+
// Add all local (non-global) symbols in address order
std::vector<AtomAndIndex> globals;
globals.reserve(512);
@@ -525,7 +525,7 @@ void Util::addSymbols(const lld::File &a
} else {
Symbol sym;
sym.name = atom->name();
- sym.type = N_SECT;
+ sym.type = N_SECT;
sym.scope = scopeBits(atom);
sym.sect = sect->finalSectionIndex;
sym.desc = 0;
@@ -535,21 +535,21 @@ void Util::addSymbols(const lld::File &a
}
}
}
-
+
// Sort global symbol alphabetically, then add to symbol table.
std::sort(globals.begin(), globals.end(), AtomSorter());
for (AtomAndIndex &ai : globals) {
Symbol sym;
sym.name = ai.atom->name();
- sym.type = N_SECT;
+ sym.type = N_SECT;
sym.scope = scopeBits(static_cast<const DefinedAtom*>(ai.atom));
sym.sect = ai.index;
sym.desc = 0;
sym.value = _atomToAddress[ai.atom];
file.globalSymbols.push_back(sym);
}
-
-
+
+
// Sort undefined symbol alphabetically, then add to symbol table.
std::vector<AtomAndIndex> undefs;
undefs.reserve(128);
@@ -566,7 +566,7 @@ void Util::addSymbols(const lld::File &a
for (AtomAndIndex &ai : undefs) {
Symbol sym;
sym.name = ai.atom->name();
- sym.type = N_UNDF;
+ sym.type = N_UNDF;
sym.scope = N_EXT;
sym.sect = 0;
sym.desc = 0;
@@ -690,7 +690,7 @@ void Util::segIndexForSection(const Sect
uint64_t &segmentStartAddr) {
segmentIndex = 0;
for (const SegmentInfo *seg : _segmentInfos) {
- if ((seg->address <= sect->address)
+ if ((seg->address <= sect->address)
&& (seg->address+seg->size >= sect->address+sect->size)) {
segmentStartAddr = seg->address;
return;
@@ -701,7 +701,7 @@ void Util::segIndexForSection(const Sect
}
-void Util::appendReloc(const DefinedAtom *atom, const Reference *ref,
+void Util::appendReloc(const DefinedAtom *atom, const Reference *ref,
Relocations &relocations) {
// TODO: convert Reference to normalized relocation
}
@@ -709,7 +709,7 @@ void Util::appendReloc(const DefinedAtom
void Util::addSectionRelocs(const lld::File &, NormalizedFile &file) {
if (_context.outputFileType() != llvm::MachO::MH_OBJECT)
return;
-
+
for (SectionInfo *si : _sectionInfos) {
Section &normSect = file.sections[si->normalizedSectionIndex];
for (const AtomInfo &info : si->atomsAndOffsets) {
@@ -721,7 +721,7 @@ void Util::addSectionRelocs(const lld::F
}
}
-void Util::addRebaseAndBindingInfo(const lld::File &atomFile,
+void Util::addRebaseAndBindingInfo(const lld::File &atomFile,
NormalizedFile &nFile) {
if (_context.outputFileType() == llvm::MachO::MH_OBJECT)
return;
@@ -733,7 +733,7 @@ void Util::addRebaseAndBindingInfo(const
for (const AtomInfo &info : sect->atomsAndOffsets) {
const DefinedAtom *atom = info.atom;
for (const Reference *ref : *atom) {
- uint64_t segmentOffset = _atomToAddress[atom] + ref->offsetInAtom()
+ uint64_t segmentOffset = _atomToAddress[atom] + ref->offsetInAtom()
- segmentStartAddr;
const Atom* targ = ref->target();
if (_context.kindHandler().isPointer(*ref)) {
@@ -753,7 +753,7 @@ void Util::addRebaseAndBindingInfo(const
bind.kind = llvm::MachO::BIND_TYPE_POINTER;
bind.canBeNull = sa->canBeNullAtRuntime();
bind.ordinal = dylibOrdinal(sa);
- bind.symbolName = targ->name();
+ bind.symbolName = targ->name();
bind.addend = ref->addend();
nFile.bindingInfo.push_back(bind);
}
@@ -765,7 +765,7 @@ void Util::addRebaseAndBindingInfo(const
bind.kind = llvm::MachO::BIND_TYPE_POINTER;
bind.canBeNull = false; //sa->canBeNullAtRuntime();
bind.ordinal = 1;
- bind.symbolName = targ->name();
+ bind.symbolName = targ->name();
bind.addend = ref->addend();
nFile.lazyBindingInfo.push_back(bind);
}
@@ -786,16 +786,16 @@ namespace mach_o {
namespace normalized {
/// Convert a set of Atoms into a normalized mach-o file.
-ErrorOr<std::unique_ptr<NormalizedFile>>
-normalizedFromAtoms(const lld::File &atomFile,
+ErrorOr<std::unique_ptr<NormalizedFile>>
+normalizedFromAtoms(const lld::File &atomFile,
const MachOLinkingContext &context) {
- // The util object buffers info until the normalized file can be made.
+ // The util object buffers info until the normalized file can be made.
Util util(context);
util.assignAtomsToSections(atomFile);
util.organizeSections();
util.assignAddressesToSections();
util.buildAtomToAddressMap();
-
+
std::unique_ptr<NormalizedFile> f(new NormalizedFile());
NormalizedFile &normFile = *f.get();
f->arch = context.arch();
@@ -809,7 +809,7 @@ normalizedFromAtoms(const lld::File &ato
util.addRebaseAndBindingInfo(atomFile, normFile);
util.addSectionRelocs(atomFile, normFile);
util.copyEntryPointAddress(normFile);
-
+
return std::move(f);
}
Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp Sun Jan 26 21:09:26 2014
@@ -11,9 +11,9 @@
/// \file For mach-o object files, this implementation uses YAML I/O to
/// provide the convert between YAML and the normalized mach-o (NM).
///
-/// +------------+ +------+
-/// | normalized | <-> | yaml |
-/// +------------+ +------+
+/// +------------+ +------+
+/// | normalized | <-> | yaml |
+/// +------------+ +------+
#include "MachONormalizedFile.h"
@@ -138,13 +138,13 @@ struct ScalarEnumerationTraits<lld::Mach
template <>
struct ScalarEnumerationTraits<lld::MachOLinkingContext::OS> {
static void enumeration(IO &io, lld::MachOLinkingContext::OS &value) {
- io.enumCase(value, "unknown",
+ io.enumCase(value, "unknown",
lld::MachOLinkingContext::OS::unknown);
- io.enumCase(value, "Mac OS X",
+ io.enumCase(value, "Mac OS X",
lld::MachOLinkingContext::OS::macOSX);
- io.enumCase(value, "iOS",
+ io.enumCase(value, "iOS",
lld::MachOLinkingContext::OS::iOS);
- io.enumCase(value, "iOS Simulator",
+ io.enumCase(value, "iOS Simulator",
lld::MachOLinkingContext::OS::iOS_simulator);
}
};
@@ -164,9 +164,9 @@ struct ScalarEnumerationTraits<HeaderFil
template <>
struct ScalarBitSetTraits<FileFlags> {
static void bitset(IO &io, FileFlags &value) {
- io.bitSetCase(value, "MH_TWOLEVEL",
+ io.bitSetCase(value, "MH_TWOLEVEL",
llvm::MachO::MH_TWOLEVEL);
- io.bitSetCase(value, "MH_SUBSECTIONS_VIA_SYMBOLS",
+ io.bitSetCase(value, "MH_SUBSECTIONS_VIA_SYMBOLS",
llvm::MachO::MH_SUBSECTIONS_VIA_SYMBOLS);
}
};
@@ -175,49 +175,49 @@ struct ScalarBitSetTraits<FileFlags> {
template <>
struct ScalarEnumerationTraits<SectionType> {
static void enumeration(IO &io, SectionType &value) {
- io.enumCase(value, "S_REGULAR",
+ io.enumCase(value, "S_REGULAR",
llvm::MachO::S_REGULAR);
- io.enumCase(value, "S_ZEROFILL",
+ io.enumCase(value, "S_ZEROFILL",
llvm::MachO::S_ZEROFILL);
- io.enumCase(value, "S_CSTRING_LITERALS",
+ io.enumCase(value, "S_CSTRING_LITERALS",
llvm::MachO::S_CSTRING_LITERALS);
- io.enumCase(value, "S_4BYTE_LITERALS",
+ io.enumCase(value, "S_4BYTE_LITERALS",
llvm::MachO::S_4BYTE_LITERALS);
- io.enumCase(value, "S_8BYTE_LITERALS",
+ io.enumCase(value, "S_8BYTE_LITERALS",
llvm::MachO::S_8BYTE_LITERALS);
- io.enumCase(value, "S_LITERAL_POINTERS",
+ io.enumCase(value, "S_LITERAL_POINTERS",
llvm::MachO::S_LITERAL_POINTERS);
- io.enumCase(value, "S_NON_LAZY_SYMBOL_POINTERS",
+ io.enumCase(value, "S_NON_LAZY_SYMBOL_POINTERS",
llvm::MachO::S_NON_LAZY_SYMBOL_POINTERS);
- io.enumCase(value, "S_LAZY_SYMBOL_POINTERS",
+ io.enumCase(value, "S_LAZY_SYMBOL_POINTERS",
llvm::MachO::S_LAZY_SYMBOL_POINTERS);
- io.enumCase(value, "S_SYMBOL_STUBS",
+ io.enumCase(value, "S_SYMBOL_STUBS",
llvm::MachO::S_SYMBOL_STUBS);
- io.enumCase(value, "S_MOD_INIT_FUNC_POINTERS",
+ io.enumCase(value, "S_MOD_INIT_FUNC_POINTERS",
llvm::MachO::S_MOD_INIT_FUNC_POINTERS);
- io.enumCase(value, "S_MOD_TERM_FUNC_POINTERS",
+ io.enumCase(value, "S_MOD_TERM_FUNC_POINTERS",
llvm::MachO::S_MOD_TERM_FUNC_POINTERS);
- io.enumCase(value, "S_COALESCED",
+ io.enumCase(value, "S_COALESCED",
llvm::MachO::S_COALESCED);
- io.enumCase(value, "S_GB_ZEROFILL",
+ io.enumCase(value, "S_GB_ZEROFILL",
llvm::MachO::S_GB_ZEROFILL);
- io.enumCase(value, "S_INTERPOSING",
+ io.enumCase(value, "S_INTERPOSING",
llvm::MachO::S_INTERPOSING);
- io.enumCase(value, "S_16BYTE_LITERALS",
+ io.enumCase(value, "S_16BYTE_LITERALS",
llvm::MachO::S_16BYTE_LITERALS);
- io.enumCase(value, "S_DTRACE_DOF",
+ io.enumCase(value, "S_DTRACE_DOF",
llvm::MachO::S_DTRACE_DOF);
- io.enumCase(value, "S_LAZY_DYLIB_SYMBOL_POINTERS",
+ io.enumCase(value, "S_LAZY_DYLIB_SYMBOL_POINTERS",
llvm::MachO::S_LAZY_DYLIB_SYMBOL_POINTERS);
- io.enumCase(value, "S_THREAD_LOCAL_REGULAR",
+ io.enumCase(value, "S_THREAD_LOCAL_REGULAR",
llvm::MachO::S_THREAD_LOCAL_REGULAR);
- io.enumCase(value, "S_THREAD_LOCAL_ZEROFILL",
+ io.enumCase(value, "S_THREAD_LOCAL_ZEROFILL",
llvm::MachO::S_THREAD_LOCAL_ZEROFILL);
- io.enumCase(value, "S_THREAD_LOCAL_VARIABLES",
+ io.enumCase(value, "S_THREAD_LOCAL_VARIABLES",
llvm::MachO::S_THREAD_LOCAL_VARIABLES);
- io.enumCase(value, "S_THREAD_LOCAL_VARIABLE_POINTERS",
+ io.enumCase(value, "S_THREAD_LOCAL_VARIABLE_POINTERS",
llvm::MachO::S_THREAD_LOCAL_VARIABLE_POINTERS);
- io.enumCase(value, "S_THREAD_LOCAL_INIT_FUNCTION_POINTERS",
+ io.enumCase(value, "S_THREAD_LOCAL_INIT_FUNCTION_POINTERS",
llvm::MachO::S_THREAD_LOCAL_INIT_FUNCTION_POINTERS);
}
};
@@ -225,15 +225,15 @@ struct ScalarEnumerationTraits<SectionTy
template <>
struct ScalarBitSetTraits<SectionAttr> {
static void bitset(IO &io, SectionAttr &value) {
- io.bitSetCase(value, "S_ATTR_PURE_INSTRUCTIONS",
+ io.bitSetCase(value, "S_ATTR_PURE_INSTRUCTIONS",
llvm::MachO::S_ATTR_PURE_INSTRUCTIONS);
- io.bitSetCase(value, "S_ATTR_SOME_INSTRUCTIONS",
+ io.bitSetCase(value, "S_ATTR_SOME_INSTRUCTIONS",
llvm::MachO::S_ATTR_SOME_INSTRUCTIONS);
- io.bitSetCase(value, "S_ATTR_NO_DEAD_STRIP",
+ io.bitSetCase(value, "S_ATTR_NO_DEAD_STRIP",
llvm::MachO::S_ATTR_NO_DEAD_STRIP);
- io.bitSetCase(value, "S_ATTR_EXT_RELOC",
+ io.bitSetCase(value, "S_ATTR_EXT_RELOC",
llvm::MachO::S_ATTR_EXT_RELOC);
- io.bitSetCase(value, "S_ATTR_LOC_RELOC",
+ io.bitSetCase(value, "S_ATTR_LOC_RELOC",
llvm::MachO::S_ATTR_LOC_RELOC);
}
};
@@ -306,7 +306,7 @@ struct MappingTraits<Section> {
std::copy(_normalizedContent.begin(), _normalizedContent.end(), bytes);
return makeArrayRef(bytes, size);
}
-
+
IO &_io;
ContentBytes _normalizedContent;
};
@@ -340,57 +340,57 @@ struct ScalarEnumerationTraits<Relocatio
assert(file != nullptr);
switch (file->arch) {
case lld::MachOLinkingContext::arch_x86_64:
- io.enumCase(value, "X86_64_RELOC_UNSIGNED",
+ io.enumCase(value, "X86_64_RELOC_UNSIGNED",
llvm::MachO::X86_64_RELOC_UNSIGNED);
- io.enumCase(value, "X86_64_RELOC_SIGNED",
+ io.enumCase(value, "X86_64_RELOC_SIGNED",
llvm::MachO::X86_64_RELOC_SIGNED);
- io.enumCase(value, "X86_64_RELOC_BRANCH",
+ io.enumCase(value, "X86_64_RELOC_BRANCH",
llvm::MachO::X86_64_RELOC_BRANCH);
- io.enumCase(value, "X86_64_RELOC_GOT_LOAD",
+ io.enumCase(value, "X86_64_RELOC_GOT_LOAD",
llvm::MachO::X86_64_RELOC_GOT_LOAD);
- io.enumCase(value, "X86_64_RELOC_GOT",
+ io.enumCase(value, "X86_64_RELOC_GOT",
llvm::MachO::X86_64_RELOC_GOT);
- io.enumCase(value, "X86_64_RELOC_SUBTRACTOR",
+ io.enumCase(value, "X86_64_RELOC_SUBTRACTOR",
llvm::MachO::X86_64_RELOC_SUBTRACTOR);
- io.enumCase(value, "X86_64_RELOC_SIGNED_1",
+ io.enumCase(value, "X86_64_RELOC_SIGNED_1",
llvm::MachO::X86_64_RELOC_SIGNED_1);
- io.enumCase(value, "X86_64_RELOC_SIGNED_2",
+ io.enumCase(value, "X86_64_RELOC_SIGNED_2",
llvm::MachO::X86_64_RELOC_SIGNED_2);
- io.enumCase(value, "X86_64_RELOC_SIGNED_4",
+ io.enumCase(value, "X86_64_RELOC_SIGNED_4",
llvm::MachO::X86_64_RELOC_SIGNED_4);
- io.enumCase(value, "X86_64_RELOC_TLV",
+ io.enumCase(value, "X86_64_RELOC_TLV",
llvm::MachO::X86_64_RELOC_TLV);
break;
case lld::MachOLinkingContext::arch_x86:
- io.enumCase(value, "GENERIC_RELOC_VANILLA",
+ io.enumCase(value, "GENERIC_RELOC_VANILLA",
llvm::MachO::GENERIC_RELOC_VANILLA);
- io.enumCase(value, "GENERIC_RELOC_PAIR",
+ io.enumCase(value, "GENERIC_RELOC_PAIR",
llvm::MachO::GENERIC_RELOC_PAIR);
- io.enumCase(value, "GENERIC_RELOC_SECTDIFF",
+ io.enumCase(value, "GENERIC_RELOC_SECTDIFF",
llvm::MachO::GENERIC_RELOC_SECTDIFF);
- io.enumCase(value, "GENERIC_RELOC_LOCAL_SECTDIFF",
+ io.enumCase(value, "GENERIC_RELOC_LOCAL_SECTDIFF",
llvm::MachO::GENERIC_RELOC_LOCAL_SECTDIFF);
- io.enumCase(value, "GENERIC_RELOC_TLV",
+ io.enumCase(value, "GENERIC_RELOC_TLV",
llvm::MachO::GENERIC_RELOC_TLV);
break;
case lld::MachOLinkingContext::arch_armv6:
case lld::MachOLinkingContext::arch_armv7:
case lld::MachOLinkingContext::arch_armv7s:
- io.enumCase(value, "ARM_RELOC_VANILLA",
+ io.enumCase(value, "ARM_RELOC_VANILLA",
llvm::MachO::ARM_RELOC_VANILLA);
- io.enumCase(value, "ARM_RELOC_PAIR",
+ io.enumCase(value, "ARM_RELOC_PAIR",
llvm::MachO::ARM_RELOC_PAIR);
- io.enumCase(value, "ARM_RELOC_SECTDIFF",
+ io.enumCase(value, "ARM_RELOC_SECTDIFF",
llvm::MachO::ARM_RELOC_SECTDIFF);
- io.enumCase(value, "ARM_RELOC_LOCAL_SECTDIFF",
+ io.enumCase(value, "ARM_RELOC_LOCAL_SECTDIFF",
llvm::MachO::ARM_RELOC_LOCAL_SECTDIFF);
- io.enumCase(value, "ARM_RELOC_BR24",
+ io.enumCase(value, "ARM_RELOC_BR24",
llvm::MachO::ARM_RELOC_BR24);
- io.enumCase(value, "ARM_THUMB_RELOC_BR22",
+ io.enumCase(value, "ARM_THUMB_RELOC_BR22",
llvm::MachO::ARM_THUMB_RELOC_BR22);
- io.enumCase(value, "ARM_RELOC_HALF",
+ io.enumCase(value, "ARM_RELOC_HALF",
llvm::MachO::ARM_RELOC_HALF);
- io.enumCase(value, "ARM_RELOC_HALF_SECTDIFF",
+ io.enumCase(value, "ARM_RELOC_HALF_SECTDIFF",
llvm::MachO::ARM_RELOC_HALF_SECTDIFF);
break;
default:
@@ -470,15 +470,15 @@ struct MappingTraits<Segment> {
template <>
struct ScalarEnumerationTraits<LoadCommandType> {
static void enumeration(IO &io, LoadCommandType &value) {
- io.enumCase(value, "LC_LOAD_DYLIB",
+ io.enumCase(value, "LC_LOAD_DYLIB",
llvm::MachO::LC_LOAD_DYLIB);
- io.enumCase(value, "LC_LOAD_WEAK_DYLIB",
+ io.enumCase(value, "LC_LOAD_WEAK_DYLIB",
llvm::MachO::LC_LOAD_WEAK_DYLIB);
- io.enumCase(value, "LC_REEXPORT_DYLIB",
+ io.enumCase(value, "LC_REEXPORT_DYLIB",
llvm::MachO::LC_REEXPORT_DYLIB);
- io.enumCase(value, "LC_LOAD_UPWARD_DYLIB",
+ io.enumCase(value, "LC_LOAD_UPWARD_DYLIB",
llvm::MachO::LC_LOAD_UPWARD_DYLIB);
- io.enumCase(value, "LC_LAZY_LOAD_DYLIB",
+ io.enumCase(value, "LC_LAZY_LOAD_DYLIB",
llvm::MachO::LC_LAZY_LOAD_DYLIB);
}
};
@@ -495,11 +495,11 @@ struct MappingTraits<DependentDylib> {
template <>
struct ScalarEnumerationTraits<RebaseType> {
static void enumeration(IO &io, RebaseType &value) {
- io.enumCase(value, "REBASE_TYPE_POINTER",
+ io.enumCase(value, "REBASE_TYPE_POINTER",
llvm::MachO::REBASE_TYPE_POINTER);
- io.enumCase(value, "REBASE_TYPE_TEXT_PCREL32",
+ io.enumCase(value, "REBASE_TYPE_TEXT_PCREL32",
llvm::MachO::REBASE_TYPE_TEXT_PCREL32);
- io.enumCase(value, "REBASE_TYPE_TEXT_ABSOLUTE32",
+ io.enumCase(value, "REBASE_TYPE_TEXT_ABSOLUTE32",
llvm::MachO::REBASE_TYPE_TEXT_ABSOLUTE32);
}
};
@@ -510,7 +510,7 @@ struct MappingTraits<RebaseLocation> {
static void mapping(IO &io, RebaseLocation& rebase) {
io.mapRequired("segment-index", rebase.segIndex);
io.mapRequired("segment-offset", rebase.segOffset);
- io.mapOptional("kind", rebase.kind,
+ io.mapOptional("kind", rebase.kind,
llvm::MachO::REBASE_TYPE_POINTER);
}
};
@@ -520,11 +520,11 @@ struct MappingTraits<RebaseLocation> {
template <>
struct ScalarEnumerationTraits<BindType> {
static void enumeration(IO &io, BindType &value) {
- io.enumCase(value, "BIND_TYPE_POINTER",
+ io.enumCase(value, "BIND_TYPE_POINTER",
llvm::MachO::BIND_TYPE_POINTER);
- io.enumCase(value, "BIND_TYPE_TEXT_ABSOLUTE32",
+ io.enumCase(value, "BIND_TYPE_TEXT_ABSOLUTE32",
llvm::MachO::BIND_TYPE_TEXT_ABSOLUTE32);
- io.enumCase(value, "BIND_TYPE_TEXT_PCREL32",
+ io.enumCase(value, "BIND_TYPE_TEXT_PCREL32",
llvm::MachO::BIND_TYPE_TEXT_PCREL32);
}
};
@@ -534,7 +534,7 @@ struct MappingTraits<BindLocation> {
static void mapping(IO &io, BindLocation &bind) {
io.mapRequired("segment-index", bind.segIndex);
io.mapRequired("segment-offset", bind.segOffset);
- io.mapOptional("kind", bind.kind,
+ io.mapOptional("kind", bind.kind,
llvm::MachO::BIND_TYPE_POINTER);
io.mapOptional("can-be-null", bind.canBeNull, false);
io.mapRequired("ordinal", bind.ordinal);
@@ -547,9 +547,9 @@ struct MappingTraits<BindLocation> {
template <>
struct ScalarEnumerationTraits<ExportSymbolKind> {
static void enumeration(IO &io, ExportSymbolKind &value) {
- io.enumCase(value, "EXPORT_SYMBOL_FLAGS_KIND_REGULAR",
+ io.enumCase(value, "EXPORT_SYMBOL_FLAGS_KIND_REGULAR",
llvm::MachO::EXPORT_SYMBOL_FLAGS_KIND_REGULAR);
- io.enumCase(value, "EXPORT_SYMBOL_FLAGS_KIND_THREAD_LOCALl",
+ io.enumCase(value, "EXPORT_SYMBOL_FLAGS_KIND_THREAD_LOCALl",
llvm::MachO::EXPORT_SYMBOL_FLAGS_KIND_THREAD_LOCAL);
}
};
@@ -557,11 +557,11 @@ struct ScalarEnumerationTraits<ExportSym
template <>
struct ScalarBitSetTraits<ExportFlags> {
static void bitset(IO &io, ExportFlags &value) {
- io.bitSetCase(value, "EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION",
+ io.bitSetCase(value, "EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION",
llvm::MachO::EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION);
- io.bitSetCase(value, "EXPORT_SYMBOL_FLAGS_REEXPORT",
+ io.bitSetCase(value, "EXPORT_SYMBOL_FLAGS_REEXPORT",
llvm::MachO::EXPORT_SYMBOL_FLAGS_REEXPORT);
- io.bitSetCase(value, "EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER",
+ io.bitSetCase(value, "EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER",
llvm::MachO::EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER);
}
};
@@ -572,7 +572,7 @@ struct MappingTraits<Export> {
static void mapping(IO &io, Export &exp) {
io.mapRequired("name", exp.name);
io.mapRequired("offset", exp.offset);
- io.mapOptional("kind", exp.kind,
+ io.mapOptional("kind", exp.kind,
llvm::MachO::EXPORT_SYMBOL_FLAGS_KIND_REGULAR);
io.mapOptional("flags", exp.flags);
io.mapOptional("other-offset", exp.otherOffset, Hex32(0));
@@ -619,7 +619,7 @@ struct MappingTraits<NormalizedFile> {
namespace lld {
namespace mach_o {
-/// Handles !mach-o tagged yaml documents.
+/// Handles !mach-o tagged yaml documents.
bool MachOYamlIOTaggedDocumentHandler::handledDocTag(llvm::yaml::IO &io,
const lld::File *&file) const {
if (!io.mapTag("!mach-o"))
Modified: lld/trunk/lib/ReaderWriter/MachO/StubAtoms.hpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/StubAtoms.hpp?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/StubAtoms.hpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/StubAtoms.hpp Sun Jan 26 21:09:26 2014
@@ -31,9 +31,9 @@ namespace mach_o {
//
class StubBinderAtom : public SharedLibraryAtom {
public:
- StubBinderAtom(const File &f) : _file(f) {
+ StubBinderAtom(const File &f) : _file(f) {
}
-
+
virtual const File& file() const {
return _file;
}
@@ -45,7 +45,7 @@ public:
virtual StringRef loadName() const {
return StringRef("/usr/lib/libSystem.B.dylib");
}
-
+
virtual bool canBeNullAtRuntime() const {
return false;
}
@@ -57,15 +57,15 @@ public:
virtual uint64_t size() const LLVM_OVERRIDE {
return 0;
}
-
+
private:
const File &_file;
};
-} // namespace mach_o
-} // namespace lld
+} // namespace mach_o
+} // namespace lld
#endif // LLD_READER_WRITER_MACHO_STUB_ATOMS_H
Modified: lld/trunk/lib/ReaderWriter/MachO/WriterMachO.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/WriterMachO.cpp?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/WriterMachO.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/WriterMachO.cpp Sun Jan 26 21:09:26 2014
@@ -34,18 +34,18 @@ public:
virtual error_code writeFile(const lld::File &file, StringRef path) {
// Construct empty normalized file from atoms.
- ErrorOr<std::unique_ptr<NormalizedFile>> nFile =
+ ErrorOr<std::unique_ptr<NormalizedFile>> nFile =
normalized::normalizedFromAtoms(file, _context);
if (error_code ec = nFile.getError())
return ec;
-
+
// For debugging, write out yaml form of normalized file.
//writeYaml(*nFile->get(), llvm::errs());
-
+
// Write normalized file as mach-o binary.
return writeBinary(*nFile->get(), path);
}
-
+
virtual bool createImplicitFiles(std::vector<std::unique_ptr<File> > &r) {
if (_context.outputFileType() == llvm::MachO::MH_EXECUTE) {
// When building main executables, add _main as required entry point.
Modified: lld/trunk/lib/ReaderWriter/Reader.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/Reader.cpp?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/Reader.cpp (original)
+++ lld/trunk/lib/ReaderWriter/Reader.cpp Sun Jan 26 21:09:26 2014
@@ -64,7 +64,7 @@ Registry::Registry() {
kindStrings);
}
-bool Registry::handleTaggedDoc(llvm::yaml::IO &io,
+bool Registry::handleTaggedDoc(llvm::yaml::IO &io,
const lld::File *&file) const {
for (const std::unique_ptr<YamlIOTaggedDocumentHandler> &h : _yamlHandlers) {
if (h->handledDocTag(io, file))
Modified: lld/trunk/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp (original)
+++ lld/trunk/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp Sun Jan 26 21:09:26 2014
@@ -150,7 +150,7 @@ private:
typedef llvm::StringMap<const lld::Atom *> NameToAtom;
typedef llvm::DenseMap<const lld::Atom *, std::string> AtomToRefName;
- // Allocate a new copy of this string in _storage, so the strings
+ // Allocate a new copy of this string in _storage, so the strings
// can be freed when RefNameBuilder is destroyed.
StringRef copyString(StringRef str) {
char *s = _storage.Allocate<char>(str.size());
@@ -635,7 +635,7 @@ template <> struct MappingTraits<const l
return _absoluteAtoms;
}
- // Allocate a new copy of this string in _storage, so the strings
+ // Allocate a new copy of this string in _storage, so the strings
// can be freed when File is destroyed.
StringRef copyString(StringRef str) {
char *s = _storage.Allocate<char>(str.size());
@@ -659,7 +659,7 @@ template <> struct MappingTraits<const l
// Let any register tag handler process this.
if (info->_registry && info->_registry->handleTaggedDoc(io, file))
return;
- // If no registered handler claims this tag and there is no tag,
+ // If no registered handler claims this tag and there is no tag,
// grandfather in as "!native".
if (io.mapTag("!native", true) || io.mapTag("tag:yaml.org,2002:map"))
mappingAtoms(io, file);
@@ -890,7 +890,7 @@ template <> struct MappingTraits<const l
io.mapOptional("ref-name", keys->_refName, StringRef());
io.mapOptional("scope", keys->_scope,
DefinedAtom::scopeTranslationUnit);
- io.mapOptional("type", keys->_contentType,
+ io.mapOptional("type", keys->_contentType,
DefinedAtom::typeCode);
io.mapOptional("content", keys->_content);
io.mapOptional("size", keys->_size, (uint64_t)keys->_content.size());
Modified: lld/trunk/test/Driver/undef-basic.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/Driver/undef-basic.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/Driver/undef-basic.objtxt (original)
+++ lld/trunk/test/Driver/undef-basic.objtxt Sun Jan 26 21:09:26 2014
@@ -9,7 +9,7 @@
absolute-atoms:
- name: putchar
value: 0xFFFF0040
-
+
- name: reset
value: 0xFFFF0080
Modified: lld/trunk/test/core/absolute-basic.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/absolute-basic.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/absolute-basic.objtxt (original)
+++ lld/trunk/test/core/absolute-basic.objtxt Sun Jan 26 21:09:26 2014
@@ -8,14 +8,14 @@
absolute-atoms:
- name: putchar
value: 0xFFFF0040
-
+
- name: reset
value: 0xFFFF0080
...
-# CHECK: absolute-atoms:
+# CHECK: absolute-atoms:
# CHECK: name: putchar
# CHECK: value: 0x00000000FFFF0040
# CHECK: name: reset
Modified: lld/trunk/test/core/archive-chain.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/archive-chain.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/archive-chain.objtxt (original)
+++ lld/trunk/test/core/archive-chain.objtxt Sun Jan 26 21:09:26 2014
@@ -45,7 +45,7 @@ members:
- name: baz1
scope: global
type: code
-
+
- name: baz1b
type: code
Modified: lld/trunk/test/core/auto-hide-coalesce.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/auto-hide-coalesce.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/auto-hide-coalesce.objtxt (original)
+++ lld/trunk/test/core/auto-hide-coalesce.objtxt Sun Jan 26 21:09:26 2014
@@ -10,17 +10,17 @@ defined-atoms:
scope: global
type: code
merge: as-weak
-
+
- name: _inlineFunc2
scope: global
type: code
merge: as-weak
-
+
- name: _inlineFunc3
scope: global
type: code
merge: as-addressed-weak
-
+
- name: _inlineFunc4
scope: global
type: code
@@ -31,17 +31,17 @@ defined-atoms:
scope: global
type: code
merge: as-weak
-
+
- name: _inlineFunc2
scope: global
type: code
merge: as-addressed-weak
-
+
- name: _inlineFunc3
scope: global
type: code
merge: as-weak
-
+
- name: _inlineFunc4
scope: global
type: code
Modified: lld/trunk/test/core/constants-coalesce.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/constants-coalesce.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/constants-coalesce.objtxt (original)
+++ lld/trunk/test/core/constants-coalesce.objtxt Sun Jan 26 21:09:26 2014
@@ -11,7 +11,7 @@ defined-atoms:
type: constant
merge: by-content
content: [ 01, 02, 03, 04 ]
-
+
- ref-name: L8-byte
type: constant
merge: by-content
Modified: lld/trunk/test/core/cstring-coalesce.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/cstring-coalesce.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/cstring-coalesce.objtxt (original)
+++ lld/trunk/test/core/cstring-coalesce.objtxt Sun Jan 26 21:09:26 2014
@@ -10,7 +10,7 @@ defined-atoms:
type: c-string
merge: by-content
content: [ 68, 65, 6c, 6c, 6f, 00 ]
-
+
- ref-name: L1
type: c-string
merge: by-content
Modified: lld/trunk/test/core/custom-section.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/custom-section.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/custom-section.objtxt (original)
+++ lld/trunk/test/core/custom-section.objtxt Sun Jan 26 21:09:26 2014
@@ -24,7 +24,7 @@ defined-atoms:
# CHECK: name: _foo1
-# CHECK-NOT: section-name:
+# CHECK-NOT: section-name:
# CHECK: name: _foo2
# CHECK: section-choice: custom
# CHECK: section-name: __foozle
Modified: lld/trunk/test/core/dead-strip-basic.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/dead-strip-basic.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/dead-strip-basic.objtxt (original)
+++ lld/trunk/test/core/dead-strip-basic.objtxt Sun Jan 26 21:09:26 2014
@@ -17,7 +17,7 @@ defined-atoms:
- offset: 6
kind: pcrel32
target: baz
-
+
- name: mydead1
scope: global
Modified: lld/trunk/test/core/dead-strip-globals.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/dead-strip-globals.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/dead-strip-globals.objtxt (original)
+++ lld/trunk/test/core/dead-strip-globals.objtxt Sun Jan 26 21:09:26 2014
@@ -16,7 +16,7 @@ defined-atoms:
- offset: 6
kind: pcrel32
target: baz
-
+
- name: myglobal1
scope: global
Modified: lld/trunk/test/core/error-atom-attribute.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/error-atom-attribute.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/error-atom-attribute.objtxt (original)
+++ lld/trunk/test/core/error-atom-attribute.objtxt Sun Jan 26 21:09:26 2014
@@ -11,7 +11,7 @@ defined-atoms:
scope: hidden
foobar: true
dead-strip: never
-
+
...
Modified: lld/trunk/test/core/error-atom-content-byte-value.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/error-atom-content-byte-value.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/error-atom-content-byte-value.objtxt (original)
+++ lld/trunk/test/core/error-atom-content-byte-value.objtxt Sun Jan 26 21:09:26 2014
@@ -10,7 +10,7 @@ defined-atoms:
- name: entry
scope: hidden
content: [ A5, 00, 4G, 1F ]
-
+
...
Modified: lld/trunk/test/core/error-atom-content-bytes.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/error-atom-content-bytes.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/error-atom-content-bytes.objtxt (original)
+++ lld/trunk/test/core/error-atom-content-bytes.objtxt Sun Jan 26 21:09:26 2014
@@ -10,7 +10,7 @@ defined-atoms:
- name: entry
scope: hidden
content: [ A5, 1234, 00, 4F ]
-
+
...
Modified: lld/trunk/test/core/error-atom-type.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/error-atom-type.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/error-atom-type.objtxt (original)
+++ lld/trunk/test/core/error-atom-type.objtxt Sun Jan 26 21:09:26 2014
@@ -11,7 +11,7 @@ defined-atoms:
scope: hidden
type: superluminal
dead-strip: never
-
+
...
Modified: lld/trunk/test/core/error-atom-undefined-wrong-attribue.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/error-atom-undefined-wrong-attribue.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/error-atom-undefined-wrong-attribue.objtxt (original)
+++ lld/trunk/test/core/error-atom-undefined-wrong-attribue.objtxt Sun Jan 26 21:09:26 2014
@@ -9,7 +9,7 @@
undefined-atoms:
- name: foo
type: code
-
+
...
Modified: lld/trunk/test/core/error-file-attribute.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/error-file-attribute.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/error-file-attribute.objtxt (original)
+++ lld/trunk/test/core/error-file-attribute.objtxt Sun Jan 26 21:09:26 2014
@@ -10,7 +10,7 @@ aardvark: true
defined-atoms:
- name: entry
scope: hidden
-
+
...
Modified: lld/trunk/test/core/fixups-addend.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/fixups-addend.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/fixups-addend.objtxt (original)
+++ lld/trunk/test/core/fixups-addend.objtxt Sun Jan 26 21:09:26 2014
@@ -8,7 +8,7 @@
defined-atoms:
- name: foo
type: code
- content: [ 48, 8D, 3D, 00, 00, 00, 00,
+ content: [ 48, 8D, 3D, 00, 00, 00, 00,
48, 8D, 3D, 00, 00, 00, 00 ]
references:
- offset: 3
@@ -19,10 +19,10 @@ defined-atoms:
kind: pcrel32
target: bar
addend: -50
-
+
- name: func
type: code
- content: [ 48, 8D, 3D, 00, 00, 00, 00,
+ content: [ 48, 8D, 3D, 00, 00, 00, 00,
48, 8D, 3D, 00, 00, 00, 00 ]
references:
- offset: 3
@@ -33,11 +33,11 @@ defined-atoms:
kind: pcrel32
target: bar
addend: -50
-
+
undefined-atoms:
- name: bar
-
+
...
# CHECK: name: foo
Modified: lld/trunk/test/core/fixups-dup-named.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/fixups-dup-named.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/fixups-dup-named.objtxt (original)
+++ lld/trunk/test/core/fixups-dup-named.objtxt Sun Jan 26 21:09:26 2014
@@ -16,7 +16,7 @@ defined-atoms:
- offset: 6
kind: pcrel32
target: bar_2
-
+
- name: bar
ref-name: bar_1
scope: static
@@ -24,7 +24,7 @@ defined-atoms:
- name: bar
ref-name: bar_2
scope: static
-
+
...
Modified: lld/trunk/test/core/fixups-named.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/fixups-named.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/fixups-named.objtxt (original)
+++ lld/trunk/test/core/fixups-named.objtxt Sun Jan 26 21:09:26 2014
@@ -8,7 +8,7 @@
defined-atoms:
- name: foo
type: code
- content: [ E8, 00, 00, 00, 00,
+ content: [ E8, 00, 00, 00, 00,
E8, 00, 00, 00, 00 ]
references:
- offset: 1
@@ -17,14 +17,14 @@ defined-atoms:
- offset: 6
kind: pcrel32
target: baz
-
+
- name: baz
scope: static
type: code
undefined-atoms:
- name: bar
-
+
...
Modified: lld/trunk/test/core/fixups-unnamed.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/fixups-unnamed.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/fixups-unnamed.objtxt (original)
+++ lld/trunk/test/core/fixups-unnamed.objtxt Sun Jan 26 21:09:26 2014
@@ -8,7 +8,7 @@
defined-atoms:
- name: foo
type: code
- content: [ 48, 8D, 3D, 00, 00, 00, 00,
+ content: [ 48, 8D, 3D, 00, 00, 00, 00,
48, 8D, 3D, 00, 00, 00, 00 ]
references:
- offset: 3
@@ -17,7 +17,7 @@ defined-atoms:
- offset: 10
kind: pcrel32
target: LC2
-
+
- ref-name: LC1
type: c-string
@@ -28,7 +28,7 @@ defined-atoms:
type: c-string
merge: by-content
content: [ 74, 68, 65, 72, 65, 00 ]
-
+
...
Modified: lld/trunk/test/core/ingroup-test-big.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/ingroup-test-big.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/ingroup-test-big.objtxt (original)
+++ lld/trunk/test/core/ingroup-test-big.objtxt Sun Jan 26 21:09:26 2014
@@ -1,16 +1,16 @@
# RUN: lld -core --add-pass layout %s | FileCheck %s -check-prefix=CHKORDER
---
-defined-atoms:
+defined-atoms:
- name: A
scope: global
- references:
+ references:
- kind: layout-after
offset: 0
target: B
- name: B
scope: global
- references:
+ references:
- kind: in-group
offset: 0
target: A
@@ -19,13 +19,13 @@ defined-atoms:
target: C
- name: C
scope: global
- references:
+ references:
- kind: in-group
offset: 0
target: A
- name: E
scope: global
- references:
+ references:
- kind: in-group
offset: 0
target: E
@@ -34,13 +34,13 @@ defined-atoms:
target: F
- name: F
scope: global
- references:
+ references:
- kind: in-group
offset: 0
target: E
- name: D
scope: global
- references:
+ references:
- kind: in-group
offset: 0
target: A
Modified: lld/trunk/test/core/ingroup-test-loop.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/ingroup-test-loop.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/ingroup-test-loop.objtxt (original)
+++ lld/trunk/test/core/ingroup-test-loop.objtxt Sun Jan 26 21:09:26 2014
@@ -1,16 +1,16 @@
# RUN: lld -core --add-pass layout %s | FileCheck %s -check-prefix=CHKORDER
---
-defined-atoms:
+defined-atoms:
- name: A
scope: global
- references:
+ references:
- kind: layout-after
offset: 0
target: E
- name: E
scope: global
- references:
+ references:
- kind: in-group
offset: 0
target: A
Modified: lld/trunk/test/core/ingroup-test-with-layout-after.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/ingroup-test-with-layout-after.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/ingroup-test-with-layout-after.objtxt (original)
+++ lld/trunk/test/core/ingroup-test-with-layout-after.objtxt Sun Jan 26 21:09:26 2014
@@ -1,16 +1,16 @@
# RUN: lld -core --add-pass layout %s | FileCheck %s -check-prefix=CHKORDER
---
-defined-atoms:
+defined-atoms:
- name: A
scope: global
- references:
+ references:
- kind: layout-after
offset: 0
target: B
- name: B
scope: global
- references:
+ references:
- kind: in-group
offset: 0
target: A
@@ -19,7 +19,7 @@ defined-atoms:
target: E
- name: F
scope: global
- references:
+ references:
- kind: in-group
offset: 0
target: E
@@ -28,13 +28,13 @@ defined-atoms:
target: G
- name: G
scope: global
- references:
+ references:
- kind: in-group
offset: 0
target: E
- name: E
scope: global
- references:
+ references:
- kind: in-group
offset: 0
target: A
Modified: lld/trunk/test/core/ingroup-test.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/ingroup-test.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/ingroup-test.objtxt (original)
+++ lld/trunk/test/core/ingroup-test.objtxt Sun Jan 26 21:09:26 2014
@@ -1,31 +1,31 @@
# RUN: lld -core --add-pass layout %s | FileCheck %s -check-prefix=CHKORDER
---
-defined-atoms:
+defined-atoms:
- name: A
scope: global
- name: B
scope: global
- references:
+ references:
- kind: in-group
offset: 0
target: A
- name: F
scope: global
- references:
+ references:
- kind: in-group
offset: 0
target: E
- name: G
scope: global
- references:
+ references:
- kind: in-group
offset: 0
target: E
- name: E
scope: global
- references:
+ references:
- kind: in-group
offset: 0
target: A
Modified: lld/trunk/test/core/layoutafter-test.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/layoutafter-test.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/layoutafter-test.objtxt (original)
+++ lld/trunk/test/core/layoutafter-test.objtxt Sun Jan 26 21:09:26 2014
@@ -1,24 +1,24 @@
# RUN: lld -core --add-pass layout %s | FileCheck %s -check-prefix=CHKORDER
---
-defined-atoms:
+defined-atoms:
- name: fn3
scope: global
- name: fn2
scope: global
- references:
+ references:
- kind: layout-after
offset: 0
target: fn3
- name: fn
scope: global
- references:
+ references:
- kind: layout-after
offset: 0
target: fn1
- name: fn1
scope: global
- references:
+ references:
- kind: layout-after
offset: 0
target: fn2
Modified: lld/trunk/test/core/layoutbefore-test.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/layoutbefore-test.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/layoutbefore-test.objtxt (original)
+++ lld/trunk/test/core/layoutbefore-test.objtxt Sun Jan 26 21:09:26 2014
@@ -1,19 +1,19 @@
# RUN: lld -core --add-pass layout %s | FileCheck %s -check-prefix=CHKORDER
---
-defined-atoms:
+defined-atoms:
- name: fn
scope: global
- name: fn1
scope: global
- references:
+ references:
- kind: layout-before
offset: 0
target: fn
- name: fn2
scope: global
- references:
+ references:
- kind: layout-before
offset: 0
target: fn1
Modified: lld/trunk/test/core/pass-got-basic.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/pass-got-basic.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/pass-got-basic.objtxt (original)
+++ lld/trunk/test/core/pass-got-basic.objtxt Sun Jan 26 21:09:26 2014
@@ -8,11 +8,11 @@
defined-atoms:
- name: foo
type: code
- content: [ 48, 8B, 0D, 00, 00, 00, 00,
- 48, 8B, 0D, 00, 00, 00, 00,
- 48, 8B, 0D, 00, 00, 00, 00,
+ content: [ 48, 8B, 0D, 00, 00, 00, 00,
+ 48, 8B, 0D, 00, 00, 00, 00,
+ 48, 8B, 0D, 00, 00, 00, 00,
+ 48, 83, 3D, 00, 00, 00, 00, 00,
48, 83, 3D, 00, 00, 00, 00, 00,
- 48, 83, 3D, 00, 00, 00, 00, 00,
48, 83, 3D, 00, 00, 00, 00, 00,
48, 83, 3D, 00, 00, 00, 00, 00 ]
references:
@@ -46,12 +46,12 @@ defined-atoms:
shared-library-atoms:
- name: malloc
load-name: libc.so
-
+
...
# CHECK: defined-atoms:
# CHECK: name: foo
-# CHECK: references:
+# CHECK: references:
# CHECK: kind: pcrel32
# CHECK: offset: 3
# CHECK: target: L
Modified: lld/trunk/test/core/pass-stubs-basic.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/pass-stubs-basic.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/pass-stubs-basic.objtxt (original)
+++ lld/trunk/test/core/pass-stubs-basic.objtxt Sun Jan 26 21:09:26 2014
@@ -8,7 +8,7 @@
defined-atoms:
- name: foo
type: code
- content: [ E8, 00, 00, 00, 00, E8, 00, 00, 00,
+ content: [ E8, 00, 00, 00, 00, E8, 00, 00, 00,
00, 48 ,8B, 05, 00, 00, 00, 00 ]
references:
- offset: 1
@@ -24,14 +24,14 @@ defined-atoms:
shared-library-atoms:
- name: malloc
load-name: libc.so
-
+
- name: free
load-name: libc.so
...
# CHECK: name: foo
-# CHECK: references:
+# CHECK: references:
# CHECK: kind: call32
# CHECK: target: L
# CHECK: kind: call32
Modified: lld/trunk/test/core/permissions.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/permissions.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/permissions.objtxt (original)
+++ lld/trunk/test/core/permissions.objtxt Sun Jan 26 21:09:26 2014
@@ -11,13 +11,13 @@ defined-atoms:
- name: two
type: data
permissions: rw-
-
+
- name: three
type: const-data
-
+
- name: four
type: unknown
-
+
- name: oddCode
type: code
permissions: rwx
@@ -25,15 +25,15 @@ defined-atoms:
- name: oddData
type: data
permissions: rwx
-
+
- name: oddConstData
type: const-data
permissions: rw-
-
+
- name: oddUnknown
type: unknown
permissions: rw-
-
+
...
# CHECK: ---
Modified: lld/trunk/test/core/section-position.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/section-position.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/section-position.objtxt (original)
+++ lld/trunk/test/core/section-position.objtxt Sun Jan 26 21:09:26 2014
@@ -23,7 +23,7 @@ defined-atoms:
- name: data_start
type: data
section-position: start
-
+
---
defined-atoms:
- name: data_end_too
@@ -33,7 +33,7 @@ defined-atoms:
- name: some_more_data
type: data
content: [ 03, 04 ]
-
+
---
defined-atoms:
- name: early_data_too
@@ -44,7 +44,7 @@ defined-atoms:
...
-# CHKUNORD: defined-atoms:
+# CHKUNORD: defined-atoms:
# CHKUNORD: - name: data_end
# CHKUNORD: section-position: end
# CHKUNORD: - name: some_data
@@ -63,7 +63,7 @@ defined-atoms:
# CHKUNORD: section-position: early
# CHKUNORD: ...
-# CHKORDER: defined-atoms:
+# CHKORDER: defined-atoms:
# CHKORDER: - name: data_start
# CHKORDER: section-position: start
# CHKORDER: - name: early_data
Modified: lld/trunk/test/core/shared-library-basic.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/shared-library-basic.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/shared-library-basic.objtxt (original)
+++ lld/trunk/test/core/shared-library-basic.objtxt Sun Jan 26 21:09:26 2014
@@ -10,14 +10,14 @@ shared-library-atoms:
load-name: libc.so
type: code
size: 0
-
+
- name: free
load-name: libc.so
- name: fast_malloc
load-name: libc.so
can-be-null: at-runtime
-
+
- name: stdout
load-name: libc.so
type: data
Modified: lld/trunk/test/core/shared-library-coalesce.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/shared-library-coalesce.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/shared-library-coalesce.objtxt (original)
+++ lld/trunk/test/core/shared-library-coalesce.objtxt Sun Jan 26 21:09:26 2014
@@ -8,14 +8,14 @@
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
@@ -23,13 +23,13 @@ shared-library-atoms:
- 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
@@ -37,7 +37,7 @@ shared-library-atoms:
shared-library-atoms:
- name: foo2
load-name: libc.so
-
+
- name: foo3
load-name: libc.so
@@ -51,14 +51,14 @@ shared-library-atoms:
- 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
Modified: lld/trunk/test/core/undef-coalesce-error.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/undef-coalesce-error.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/undef-coalesce-error.objtxt (original)
+++ lld/trunk/test/core/undef-coalesce-error.objtxt Sun Jan 26 21:09:26 2014
@@ -3,7 +3,7 @@
# RUN: lld -core %s | FileCheck %s
#
-# Test that -undefines-are-errors triggers and error
+# Test that -undefines-are-errors triggers and error
# and that not using that option results in undefined atoms.
#
@@ -11,7 +11,7 @@
defined-atoms:
- name: foo
type: code
-
+
undefined-atoms:
- name: malloc
- name: free
@@ -19,7 +19,7 @@ undefined-atoms:
defined-atoms:
- name: bar
type: code
-
+
undefined-atoms:
- name: malloc
- name: myfunc
@@ -28,7 +28,7 @@ defined-atoms:
- name: myfunc
scope: global
type: code
-
+
undefined-atoms:
- name: free
...
Modified: lld/trunk/test/core/undef-coalesce.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/core/undef-coalesce.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/core/undef-coalesce.objtxt (original)
+++ lld/trunk/test/core/undef-coalesce.objtxt Sun Jan 26 21:09:26 2014
@@ -9,7 +9,7 @@
defined-atoms:
- name: foo
type: code
-
+
undefined-atoms:
- name: malloc
- name: free
@@ -17,7 +17,7 @@ undefined-atoms:
defined-atoms:
- name: bar
type: code
-
+
undefined-atoms:
- name: malloc
- name: myfunc
@@ -26,7 +26,7 @@ defined-atoms:
- name: myfunc
scope: global
type: code
-
+
undefined-atoms:
- name: free
...
Modified: lld/trunk/test/darwin/hello-world.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/darwin/hello-world.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/darwin/hello-world.objtxt (original)
+++ lld/trunk/test/darwin/hello-world.objtxt Sun Jan 26 21:09:26 2014
@@ -9,8 +9,8 @@ defined-atoms:
- name: _main
type: code
scope: global
- content: [ 55, 48, 89, E5, 48, 8D, 3D, 00,
- 00, 00, 00, E8, 00, 00, 00, 00,
+ content: [ 55, 48, 89, E5, 48, 8D, 3D, 00,
+ 00, 00, 00, E8, 00, 00, 00, 00,
31, C0, 5D, C3 ]
references:
- offset: 7
@@ -25,7 +25,7 @@ defined-atoms:
merge: by-content
content: [ 68, 65, 6C, 6C, 6F, 0A, 00 ]
-shared-library-atoms:
+shared-library-atoms:
- name: _printf
load-name: /usr/lib/libSystem.B.dylib
Modified: lld/trunk/test/darwin/native-and-mach-o.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/darwin/native-and-mach-o.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/darwin/native-and-mach-o.objtxt (original)
+++ lld/trunk/test/darwin/native-and-mach-o.objtxt Sun Jan 26 21:09:26 2014
@@ -9,13 +9,13 @@ defined-atoms:
- name: _main
type: code
scope: global
- content: [ 55, 48, 89, E5, 30, C0, E8, 00,
+ content: [ 55, 48, 89, E5, 30, C0, E8, 00,
00, 00, 00, 31, C0, 5D, C3 ]
references:
- offset: 7
kind: X86_64_RELOC_BRANCH
target: _foo
-
+
undefined-atoms:
- name: _foo
Modified: lld/trunk/test/elf/Hexagon/Inputs/dynobj.c
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Hexagon/Inputs/dynobj.c?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/Hexagon/Inputs/dynobj.c (original)
+++ lld/trunk/test/elf/Hexagon/Inputs/dynobj.c Sun Jan 26 21:09:26 2014
@@ -1,5 +1,5 @@
extern int shankar;
-static int a;
+static int a;
static int b;
int c;
int fn2() {
Modified: lld/trunk/test/elf/Hexagon/dynlib-gotoff.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Hexagon/dynlib-gotoff.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/Hexagon/dynlib-gotoff.test (original)
+++ lld/trunk/test/elf/Hexagon/dynlib-gotoff.test Sun Jan 26 21:09:26 2014
@@ -5,7 +5,7 @@ RUN: FileCheck -check-prefix=CHECKGOTPLT
- name: __got0
CHECKGOTPLT: type: got
-CHECKGOTPLT: content: [ 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
+CHECKGOTPLT: content: [ 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
CHECKGOTPLT: 00, 00, 00, 00 ]
CHECKGOTPLT: alignment: 2^3
CHECKGOTPLT: section-name: .got.plt
@@ -16,7 +16,7 @@ CHECKGOTPLT: content: [ 00, 0
CHECKGOTPLT: alignment: 2^2
CHECKGOTPLT: section-name: .got
CHECKGOTPLT: permissions: rw-
-CHECKGOTPLT: references:
+CHECKGOTPLT: references:
CHECKGOTPLT: - kind: R_HEX_GLOB_DAT
CHECKGOTPLT: offset: 0
CHECKGOTPLT: target: c
@@ -26,7 +26,7 @@ CHECKGOTPLT: content: [ 00, 0
CHECKGOTPLT: alignment: 2^2
CHECKGOTPLT: section-name: .got
CHECKGOTPLT: permissions: rw-
-CHECKGOTPLT: references:
+CHECKGOTPLT: references:
CHECKGOTPLT: - kind: R_HEX_GLOB_DAT
CHECKGOTPLT: offset: 0
CHECKGOTPLT: target: shankar
@@ -36,7 +36,7 @@ CHECKGOTPLT: content: [ 00, 0
CHECKGOTPLT: alignment: 2^2
CHECKGOTPLT: section-name: .got.plt
CHECKGOTPLT: permissions: rw-
-CHECKGOTPLT: references:
+CHECKGOTPLT: references:
CHECKGOTPLT: - kind: R_HEX_JMP_SLOT
CHECKGOTPLT: offset: 0
CHECKGOTPLT: target: fn
@@ -49,7 +49,7 @@ CHECKGOTPLT: content: [ 00, 0
CHECKGOTPLT: alignment: 2^2
CHECKGOTPLT: section-name: .got.plt
CHECKGOTPLT: permissions: rw-
-CHECKGOTPLT: references:
+CHECKGOTPLT: references:
CHECKGOTPLT: - kind: R_HEX_JMP_SLOT
CHECKGOTPLT: offset: 0
CHECKGOTPLT: target: fn1
@@ -62,7 +62,7 @@ CHECKGOTPLT: content: [ 00, 0
CHECKGOTPLT: alignment: 2^2
CHECKGOTPLT: section-name: .got.plt
CHECKGOTPLT: permissions: rw-
-CHECKGOTPLT: references:
+CHECKGOTPLT: references:
CHECKGOTPLT: - kind: R_HEX_JMP_SLOT
CHECKGOTPLT: offset: 0
CHECKGOTPLT: target: fn2
@@ -71,12 +71,12 @@ CHECKGOTPLT: offset: 0
target: .PLT0
- name: .PLT0
CHECKGOTPLT: type: stub
-CHECKGOTPLT: content: [ 00, 40, 00, 00, 1C, C0, 49, 6A, 0E, 42, 9C, E2,
-CHECKGOTPLT: 4F, 40, 9C, 91, 3C, C0, 9C, 91, 0E, 42, 0E, 8C,
+CHECKGOTPLT: content: [ 00, 40, 00, 00, 1C, C0, 49, 6A, 0E, 42, 9C, E2,
+CHECKGOTPLT: 4F, 40, 9C, 91, 3C, C0, 9C, 91, 0E, 42, 0E, 8C,
CHECKGOTPLT: 00, C0, 9C, 52 ]
CHECKGOTPLT: alignment: 2^4
CHECKGOTPLT: section-name: .plt
-CHECKGOTPLT: references:
+CHECKGOTPLT: references:
CHECKGOTPLT: - kind: R_HEX_B32_PCREL_X
CHECKGOTPLT: offset: 0
target: __got0
@@ -86,11 +86,11 @@ CHECKGOTPLT: offset: 4
CHECKGOTPLT: addend: 4
- name: __plt_fn
CHECKGOTPLT: type: stub
-CHECKGOTPLT: content: [ 00, 40, 00, 00, 0E, C0, 49, 6A, 1C, C0, 8E, 91,
+CHECKGOTPLT: content: [ 00, 40, 00, 00, 0E, C0, 49, 6A, 1C, C0, 8E, 91,
CHECKGOTPLT: 00, C0, 9C, 52 ]
CHECKGOTPLT: alignment: 2^4
CHECKGOTPLT: section-name: .plt
-CHECKGOTPLT: references:
+CHECKGOTPLT: references:
CHECKGOTPLT: - kind: R_HEX_B32_PCREL_X
CHECKGOTPLT: offset: 0
target: __got_fn
@@ -100,11 +100,11 @@ CHECKGOTPLT: offset: 4
CHECKGOTPLT: addend: 4
- name: __plt_fn1
CHECKGOTPLT: type: stub
-CHECKGOTPLT: content: [ 00, 40, 00, 00, 0E, C0, 49, 6A, 1C, C0, 8E, 91,
+CHECKGOTPLT: content: [ 00, 40, 00, 00, 0E, C0, 49, 6A, 1C, C0, 8E, 91,
CHECKGOTPLT: 00, C0, 9C, 52 ]
CHECKGOTPLT: alignment: 2^4
CHECKGOTPLT: section-name: .plt
-CHECKGOTPLT: references:
+CHECKGOTPLT: references:
CHECKGOTPLT: - kind: R_HEX_B32_PCREL_X
CHECKGOTPLT: offset: 0
target: __got_fn1
@@ -114,11 +114,11 @@ CHECKGOTPLT: offset: 4
CHECKGOTPLT: addend: 4
- name: __plt_fn2
CHECKGOTPLT: type: stub
-CHECKGOTPLT: content: [ 00, 40, 00, 00, 0E, C0, 49, 6A, 1C, C0, 8E, 91,
+CHECKGOTPLT: content: [ 00, 40, 00, 00, 0E, C0, 49, 6A, 1C, C0, 8E, 91,
CHECKGOTPLT: 00, C0, 9C, 52 ]
CHECKGOTPLT: alignment: 2^4
CHECKGOTPLT: section-name: .plt
-CHECKGOTPLT: references:
+CHECKGOTPLT: references:
CHECKGOTPLT: - kind: R_HEX_B32_PCREL_X
CHECKGOTPLT: offset: 0
target: __got_fn2
Modified: lld/trunk/test/elf/Hexagon/dynlib.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Hexagon/dynlib.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/Hexagon/dynlib.test (original)
+++ lld/trunk/test/elf/Hexagon/dynlib.test Sun Jan 26 21:09:26 2014
@@ -1,4 +1,4 @@
-RUN: lld -flavor gnu -target hexagon %p/Inputs/use-shared.hexagon -shared -o %t1
+RUN: lld -flavor gnu -target hexagon %p/Inputs/use-shared.hexagon -shared -o %t1
RUN: llvm-readobj -dyn-symbols %t1 > %t2
RUN: FileCheck -check-prefix=DYNSYMS %s < %t2
Modified: lld/trunk/test/elf/Hexagon/hexagon-plt-setup.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Hexagon/hexagon-plt-setup.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/Hexagon/hexagon-plt-setup.test (original)
+++ lld/trunk/test/elf/Hexagon/hexagon-plt-setup.test Sun Jan 26 21:09:26 2014
@@ -1,15 +1,15 @@
RUN: lld -flavor gnu -target hexagon %p/Inputs/use-shared.hexagon \
-RUN: --output-filetype=yaml --noinhibit-exec -o %t2
+RUN: --output-filetype=yaml --noinhibit-exec -o %t2
RUN: FileCheck %s < %t2
CHECK: - name: fn3
-CHECK: references:
+CHECK: references:
CHECK: - kind: R_HEX_B22_PCREL
CHECK: offset: 4
- target:
+ target:
CHECK: - kind: R_HEX_B22_PCREL
CHECK: offset: 8
- target:
+ target:
CHECK: - kind: layout-before
CHECK: offset: 0
CHECK: target: fn1
Modified: lld/trunk/test/elf/Hexagon/initfini-option.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Hexagon/initfini-option.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/Hexagon/initfini-option.test (original)
+++ lld/trunk/test/elf/Hexagon/initfini-option.test Sun Jan 26 21:09:26 2014
@@ -1,7 +1,7 @@
# This tests the functionality that lld is able to create
# init_array/fini_array sections in the output ELF. This
# corresponds to the the .init_array/.fini_array sections
-# in the output ELF.
+# 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
@@ -9,13 +9,13 @@ RUN: FileCheck %s < %t
CHECK: content: [ 00, 00, 00, 00 ]
CHECK: section-name: .init_array
-CHECK: references:
+CHECK: references:
CHECK: - kind: R_HEX_32
CHECK: offset: 0
CHECK: target: init
CHECK: content: [ 00, 00, 00, 00 ]
CHECK: section-name: .fini_array
-CHECK: references:
+CHECK: references:
CHECK: - kind: R_HEX_32
CHECK: offset: 0
CHECK: target: fini
Modified: lld/trunk/test/elf/Hexagon/rela-order.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Hexagon/rela-order.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/Hexagon/rela-order.test (original)
+++ lld/trunk/test/elf/Hexagon/rela-order.test Sun Jan 26 21:09:26 2014
@@ -1,5 +1,5 @@
RUN: lld -flavor gnu -target hexagon %p/Inputs/dynobj.o -shared \
-RUN: --noinhibit-exec -o %t
+RUN: --noinhibit-exec -o %t
RUN: llvm-objdump -section-headers %t | FileCheck %s
CHECK: .dynsym
Modified: lld/trunk/test/elf/Mips/dynlib-dynamic.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/dynlib-dynamic.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/dynlib-dynamic.test (original)
+++ lld/trunk/test/elf/Mips/dynlib-dynamic.test Sun Jan 26 21:09:26 2014
@@ -8,7 +8,7 @@
# CHECK: Format: ELF32-mips
# CHECK: Arch: mipsel
# CHECK: AddressSize: 32bit
-# CHECK: LoadName:
+# CHECK: LoadName:
# CHECK: DynamicSection [ (15 entries)
# CHECK: Tag Type Name/Value
# CHECK: 0x00000004 HASH 0xD4
Modified: lld/trunk/test/elf/Mips/dynlib-dynsym.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/dynlib-dynsym.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/dynlib-dynsym.test (original)
+++ lld/trunk/test/elf/Mips/dynlib-dynsym.test Sun Jan 26 21:09:26 2014
@@ -14,7 +14,7 @@
# CHECK-DYN: Format: ELF32-mips
# CHECK-DYN: Arch: mipsel
# CHECK-DYN: AddressSize: 32bit
-# CHECK-DYN: LoadName:
+# CHECK-DYN: LoadName:
# CHECK-DYN: DynamicSymbols [
# CHECK-DYN: Symbol {
# CHECK-DYN: Name: @ (0)
Modified: lld/trunk/test/elf/Mips/dynlib-fileheader.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/dynlib-fileheader.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/dynlib-fileheader.test (original)
+++ lld/trunk/test/elf/Mips/dynlib-fileheader.test Sun Jan 26 21:09:26 2014
@@ -8,7 +8,7 @@
# CHECK: Format: ELF32-mips
# CHECK: Arch: mipsel
# CHECK: AddressSize: 32bit
-# CHECK: LoadName:
+# CHECK: LoadName:
# CHECK: ElfHeader {
# CHECK: Ident {
# CHECK: Magic: (7F 45 4C 46)
Modified: lld/trunk/test/elf/Mips/got16.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/got16.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/got16.test (original)
+++ lld/trunk/test/elf/Mips/got16.test Sun Jan 26 21:09:26 2014
@@ -94,7 +94,7 @@
# RAW: 178: 24 80 84 8f lw $4, -32732($gp)
# RAW: SYMBOL TABLE:
-# RAW: 00000000 *UND* 00000000
+# RAW: 00000000 *UND* 00000000
# RAW: 00002000 l .data 00000000 local
.global glob
Modified: lld/trunk/test/elf/Mips/gotsym.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/gotsym.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/gotsym.test (original)
+++ lld/trunk/test/elf/Mips/gotsym.test Sun Jan 26 21:09:26 2014
@@ -6,7 +6,7 @@
# SHARED: Sections:
# SHARED: Idx Name Size Address Type
-# SHARED: 6 .got 00000008 0000000000001000 DATA
+# SHARED: 6 .got 00000008 0000000000001000 DATA
# SHARED: SYMBOL TABLE:
# SHARED: 00001000 g *ABS* 00000000 _GLOBAL_OFFSET_TABLE_
# SHARED: 00008ff0 g *ABS* 00000000 _gp
Modified: lld/trunk/test/elf/Mips/hilo16-1.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/hilo16-1.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/hilo16-1.test (original)
+++ lld/trunk/test/elf/Mips/hilo16-1.test Sun Jan 26 21:09:26 2014
@@ -14,8 +14,8 @@
# CHECK: Sections:
# CHECK: Idx Name Size Address Type
-# CHECK: 4 .text 00000018 0000000000000134 TEXT DATA
-# CHECK: 6 .got 00000008 0000000000001000 DATA
+# CHECK: 4 .text 00000018 0000000000000134 TEXT DATA
+# CHECK: 6 .got 00000008 0000000000001000 DATA
# CHECK: SYMBOL TABLE:
# CHECK: 00000134 g F .text 0000000c glob1
Modified: lld/trunk/test/elf/X86_64/dontignorezerosize-sections.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/dontignorezerosize-sections.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/X86_64/dontignorezerosize-sections.test (original)
+++ lld/trunk/test/elf/X86_64/dontignorezerosize-sections.test Sun Jan 26 21:09:26 2014
@@ -3,7 +3,7 @@ RUN: lld -flavor gnu -target x86_64-linu
RUN: --noinhibit-exec --output-filetype=yaml -o %t
RUN: FileCheck %s < %t
-CHECK: references:
+CHECK: references:
CHECK: - kind: R_X86_64_16
CHECK: offset: 0
CHECK: target: L000
Modified: lld/trunk/test/elf/X86_64/extern-tls.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/extern-tls.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/X86_64/extern-tls.test (original)
+++ lld/trunk/test/elf/X86_64/extern-tls.test Sun Jan 26 21:09:26 2014
@@ -10,7 +10,7 @@ CHECKGOT: alignment: 2^3
CHECKGOT: section-choice: custom-required
CHECKGOT: section-name: .got
CHECKGOT: permissions: rw-
-CHECKGOT: references:
+CHECKGOT: references:
CHECKGOT: - kind: R_X86_64_TPOFF64
CHECKGOT: offset: 0
CHECKGOT: target: extern_tls
Modified: lld/trunk/test/elf/X86_64/initfini-option.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/initfini-option.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/X86_64/initfini-option.test (original)
+++ lld/trunk/test/elf/X86_64/initfini-option.test Sun Jan 26 21:09:26 2014
@@ -1,7 +1,7 @@
# This tests the functionality that lld is able to create
# init_array/fini_array sections in the output ELF. This
# corresponds to the the .init_array/.fini_array sections
-# in the output ELF.
+# 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
@@ -9,13 +9,13 @@ RUN: FileCheck %s < %t
CHECK: content: [ 00, 00, 00, 00, 00, 00, 00, 00 ]
CHECK: section-name: .init_array
-CHECK: references:
+CHECK: references:
CHECK: - kind: R_X86_64_64
CHECK: offset: 0
CHECK: target: init
CHECK: content: [ 00, 00, 00, 00, 00, 00, 00, 00 ]
CHECK: section-name: .fini_array
-CHECK: references:
+CHECK: references:
CHECK: - kind: R_X86_64_64
CHECK: offset: 0
CHECK: target: fini
Modified: lld/trunk/test/elf/X86_64/initfini.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/initfini.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/X86_64/initfini.test (original)
+++ lld/trunk/test/elf/X86_64/initfini.test Sun Jan 26 21:09:26 2014
@@ -1,7 +1,7 @@
# This tests the functionality that lld is able to read
# init_array/fini_array sections in the input ELF. This
# corresponds to the the .init_array/.fini_array sections
-# in the output ELF.
+# in the output ELF.
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/initfini.o \
RUN: --noinhibit-exec --output-filetype=yaml -o %t
@@ -10,14 +10,14 @@ RUN: FileCheck %s < %t
CHECK: - type: data
CHECK: content: [ 00, 00, 00, 00, 00, 00, 00, 00 ]
CHECK: section-name: .init_array
-CHECK: references:
+CHECK: references:
CHECK: - kind: R_X86_64_64
CHECK: offset: 0
CHECK: target: constructor
CHECK: - type: data
CHECK: content: [ 00, 00, 00, 00, 00, 00, 00, 00 ]
CHECK: section-name: .fini_array
-CHECK: references:
+CHECK: references:
CHECK: - kind: R_X86_64_64
CHECK: offset: 0
CHECK: target: destructor
Modified: lld/trunk/test/elf/X86_64/layoutpass-order.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/layoutpass-order.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/X86_64/layoutpass-order.test (original)
+++ lld/trunk/test/elf/X86_64/layoutpass-order.test Sun Jan 26 21:09:26 2014
@@ -1,5 +1,5 @@
# This test checks that we follow the command line order of layouting
-# symbols in the output file
+# symbols in the output file
RUN: lld -flavor gnu -target x86_64 %p/Inputs/layoutpass/1.o \
RUN: %p/Inputs/layoutpass/lib2.a %p/Inputs/layoutpass/3.o -o %t \
Modified: lld/trunk/test/elf/X86_64/multi-weak-layout.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/multi-weak-layout.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/X86_64/multi-weak-layout.test (original)
+++ lld/trunk/test/elf/X86_64/multi-weak-layout.test Sun Jan 26 21:09:26 2014
@@ -7,21 +7,21 @@ RUN: FileCheck %s -check-prefix=WEAKSYMS
WEAKSYMS: - ref-name: [[SYMA:[-a-zA-Z0-9_]+]]
WEAKSYMS: type: data
-WEAKSYMS: references:
+WEAKSYMS: references:
WEAKSYMS: - kind: layout-after
WEAKSYMS: target: [[SYMB:[-a-zA-Z0-9_]+]]
WEAKSYMS: - name: myfn2
WEAKSYMS: scope: global
WEAKSYMS: type: data
WEAKSYMS: merge: as-weak
-WEAKSYMS: references:
+WEAKSYMS: references:
WEAKSYMS: - kind: layout-after
WEAKSYMS: target: [[SYMB]]
WEAKSYMS: - ref-name: [[SYMB]]
WEAKSYMS: scope: global
WEAKSYMS: type: data
WEAKSYMS: content: [ 00, 00, 00, 00, 00, 00, 00, 00 ]
-WEAKSYMS: references:
+WEAKSYMS: references:
WEAKSYMS: - kind: R_X86_64_64
WEAKSYMS: target: test
WEAKSYMS: - kind: layout-before
@@ -32,14 +32,14 @@ WEAKSYMS: - name: myfn1
WEAKSYMS: scope: global
WEAKSYMS: type: data
WEAKSYMS: merge: as-weak
-WEAKSYMS: references:
+WEAKSYMS: references:
WEAKSYMS: - kind: layout-after
WEAKSYMS: target: [[SYMC]]
WEAKSYMS: - ref-name: [[SYMC]]
WEAKSYMS: scope: global
WEAKSYMS: type: data
WEAKSYMS: content: [ 00, 00, 00, 00, 00, 00, 00, 00 ]
-WEAKSYMS: references:
+WEAKSYMS: references:
WEAKSYMS: - kind: R_X86_64_64
WEAKSYMS: target: test
WEAKSYMS: - kind: layout-before
Modified: lld/trunk/test/elf/X86_64/rodata.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/rodata.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/X86_64/rodata.test (original)
+++ lld/trunk/test/elf/X86_64/rodata.test Sun Jan 26 21:09:26 2014
@@ -1,9 +1,9 @@
-# This tests that the ordinals for all merge atoms and defined atoms have been
+# This tests that the ordinals for all merge atoms and defined atoms have been
# set properly
RUN: lld -flavor gnu -target x86_64 %p/Inputs/rodata.o --noinhibit-exec \
RUN: --merge-strings -static -o %t1
-RUN: llvm-nm -n %t1 | FileCheck %s
+RUN: llvm-nm -n %t1 | FileCheck %s
CHECK: {{[0-9a-f]+}} R _nl_default_default_domain
CHECK: {{[0-9a-f]+}} R _nl_default_default_dirname
Modified: lld/trunk/test/elf/X86_64/sectionmap.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/sectionmap.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/X86_64/sectionmap.test (original)
+++ lld/trunk/test/elf/X86_64/sectionmap.test Sun Jan 26 21:09:26 2014
@@ -1,5 +1,5 @@
# This tests that we are able to merge the section .gcc_except_table,
-# .data.rel.local, .data.rel.ro, any other sections that belong to .data
+# .data.rel.local, .data.rel.ro, any other sections that belong to .data
# into appropriate output sections
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/sectionmap.o \
RUN: --noinhibit-exec -o %t
Modified: lld/trunk/test/elf/X86_64/startGroupEndGroupWithDynlib.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/startGroupEndGroupWithDynlib.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/X86_64/startGroupEndGroupWithDynlib.test (original)
+++ lld/trunk/test/elf/X86_64/startGroupEndGroupWithDynlib.test Sun Jan 26 21:09:26 2014
@@ -1,4 +1,4 @@
-# This tests functionality of --start-group, --end-group with a dynamic library
+# This tests functionality of --start-group, --end-group with a dynamic library
# Mix dynamic libraries/object files in group
RUN: lld -flavor gnu -target x86_64 %p/Inputs/group/1.o --start-group \
Modified: lld/trunk/test/elf/X86_64/weak-override.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/weak-override.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/X86_64/weak-override.test (original)
+++ lld/trunk/test/elf/X86_64/weak-override.test Sun Jan 26 21:09:26 2014
@@ -8,20 +8,20 @@ RUN: FileCheck -check-prefix=WEAKATOMSOR
WEAKORDER: {{[0-9a-c]+}} T f
-WEAKATOMSORDER: references:
+WEAKATOMSORDER: references:
WEAKATOMSORDER: - kind: layout-after
WEAKATOMSORDER: offset: 0
WEAKATOMSORDER: target: fn
WEAKATOMSORDER: - name: fn
-WEAKATOMSORDER: references:
+WEAKATOMSORDER: references:
WEAKATOMSORDER: - kind: layout-after
WEAKATOMSORDER: offset: 0
WEAKATOMSORDER: target: [[CONSTSTRA:[-a-zA-Z0-9_]+]]
WEAKATOMSORDER: - ref-name: [[CONSTSTRA]]
WEAKATOMSORDER: scope: global
-WEAKATOMSORDER: content: [ 55, 48, 89, E5, BF, 00, 00, 00, 00, E8, 00, 00,
+WEAKATOMSORDER: content: [ 55, 48, 89, E5, BF, 00, 00, 00, 00, E8, 00, 00,
WEAKATOMSORDER: 00, 00, 5D, C3 ]
-WEAKATOMSORDER: references:
+WEAKATOMSORDER: references:
WEAKATOMSORDER: - kind: layout-before
WEAKATOMSORDER: offset: 0
WEAKATOMSORDER: target: fn
@@ -30,9 +30,9 @@ WEAKATOMSORDER: offset:
WEAKATOMSORDER: target: main
WEAKATOMSORDER: - name: main
WEAKATOMSORDER: scope: global
-WEAKATOMSORDER: content: [ 55, 48, 89, E5, B8, 00, 00, 00, 00, E8, 00, 00,
+WEAKATOMSORDER: content: [ 55, 48, 89, E5, B8, 00, 00, 00, 00, E8, 00, 00,
WEAKATOMSORDER: 00, 00, B8, 00, 00, 00, 00, 5D, C3 ]
-WEAKATOMSORDER: references:
+WEAKATOMSORDER: references:
WEAKATOMSORDER: - kind: R_X86_64_PC32
WEAKATOMSORDER: offset: 10
WEAKATOMSORDER: target: f
@@ -41,14 +41,14 @@ WEAKATOMSORDER: - kind:
WEAKATOMSORDER: offset: 0
WEAKATOMSORDER: target: [[CONSTSTRA]]
WEAKATOMSORDER: - ref-name: {{[0-9A-Z]+}}
-WEAKATOMSORDER: references:
+WEAKATOMSORDER: references:
WEAKATOMSORDER: - kind: layout-after
WEAKATOMSORDER: offset: 0
WEAKATOMSORDER: target: f
WEAKATOMSORDER: - name: f
WEAKATOMSORDER: scope: global
-WEAKATOMSORDER: content: [ 55, 48, 89, E5, BF, 00, 00, 00, 00, E8, 00, 00,
+WEAKATOMSORDER: content: [ 55, 48, 89, E5, BF, 00, 00, 00, 00, E8, 00, 00,
WEAKATOMSORDER: 00, 00, 5D, C3 ]
-WEAKATOMSORDER: references:
+WEAKATOMSORDER: references:
WEAKATOMSORDER: - kind: layout-before
WEAKATOMSORDER: offset: 0
Modified: lld/trunk/test/elf/X86_64/weak-zero-sized.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/weak-zero-sized.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/X86_64/weak-zero-sized.test (original)
+++ lld/trunk/test/elf/X86_64/weak-zero-sized.test Sun Jan 26 21:09:26 2014
@@ -17,7 +17,7 @@ WEAKATOMSORDER: - name: _sta
WEAKATOMSORDER: scope: global
WEAKATOMSORDER: merge: as-weak
WEAKATOMSORDER: alignment: 2^2
-WEAKATOMSORDER: references:
+WEAKATOMSORDER: references:
WEAKATOMSORDER: - kind: layout-after
WEAKATOMSORDER: offset: 0
WEAKATOMSORDER: target: [[TARGETB]]
@@ -25,7 +25,7 @@ WEAKATOMSORDER: - ref-name: [[TA
WEAKATOMSORDER: scope: global
WEAKATOMSORDER: content: [ C3 ]
WEAKATOMSORDER: alignment: 2^2
-WEAKATOMSORDER: references:
+WEAKATOMSORDER: references:
WEAKATOMSORDER: - kind: layout-before
WEAKATOMSORDER: offset: 0
WEAKATOMSORDER: target: [[TARGETA]]
Modified: lld/trunk/test/elf/abs.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/abs.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/abs.test (original)
+++ lld/trunk/test/elf/abs.test Sun Jan 26 21:09:26 2014
@@ -11,7 +11,7 @@
#
RUN: lld -flavor gnu --output-filetype=yaml -r %p/Inputs/abs-test.i386 | FileCheck -check-prefix=YAML %s
-YAML: absolute-atoms:
+YAML: absolute-atoms:
YAML: - name: absLocalSymbol
YAML: value: {{0x[0]+C0000}}
YAML: - name: absGlobalSymbol
Modified: lld/trunk/test/elf/archive-elf-forceload.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/archive-elf-forceload.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/archive-elf-forceload.test (original)
+++ lld/trunk/test/elf/archive-elf-forceload.test Sun Jan 26 21:09:26 2014
@@ -1,5 +1,5 @@
-# Tests the functionality of archive libraries reading
-# and resolution
+# Tests the functionality of archive libraries reading
+# and resolution
# Note: The binary files would not be required once we have support to generate
# binary archives from textual(yaml) input
#
@@ -10,13 +10,13 @@
# fn();
# return 0;
# }
-#
+#
# archive file
# int fn()
# {
# return 0;
# }
-#
+#
# int fn1()
# {
# return 0;
@@ -27,14 +27,14 @@ RUN: lld -flavor gnu -target x86_64-linu
RUN: --whole-archive %p/Inputs/libfnarchive.a --no-whole-archive --output-filetype=yaml \
RUN: | FileCheck -check-prefix FORCELOAD %s
-FORCELOAD: defined-atoms:
+FORCELOAD: defined-atoms:
FORCELOAD: - name: fn1
FORCELOAD: scope: global
FORCELOAD: content: [ 55, 48, 89, E5, B8, 00, 00, 00, 00, 5D, C3 ]
FORCELOAD: - name: fn
FORCELOAD: scope: global
FORCELOAD: content: [ 55, 48, 89, E5, B8, 00, 00, 00, 00, 5D, C3 ]
-FORCELOAD: absolute-atoms:
+FORCELOAD: absolute-atoms:
FORCELOAD: - name: main.c
FORCELOAD: value: 0x0
FORCELOAD: - name: fn1.c
Modified: lld/trunk/test/elf/branch.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/branch.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/branch.test (original)
+++ lld/trunk/test/elf/branch.test Sun Jan 26 21:09:26 2014
@@ -6,10 +6,10 @@ RUN: llvm-readobj -h %t1 | FileCheck -c
hexagon-yaml: - name: back
hexagon-yaml: scope: global
-hexagon-yaml: content: [ 00, C0, 00, 7F, 00, C0, 00, 5A, 00, 00, 00, 00,
+hexagon-yaml: content: [ 00, C0, 00, 7F, 00, C0, 00, 5A, 00, 00, 00, 00,
hexagon-yaml: 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 ]
hexagon-yaml: references:
-hexagon-yaml: - kind:
+hexagon-yaml: - kind:
hexagon-yaml: offset: 4
hexagon-yaml: target: target
@@ -17,7 +17,7 @@ hexagon-yaml: - name: ta
hexagon-yaml: scope: global
hexagon-yaml: content: [ 00, C0, 00, 5A ]
hexagon-yaml: references:
-hexagon-yaml: - kind:
+hexagon-yaml: - kind:
hexagon-yaml: offset: 0
hexagon-yaml: target: back
Modified: lld/trunk/test/elf/check.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/check.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/check.test (original)
+++ lld/trunk/test/elf/check.test Sun Jan 26 21:09:26 2014
@@ -1,13 +1,13 @@
-# This tests the basic functionality of ordering data and functions as they
+# 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: %p/Inputs/object-test.elf-i386 -o %t
+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: %p/Inputs/object-test.elf-hexagon -o %t1
+RUN: %p/Inputs/object-test.elf-hexagon -o %t1
RUN: FileCheck %s -check-prefix ELF-hexagon < %t1
-ELF-i386: defined-atoms:
+ELF-i386: defined-atoms:
ELF-i386: - name: global_variable
ELF-i386: - name: uninitialized_static_variable
ELF-i386: - name: global_func
@@ -17,9 +17,9 @@ ELF-i386: - name: hidden_fu
ELF-i386: - name: no_dead_strip
ELF-i386: - name: no_special_section_func
ELF-i386: - name: special_section_func
-ELF-i386: undefined-atoms:
+ELF-i386: undefined-atoms:
ELF-i386: - name: puts
-ELF-i386: absolute-atoms:
+ELF-i386: absolute-atoms:
ELF-i386: - name: sample.c
ELF-hexagon: - name: global_variable
@@ -31,9 +31,9 @@ ELF-hexagon: - name: hidden
ELF-hexagon: - name: no_dead_strip
ELF-hexagon: - name: no_special_section_func
ELF-hexagon: - name: special_section_func
-ELF-hexagon: undefined-atoms:
+ELF-hexagon: undefined-atoms:
ELF-hexagon: - name: puts
-ELF-hexagon: absolute-atoms:
+ELF-hexagon: absolute-atoms:
ELF-hexagon: - name: sample.c
ELF-hexagon: scope: static
ELF-hexagon: value: 0x0000000000000000
Modified: lld/trunk/test/elf/dynamic-undef.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/dynamic-undef.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/dynamic-undef.test (original)
+++ lld/trunk/test/elf/dynamic-undef.test Sun Jan 26 21:09:26 2014
@@ -1,5 +1,5 @@
#
-# This test creates a executable and tests the options that are used to
+# This test creates a executable and tests the options that are used to
# to create an executable and a shared library
#
# This test will fail because there are unresolved symbols from the shared
@@ -10,14 +10,14 @@ RUN: FileCheck -check-prefix=EXEC %s < %
# This test will pass because of --allow-shlib-undefined
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/tls.x86-64 \
RUN: %p/Inputs/shared.so-x86-64 -o %t -e main --allow-shlib-undefined
-# Test creation of shared library, this should pass because we are using
+# Test creation of shared library, this should pass because we are using
# shared option and by default, dynamic library wouldnot create undefined atoms
# from the input shared library
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/tls.x86-64 \
RUN: %p/Inputs/shared.so-x86-64 -o %t -e main -shared
-# Test creation of shared library, this should fail because we are using
+# Test creation of shared library, this should fail because we are using
# shared option setting the options to use the shared library undefines to
-# create undefined atoms from the input shared library
+# create undefined atoms from the input shared library
RUN: not lld -flavor gnu -target x86_64-linux %p/Inputs/tls.x86-64 \
RUN: %p/Inputs/shared.so-x86-64 -o %t -e main -shared \
RUN: --use-shlib-undefines --no-allow-shlib-undefined 2> %t2
Modified: lld/trunk/test/elf/entry.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/entry.objtxt?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/entry.objtxt (original)
+++ lld/trunk/test/elf/entry.objtxt Sun Jan 26 21:09:26 2014
@@ -10,21 +10,21 @@
# RUN: lld -flavor gnu -target x86_64 %s -e _entrypoint --noinhibit-exec -o %t1
# RUN: llvm-nm -n %t1 | FileCheck %s
-#
+#
# CHECK: 004001e0 T main
# CHECK: 00401080 D _DYNAMIC
# CHECK: 00401080 A _end
# CHECK: 00401080 A end
# CHECK: U _entrypoint
-defined-atoms:
+defined-atoms:
- name: .text
alignment: 2^4
section-choice: custom-required
section-name: .text
- name: main
scope: global
- content: [ B8, 00, 00, 00, 00, C7, 44, 24, FC, 00, 00, 00,
+ content: [ B8, 00, 00, 00, 00, C7, 44, 24, FC, 00, 00, 00,
00, C3 ]
alignment: 2^4
section-choice: custom-required
@@ -44,15 +44,15 @@ defined-atoms:
section-name: .note.GNU-stack
permissions: r--
- name: .eh_frame
- content: [ 14, 00, 00, 00, 00, 00, 00, 00, 01, 7A, 52, 00,
- 01, 78, 10, 01, 1B, 0C, 07, 08, 90, 01, 00, 00,
- 14, 00, 00, 00, 1C, 00, 00, 00, 00, 00, 00, 00,
+ content: [ 14, 00, 00, 00, 00, 00, 00, 00, 01, 7A, 52, 00,
+ 01, 78, 10, 01, 1B, 0C, 07, 08, 90, 01, 00, 00,
+ 14, 00, 00, 00, 1C, 00, 00, 00, 00, 00, 00, 00,
0E, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 ]
alignment: 2^3
section-choice: custom-required
section-name: .eh_frame
permissions: r--
- references:
+ references:
- kind: R_X86_64_PC32
offset: 32
target: .text
Modified: lld/trunk/test/elf/gotpcrel.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/gotpcrel.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/gotpcrel.test (original)
+++ lld/trunk/test/elf/gotpcrel.test Sun Jan 26 21:09:26 2014
@@ -12,7 +12,7 @@ YAML: kind: R_X86_64_64
YAML: target: main
YAML: name: main
-YAML: references:
+YAML: references:
YAML: kind: R_X86_64_GOTPCREL
YAML: offset: 3
YAML: target: [[NULLGOT]]
Modified: lld/trunk/test/elf/hexagon-quickdata-sort.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/hexagon-quickdata-sort.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/hexagon-quickdata-sort.test (original)
+++ lld/trunk/test/elf/hexagon-quickdata-sort.test Sun Jan 26 21:09:26 2014
@@ -1,5 +1,5 @@
RUN: lld -flavor gnu -target hexagon %p/Inputs/quickdata-sort-test.o.elf-hexagon -o %t1 --noinhibit-exec
-RUN: llvm-nm -n %t1 | FileCheck %s -check-prefix=quickdataSort
+RUN: llvm-nm -n %t1 | FileCheck %s -check-prefix=quickdataSort
quickdataSort: 00002000 D AA1
quickdataSort: 00002001 D A1
Modified: lld/trunk/test/elf/hexagon-quickdata-sortcommon.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/hexagon-quickdata-sortcommon.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/hexagon-quickdata-sortcommon.test (original)
+++ lld/trunk/test/elf/hexagon-quickdata-sortcommon.test Sun Jan 26 21:09:26 2014
@@ -1,5 +1,5 @@
RUN: lld -flavor gnu -target hexagon -o %t1 --noinhibit-exec \
-RUN: %p/Inputs/quickdata-sortcommon-test.o.elf-hexagon
+RUN: %p/Inputs/quickdata-sortcommon-test.o.elf-hexagon
RUN: llvm-nm -n %t1 | FileCheck %s -check-prefix=quickdataSortCommon
quickdataSortCommon: 00002000 D AA1
Modified: lld/trunk/test/elf/ifunc.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/ifunc.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/ifunc.test (original)
+++ lld/trunk/test/elf/ifunc.test Sun Jan 26 21:09:26 2014
@@ -1,5 +1,5 @@
-# This test checks that IRELATIVE relocations are created for symbols that
-# need relocation even for static links.
+# 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: %p/Inputs/ifunc.x86-64 | FileCheck %s
@@ -42,7 +42,7 @@ PLT: target: [[PLTNAME]]
// Make sure the target of main's relocation is a stub with a PC32 relocation.
// This relocation is to the got atom, but you can't really write that check in
// FileCheck.
-PLT: name:
+PLT: name:
PLT: type: stub
PLT: references
PLT: kind: R_X86_64_PC32
Modified: lld/trunk/test/elf/mergeconstants.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/mergeconstants.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/mergeconstants.test (original)
+++ lld/trunk/test/elf/mergeconstants.test Sun Jan 26 21:09:26 2014
@@ -14,7 +14,7 @@ mergeAtoms: scope: global
mergeAtoms: type: data
mergeAtoms: content: [ 00, 00, 00, 00, 00, 00, 00, 00 ]
mergeAtoms: alignment: 2^3
-mergeAtoms: references:
+mergeAtoms: references:
mergeAtoms: - kind: R_X86_64_64
mergeAtoms: offset: 3
mergeAtoms: target: [[CONSTANT]]
Modified: lld/trunk/test/elf/options/dynamic-linker.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/options/dynamic-linker.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/options/dynamic-linker.test (original)
+++ lld/trunk/test/elf/options/dynamic-linker.test Sun Jan 26 21:09:26 2014
@@ -1,5 +1,5 @@
# This tests the functionality of specifying dynamic-linker argument in the
-# command line
+# command line
RUN: lld -flavor gnu -target x86_64 --dynamic-linker="/xyz.so" \
RUN: %p/../Inputs/foo.o.x86-64 --noinhibit-exec -o %t
RUN: llvm-objdump -s %t | FileCheck -check-prefix=DYNAMICINTERP1 %s
Modified: lld/trunk/test/elf/reloc.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/reloc.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/reloc.test (original)
+++ lld/trunk/test/elf/reloc.test Sun Jan 26 21:09:26 2014
@@ -1,7 +1,7 @@
RUN: lld -flavor gnu -target i386 --merge-strings -r --output-filetype=yaml \
RUN: %p/Inputs/reloc-test.elf-i386 | FileCheck %s -check-prefix ELF-i386
-ELF-i386: defined-atoms:
+ELF-i386: defined-atoms:
ELF-i386: - ref-name: [[STRNAMEA:[-a-zA-Z0-9_]+]]
ELF-i386: type: constant
ELF-i386: content: [ 68, 65, 6C, 6C, 6F, 20, 77, 6F, 72, 6C, 64, 00 ]
@@ -10,19 +10,19 @@ ELF-i386: - ref-name: [[STRNAME
ELF-i386: alignment: 2^4
ELF-i386: section-choice: custom-required
ELF-i386: section-name: .text.startup
-ELF-i386: references:
+ELF-i386: references:
ELF-i386: - kind: layout-after
ELF-i386: offset: 0
ELF-i386: target: main
ELF-i386: - name: main
ELF-i386: scope: global
-ELF-i386: content: [ 55, 89, E5, 83, E4, F0, 83, EC, 10, C7, 04, 24,
-ELF-i386: 00, 00, 00, 00, E8, FC, FF, FF, FF, 31, C0, C9,
+ELF-i386: content: [ 55, 89, E5, 83, E4, F0, 83, EC, 10, C7, 04, 24,
+ELF-i386: 00, 00, 00, 00, E8, FC, FF, FF, FF, 31, C0, C9,
ELF-i386: C3 ]
ELF-i386: alignment: 2^4
ELF-i386: section-choice: custom-required
ELF-i386: section-name: .text.startup
-ELF-i386: references:
+ELF-i386: references:
ELF-i386: - kind: R_386_32
ELF-i386: offset: 12
ELF-i386: target: [[STRNAMEA]]
@@ -33,9 +33,9 @@ ELF-i386: addend: 252
ELF-i386: - kind: layout-before
ELF-i386: offset: 0
ELF-i386: target: [[STRNAMEB]]
-ELF-i386: undefined-atoms:
+ELF-i386: undefined-atoms:
ELF-i386: - name: puts
-ELF-i386: absolute-atoms:
+ELF-i386: absolute-atoms:
ELF-i386: - name: test.c
ELF-i386: scope: static
ELF-i386: value: 0x0000000000000000
Modified: lld/trunk/test/elf/symbols.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/symbols.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/symbols.test (original)
+++ lld/trunk/test/elf/symbols.test Sun Jan 26 21:09:26 2014
@@ -1,5 +1,5 @@
-# Tests the functionality of archive libraries reading
-# and resolution
+# Tests the functionality of archive libraries reading
+# and resolution
# Note: The binary files would not be required once we have support to generate
# binary archives from textual(yaml) input
#
@@ -8,8 +8,8 @@
#
#extern int __bss_start __attribute__ ((weak));
#int a;
-#int main()
-#{
+#int main()
+#{
# return 0;
#}
#
Modified: lld/trunk/test/elf/tls.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/tls.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/tls.test (original)
+++ lld/trunk/test/elf/tls.test Sun Jan 26 21:09:26 2014
@@ -8,12 +8,12 @@ RUN: --noinhibit-exec -e main -static
// Verify that the TLS accesses have the correct offsets.
YAML: type: got
-YAML: references:
+YAML: references:
YAML: kind: R_X86_64_TPOFF64
YAML: target: tls2
YAML: name: main
-YAML: references:
+YAML: references:
YAML: kind: R_X86_64_TPOFF32
YAML: offset: 9
YAML: target: tls1
Modified: lld/trunk/test/elf/tlsAddr.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/tlsAddr.test?rev=200182&r1=200181&r2=200182&view=diff
==============================================================================
--- lld/trunk/test/elf/tlsAddr.test (original)
+++ lld/trunk/test/elf/tlsAddr.test Sun Jan 26 21:09:26 2014
@@ -4,4 +4,4 @@ RUN: lld -flavor gnu -target x86_64-linu
RUN: -o %t --noinhibit-exec
RUN: llvm-objdump -section-headers %t | FileCheck -check-prefix=CHECKADDR %s
-CHECKADDR: {{[0-9]+}} .data 00000000 0000000000401008 DATA
+CHECKADDR: {{[0-9]+}} .data 00000000 0000000000401008 DATA
More information about the llvm-commits
mailing list