Home
last modified time | relevance | path

Searched +full:undefined +full:- +full:atoms (Results 1 – 25 of 78) sorted by relevance

1234

/external/llvm-project/lld/docs/
Ddesign.rst6 Note: this document discuss Mach-O port of LLD. For ELF and COFF,
10 ------------
14 output file. Instead, lld is based on "Atoms". Traditional section based
21 attributes, such as: name, scope, content-type, alignment, etc. An atom also
28 live atoms, and then delete the non-live atoms.
32 ----------
36 other atoms, such as for literal c-strings or floating point constants, or for
43 There are three atoms: main, a proxy for printf, and an anonymous atom
44 containing the c-string literal "hello world". The Atom "main" has two
46 reference for the instruction that loads the address of the c-string literal.
[all …]
DReaders.rst6 Note: this document discuss Mach-O port of LLD. For ELF and COFF,
10 ------------
13 and create an `lld::File`:cpp:class: (which is a graph of Atoms)
46 created *only* through an object-format-specific
49 class is the one-and-only way to control how the Reader operates when
55 --------------
68 ---------------------
84 a collection of Atoms. The result is a vector of File pointers (instead of
90 ----------------
92 Atoms are always owned by their File object. During core linking when Atoms
[all …]
/external/llvm-project/lld/lib/Core/
DResolver.cpp1 //===- Core/Resolver.cpp - Resolves Atom References -----------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
38 for (auto &atom : file.undefined().owning_ptrs()) { in handleFile()
77 [&](StringRef undefName) -> llvm::Expected<bool> { in handleArchiveFile()
78 if (File *member = archiveFile->find(undefName)) { in handleArchiveFile()
79 member->setOrdinal(_ctx.getNextOrdinalAndIncrement()); in handleArchiveFile()
87 // Add all the atoms from the shared library in handleSharedLibrary()
93 forEachUndefines(file, [&](StringRef undefName) -> llvm::Expected<bool> { in handleSharedLibrary()
94 auto atom = sharedLibrary->exports(undefName); in handleSharedLibrary()
[all …]
/external/llvm-project/lld/include/lld/Core/
DAtom.h1 //===- Core/Atom.h - A node in linking graph --------------------*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
24 /// as a set of Atoms with References to other Atoms. Each Atom is a node
27 /// undefined symbol (extern declaration).
33 /// Whether this atom is defined or a proxy for an undefined symbol
36 definitionAbsolute, ///< Asm-only (foo = 10). Not tied to any content.
41 /// The scope in which this atom is accessible to other atoms.
43 scopeTranslationUnit, ///< Accessible only to atoms in the same translation
45 scopeLinkageUnit, ///< Accessible to atoms being linked but not visible
[all …]
DLinkingContext.h1 //===- lld/Core/LinkingContext.h - Linker Target Info Interface -*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
48 /// Whether core linking should remove Atoms not reachable by following
49 /// References from the entry point Atom or from all global scope Atoms
53 /// Only used if deadStrip() returns true. Means all global scope Atoms
54 /// should be marked live (along with all Atoms they reference). Usually
60 /// of DefinedAtoms that should be marked live (along with all Atoms they
61 /// reference). Only Atoms with scope scopeLinkageUnit or scopeGlobal can
95 /// (i.e. llvm::outs()) as it is used. This is used to implement the -t
[all …]
DFile.h1 //===- Core/File.h - A Container of Atoms ---------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
34 /// To iterate through the Atoms in a File there are four methods that
37 /// for (const DefinedAtoms *atom : file->defined()) {
54 kindUndefinedSymsObject, ///< a file for undefined symbols
111 /// The range type for the atoms.
181 virtual const AtomRange<UndefinedAtom> undefined() const = 0;
191 /// Drop all of the atoms owned by this file. This will result in all of
192 /// the atoms running their destructors.
[all …]
DResolver.h1 //===- Core/Resolver.h - Resolves Atom References -------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
42 // Handle files, this adds atoms from the current file thats
75 MergedFile() : SimpleFile("<linker-internal>", kindResolverMergedObject) {} in MergedFile()
76 void addAtoms(llvm::MutableArrayRef<OwningAtomPtr<Atom>> atoms);
88 // --start-group and --end-group
92 // List of undefined symbols.
97 // Searching them again would never succeed. When we look for undefined
DSimple.h1 //===- lld/Core/Simple.h - Simple implementations of Atom and File --------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
10 /// Provide simple implementations for Atoms and File.
12 //===----------------------------------------------------------------------===//
78 auto &atoms = _defined; in removeDefinedAtomsIf() local
79 auto newEnd = std::remove_if(atoms.begin(), atoms.end(), in removeDefinedAtomsIf()
83 atoms.erase(newEnd, atoms.end()); in removeDefinedAtomsIf()
88 const AtomRange<UndefinedAtom> undefined() const override { in undefined() function
219 [] (const SimpleReference *lhs, const SimpleReference *rhs) -> bool { in sortReferences()
[all …]
DSharedLibraryFile.h1 //===- Core/SharedLibraryFile.h - Models shared libraries as Atoms --------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
23 return f->kind() == kindSharedLibrary; in classof()
38 const AtomRange<UndefinedAtom> undefined() const override { in undefined() function
/external/llvm-project/lld/test/mach-o/
Dtwolevel_namespace_undef_dynamic_lookup.yaml1 # RUN: ld64.lld -arch x86_64 -macosx_version_min 10.9 -twolevel_namespace -undefined dynamic_lookup…
3 # Sanity check '-twolevel_namespace -undefined dynamic_lookup'.
4 # This should pass without error, even though '_bar' is undefined.
6 --- !native
7 defined-atoms:
8 - name: _main
13 - kind: branch32
16 undefined-atoms:
17 - name: _bar
Dflat_namespace_undef_suppress.yaml1 # RUN: ld64.lld -arch x86_64 -macosx_version_min 10.9 -flat_namespace -undefined suppress %s -o %t …
3 # Sanity check '-flat_namespace -undefined suppress'.
4 # This should pass without error, even though '_bar' is undefined.
6 --- !native
7 defined-atoms:
8 - name: _main
13 - kind: branch32
16 undefined-atoms:
17 - name: _bar
Dflat_namespace_undef_error.yaml1 # RUN: not ld64.lld -arch x86_64 -macosx_version_min 10.9 -flat_namespace -undefined error %s -o %t…
3 --- !native
4 defined-atoms:
5 - name: _main
10 - kind: branch32
13 undefined-atoms:
14 - name: _bar
16 # Make sure we error out for -flat_namespace -undefined error.
17 # CHECK: Undefined symbol: : _bar
Dtwolevel_namespace_undef_warning_suppress.yaml1 # RUN: not ld64.lld -arch x86_64 -macosx_version_min 10.9 -twolevel_namespace -undefined warning %s…
2 # RUN: FileCheck --check-prefix=CHECK-WARNING %s
3 # RUN: not ld64.lld -arch x86_64 -macosx_version_min 10.9 -twolevel_namespace -undefined suppress %…
4 # RUN: FileCheck --check-prefix=CHECK-SUPPRESS %s
6 --- !native
7 defined-atoms:
8 - name: _main
13 - kind: branch32
16 undefined-atoms:
17 - name: _bar
[all …]
Dobjc-category-list-atom.yaml1 # RUN: ld64.lld -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s
2 # RUN: ld64.lld -arch x86_64 -r -print_atoms %t -o %t2 | FileCheck %s
5 --- !mach-o
7 file-type: MH_OBJECT
9 compat-version: 0.0
10 current-version: 0.0
11 has-UUID: false
14 - segment: __DATA
23 - offset: 0x00000008
26 pc-rel: false
[all …]
Dlib-search-paths.yaml1 # RUN: ld64.lld -arch x86_64 %s -syslibroot %p/Inputs/lib-search-paths -lmyshared -lmystatic -lfile…
3 --- !native
4 undefined-atoms:
5 - name: _from_myshared
6 - name: _from_mystatic
7 - name: _from_fileo
9 # CHECK: defined-atoms:
10 # CHECK: - name: _from_fileo
12 # CHECK: - name: _from_mystatic
14 # CHECK: shared-library-atoms:
[all …]
Duse-simple-dylib.yaml1 # RUN: ld64.lld -arch x86_64 -print_atoms -r %s \
2 # RUN: %p/Inputs/use-simple-dylib.yaml -o %t | FileCheck %s
5 --- !mach-o
7 file-type: MH_OBJECT
9 has-UUID: false
12 - segment: __TEXT
22 global-symbols:
23 - name: _foo
28 undefined-symbols:
29 - name: _myGlobal
[all …]
Dparse-cfstring32.yaml1 # RUN: ld64.lld -arch i386 -r -print_atoms %s -o %t | FileCheck %s
3 # Test parsing of mach-o functions.
6 --- !mach-o
8 file-type: MH_OBJECT
10 has-UUID: false
13 - segment: __TEXT
20 - segment: __DATA
31 - offset: 0x00000018
34 pc-rel: false
37 - offset: 0x00000010
[all …]
Dparse-cfstring64.yaml1 # RUN: ld64.lld -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s
6 --- !mach-o
8 file-type: MH_OBJECT
10 has-UUID: false
13 - segment: __TEXT
20 - segment: __DATA
35 - offset: 0x00000030
38 pc-rel: false
41 - offset: 0x00000020
44 pc-rel: false
[all …]
Dparse-text-relocs-arm64.yaml1 # RUN: ld64.lld -arch arm64 -r -print_atoms %s -o %t | FileCheck %s \
2 # RUN: && ld64.lld -arch arm64 -r -print_atoms %t -o %t2 | FileCheck %s
6 # The first step tests if the supplied mach-o file is parsed into the correct
7 # set of references. The second step verifies relocations can be round-tripped
14 --- !mach-o
16 file-type: MH_OBJECT
18 has-UUID: false
21 - segment: __TEXT
34 - offset: 0x00000034
37 pc-rel: false
[all …]
Dparse-data-relocs-arm64.yaml1 # RUN: ld64.lld -arch arm64 -r -print_atoms %s -o %t | FileCheck %s
2 # RUN: ld64.lld -arch arm64 -r -print_atoms %t -o %t2 | FileCheck %s
6 # The first step tests if the supplied mach-o file is parsed into the correct
7 # set of references. The second step verifies relocations can be round-tripped
14 --- !mach-o
16 file-type: MH_OBJECT
19 - segment: __TEXT
26 - segment: __DATA
43 - offset: 0x00000050
46 pc-rel: true
[all …]
/external/llvm-project/lld/test/darwin/
Dnative-and-mach-o.objtxt1 # RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s \
2 # RUN: %p/Inputs/native-and-mach-o.objtxt \
3 # RUN: %p/Inputs/native-and-mach-o2.objtxt -o %t && \
4 # RUN: llvm-nm %t | FileCheck %s
6 # Test a mix of atoms and mach-o both encoded in yaml
9 --- !native
10 defined-atoms:
11 - name: _main
17 - offset: 7
21 undefined-atoms:
[all …]
/external/llvm-project/lld/lib/ReaderWriter/YAML/
DReaderWriterYAML.cpp1 //===- lib/ReaderWriter/YAML/ReaderWriterYAML.cpp -------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
56 /// The conversion of Atoms to and from YAML uses LLVM's YAML I/O. This
63 /// In most cases, atoms names are unambiguous, so references can just
65 /// cases that does not work, so ref-names are added. These are labels
68 /// One need for ref-names are when atoms have no user supplied name
69 /// (e.g. c-string literal). Another case is when two object files with
70 /// identically named static functions are merged (ld -r) into one object file.
72 /// ref-name is added.
[all …]
/external/llvm-project/lld/lib/ReaderWriter/MachO/
DFlatNamespaceFile.h1 //===- lib/ReaderWriter/MachO/FlatNamespaceFile.h -------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 #include "Atoms.h"
22 // resort, depending on how -flat_namespace and -undefined are set.
34 StringRef getDSOName() const override { return "flat-namespace"; } in getDSOName()
39 const AtomRange<UndefinedAtom> undefined() const override { in undefined() function
DFile.h1 //===- lib/ReaderWriter/MachO/File.h ----------------------------*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 #include "Atoms.h"
32 /// Real file constructor - for on-disk files.
34 : SimpleFile(mb->getBufferIdentifier(), File::kindMachObject), in MachOFile()
37 /// Dummy file constructor - for virtual files.
46 assert(sectionOffset+contentSize <= inSection->content.size()); in addDefinedAtom()
47 ArrayRef<uint8_t> content = inSection->content.slice(sectionOffset, in addDefinedAtom()
55 inSection->alignment, in addDefinedAtom()
[all …]
DExecutableAtoms.h1 //===- lib/ReaderWriter/MachO/ExecutableAtoms.h ---------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 #include "Atoms.h"
31 // phase will fail if "_main" is undefined.
38 this->addAtom(_undefMain); in CEntryFile()
48 // the Resolveing phase will fail if "dyld_stub_binder" is undefined.
55 this->addAtom(_undefBinder); in StubHelperFile()
127 const AtomRange<UndefinedAtom> undefined() const override { in undefined() function

1234