Movatterモバイル変換


[0]ホーム

URL:


LLVM 20.0.0git
ObjectFile.cpp
Go to the documentation of this file.
1//===- ObjectFile.cpp - File format independent object file ---------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file defines a file format independent ObjectFile class.
10//
11//===----------------------------------------------------------------------===//
12
13#include "llvm/Object/ObjectFile.h"
14#include "llvm/ADT/StringRef.h"
15#include "llvm/BinaryFormat/Magic.h"
16#include "llvm/Object/Binary.h"
17#include "llvm/Object/COFF.h"
18#include "llvm/Object/Error.h"
19#include "llvm/Object/MachO.h"
20#include "llvm/Object/Wasm.h"
21#include "llvm/Support/Error.h"
22#include "llvm/Support/ErrorHandling.h"
23#include "llvm/Support/ErrorOr.h"
24#include "llvm/Support/Format.h"
25#include "llvm/Support/MemoryBuffer.h"
26#include "llvm/Support/raw_ostream.h"
27#include <cstdint>
28#include <memory>
29#include <system_error>
30
31using namespacellvm;
32using namespaceobject;
33
34raw_ostream &object::operator<<(raw_ostream &OS,constSectionedAddress &Addr) {
35OS <<"SectionedAddress{" <<format_hex(Addr.Address, 10);
36if (Addr.SectionIndex !=SectionedAddress::UndefSection)
37OS <<", " <<Addr.SectionIndex;
38returnOS <<"}";
39}
40
41void ObjectFile::anchor() {}
42
43ObjectFile::ObjectFile(unsignedintType,MemoryBufferRef Source)
44 :SymbolicFile(Type, Source) {}
45
46boolSectionRef::containsSymbol(SymbolRef S) const{
47Expected<section_iterator> SymSec = S.getSection();
48if (!SymSec) {
49// TODO: Actually report errors helpfully.
50consumeError(SymSec.takeError());
51returnfalse;
52 }
53return *this == **SymSec;
54}
55
56Expected<uint64_t>ObjectFile::getSymbolValue(DataRefImplRef) const{
57uint32_t Flags;
58if (Error E =getSymbolFlags(Ref).moveInto(Flags))
59// TODO: Test this error.
60return std::move(E);
61
62if (Flags &SymbolRef::SF_Undefined)
63return 0;
64if (Flags &SymbolRef::SF_Common)
65returngetCommonSymbolSize(Ref);
66returngetSymbolValueImpl(Ref);
67}
68
69ErrorObjectFile::printSymbolName(raw_ostream &OS,DataRefImpl Symb) const{
70Expected<StringRef>Name =getSymbolName(Symb);
71if (!Name)
72returnName.takeError();
73OS << *Name;
74returnError::success();
75}
76
77uint32_tObjectFile::getSymbolAlignment(DataRefImpl DRI) const{return 0; }
78
79boolObjectFile::isSectionBitcode(DataRefImpl Sec) const{
80Expected<StringRef> NameOrErr =getSectionName(Sec);
81if (NameOrErr)
82return *NameOrErr ==".llvm.lto";
83consumeError(NameOrErr.takeError());
84returnfalse;
85}
86
87boolObjectFile::isSectionStripped(DataRefImpl Sec) const{returnfalse; }
88
89boolObjectFile::isBerkeleyText(DataRefImpl Sec) const{
90returnisSectionText(Sec);
91}
92
93boolObjectFile::isBerkeleyData(DataRefImpl Sec) const{
94returnisSectionData(Sec);
95}
96
97boolObjectFile::isDebugSection(DataRefImpl Sec) const{returnfalse; }
98
99boolObjectFile::hasDebugInfo() const{
100returnany_of(sections(),
101 [](SectionRef Sec) {return Sec.isDebugSection(); });
102}
103
104Expected<section_iterator>
105ObjectFile::getRelocatedSection(DataRefImpl Sec) const{
106returnsection_iterator(SectionRef(Sec,this));
107}
108
109TripleObjectFile::makeTriple() const{
110Triple TheTriple;
111auto Arch =getArch();
112 TheTriple.setArch(Triple::ArchType(Arch));
113
114autoOS =getOS();
115if (OS !=Triple::UnknownOS)
116 TheTriple.setOS(OS);
117
118// For ARM targets, try to use the build attributes to build determine
119// the build target. Target features are also added, but later during
120// disassembly.
121if (Arch ==Triple::arm || Arch ==Triple::armeb)
122setARMSubArch(TheTriple);
123
124// TheTriple defaults to ELF, and COFF doesn't have an environment:
125// something we can do here is indicate that it is mach-o.
126if (isMachO()) {
127 TheTriple.setObjectFormat(Triple::MachO);
128 }elseif (isCOFF()) {
129constauto COFFObj = cast<COFFObjectFile>(this);
130if (COFFObj->getArch() ==Triple::thumb)
131 TheTriple.setTriple("thumbv7-windows");
132 }elseif (isXCOFF()) {
133// XCOFF implies AIX.
134 TheTriple.setOS(Triple::AIX);
135 TheTriple.setObjectFormat(Triple::XCOFF);
136 }elseif (isGOFF()) {
137 TheTriple.setOS(Triple::ZOS);
138 TheTriple.setObjectFormat(Triple::GOFF);
139 }elseif (TheTriple.isAMDGPU()) {
140 TheTriple.setVendor(Triple::AMD);
141 }elseif (TheTriple.isNVPTX()) {
142 TheTriple.setVendor(Triple::NVIDIA);
143 }
144
145return TheTriple;
146}
147
148Expected<std::unique_ptr<ObjectFile>>
149ObjectFile::createObjectFile(MemoryBufferRef Object,file_magicType,
150bool InitContent) {
151StringRefData = Object.getBuffer();
152if (Type ==file_magic::unknown)
153Type =identify_magic(Data);
154
155switch (Type) {
156casefile_magic::unknown:
157casefile_magic::bitcode:
158casefile_magic::clang_ast:
159casefile_magic::coff_cl_gl_object:
160casefile_magic::archive:
161casefile_magic::macho_universal_binary:
162casefile_magic::windows_resource:
163casefile_magic::pdb:
164casefile_magic::minidump:
165casefile_magic::goff_object:
166casefile_magic::cuda_fatbinary:
167casefile_magic::offload_binary:
168casefile_magic::dxcontainer_object:
169casefile_magic::offload_bundle:
170casefile_magic::offload_bundle_compressed:
171casefile_magic::spirv_object:
172returnerrorCodeToError(object_error::invalid_file_type);
173casefile_magic::tapi_file:
174returnerrorCodeToError(object_error::invalid_file_type);
175casefile_magic::elf:
176casefile_magic::elf_relocatable:
177casefile_magic::elf_executable:
178casefile_magic::elf_shared_object:
179casefile_magic::elf_core:
180returncreateELFObjectFile(Object, InitContent);
181casefile_magic::macho_object:
182casefile_magic::macho_executable:
183casefile_magic::macho_fixed_virtual_memory_shared_lib:
184casefile_magic::macho_core:
185casefile_magic::macho_preload_executable:
186casefile_magic::macho_dynamically_linked_shared_lib:
187casefile_magic::macho_dynamic_linker:
188casefile_magic::macho_bundle:
189casefile_magic::macho_dynamically_linked_shared_lib_stub:
190casefile_magic::macho_dsym_companion:
191casefile_magic::macho_kext_bundle:
192casefile_magic::macho_file_set:
193returncreateMachOObjectFile(Object);
194casefile_magic::coff_object:
195casefile_magic::coff_import_library:
196casefile_magic::pecoff_executable:
197returncreateCOFFObjectFile(Object);
198casefile_magic::xcoff_object_32:
199returncreateXCOFFObjectFile(Object,Binary::ID_XCOFF32);
200casefile_magic::xcoff_object_64:
201returncreateXCOFFObjectFile(Object,Binary::ID_XCOFF64);
202casefile_magic::wasm_object:
203returncreateWasmObjectFile(Object);
204 }
205llvm_unreachable("Unexpected Object File Type");
206}
207
208Expected<OwningBinary<ObjectFile>>
209ObjectFile::createObjectFile(StringRef ObjectPath) {
210ErrorOr<std::unique_ptr<MemoryBuffer>> FileOrErr =
211MemoryBuffer::getFile(ObjectPath);
212if (std::error_code EC = FileOrErr.getError())
213returnerrorCodeToError(EC);
214 std::unique_ptr<MemoryBuffer> Buffer = std::move(FileOrErr.get());
215
216Expected<std::unique_ptr<ObjectFile>> ObjOrErr =
217createObjectFile(Buffer->getMemBufferRef());
218if (Error Err = ObjOrErr.takeError())
219return std::move(Err);
220 std::unique_ptr<ObjectFile> Obj = std::move(ObjOrErr.get());
221
222returnOwningBinary<ObjectFile>(std::move(Obj), std::move(Buffer));
223}
224
225boolObjectFile::isReflectionSectionStrippable(
226llvm::binaryformat::Swift5ReflectionSectionKind ReflectionSectionKind)
227 const{
228usingllvm::binaryformat::Swift5ReflectionSectionKind;
229return ReflectionSectionKind == Swift5ReflectionSectionKind::fieldmd ||
230 ReflectionSectionKind == Swift5ReflectionSectionKind::reflstr ||
231 ReflectionSectionKind == Swift5ReflectionSectionKind::assocty;
232}
Binary.h
Addr
uint64_t Addr
Definition:ELFObjHandler.cpp:79
Name
std::string Name
Definition:ELFObjHandler.cpp:77
ErrorOr.h
Provides ErrorOr<T> smart pointer.
Format.h
Magic.h
MemoryBuffer.h
ObjectFile.h
COFF.h
MachO.h
Wasm.h
OS
raw_pwrite_stream & OS
Definition:SampleProfWriter.cpp:51
StringRef.h
llvm::ErrorOr
Represents either an error or a value T.
Definition:ErrorOr.h:56
llvm::ErrorOr::get
reference get()
Definition:ErrorOr.h:149
llvm::ErrorOr::getError
std::error_code getError() const
Definition:ErrorOr.h:152
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition:Error.h:160
llvm::Error::success
static ErrorSuccess success()
Create a success value.
Definition:Error.h:337
llvm::Expected
Tagged union holding either a T or a Error.
Definition:Error.h:481
llvm::Expected::takeError
Error takeError()
Take ownership of the stored error.
Definition:Error.h:608
llvm::Expected::get
reference get()
Returns a reference to the stored T value.
Definition:Error.h:578
llvm::MemoryBufferRef
Definition:MemoryBufferRef.h:22
llvm::MemoryBuffer::getFile
static ErrorOr< std::unique_ptr< MemoryBuffer > > getFile(const Twine &Filename, bool IsText=false, bool RequiresNullTerminator=true, bool IsVolatile=false, std::optional< Align > Alignment=std::nullopt)
Open the specified file as a MemoryBuffer, returning a new MemoryBuffer if successful,...
Definition:MemoryBuffer.cpp:260
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition:StringRef.h:51
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition:Triple.h:44
llvm::Triple::setObjectFormat
void setObjectFormat(ObjectFormatType Kind)
Set the object file format.
Definition:Triple.cpp:1601
llvm::Triple::UnknownOS
@ UnknownOS
Definition:Triple.h:200
llvm::Triple::AIX
@ AIX
Definition:Triple.h:220
llvm::Triple::ZOS
@ ZOS
Definition:Triple.h:216
llvm::Triple::ArchType
ArchType
Definition:Triple.h:46
llvm::Triple::arm
@ arm
Definition:Triple.h:49
llvm::Triple::thumb
@ thumb
Definition:Triple.h:83
llvm::Triple::armeb
@ armeb
Definition:Triple.h:50
llvm::Triple::setTriple
void setTriple(const Twine &Str)
Set all components to the new triple Str.
Definition:Triple.cpp:1577
llvm::Triple::XCOFF
@ XCOFF
Definition:Triple.h:317
llvm::Triple::MachO
@ MachO
Definition:Triple.h:314
llvm::Triple::GOFF
@ GOFF
Definition:Triple.h:313
llvm::Triple::isAMDGPU
bool isAMDGPU() const
Definition:Triple.h:885
llvm::Triple::AMD
@ AMD
Definition:Triple.h:192
llvm::Triple::NVIDIA
@ NVIDIA
Definition:Triple.h:190
llvm::Triple::isNVPTX
bool isNVPTX() const
Tests whether the target is NVPTX (32- or 64-bit).
Definition:Triple.h:878
llvm::Triple::setOS
void setOS(OSType Kind)
Set the operating system (third) component of the triple to a known type.
Definition:Triple.cpp:1589
llvm::Triple::setArch
void setArch(ArchType Kind, SubArchType SubArch=NoSubArch)
Set the architecture (first) component of the triple to a known type.
Definition:Triple.cpp:1581
llvm::Triple::setVendor
void setVendor(VendorType Kind)
Set the vendor (second) component of the triple to a known type.
Definition:Triple.cpp:1585
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition:Type.h:45
llvm::object::BasicSymbolRef::SF_Common
@ SF_Common
Definition:SymbolicFile.h:114
llvm::object::BasicSymbolRef::SF_Undefined
@ SF_Undefined
Definition:SymbolicFile.h:110
llvm::object::Binary::Data
MemoryBufferRef Data
Definition:Binary.h:37
llvm::object::Binary::ID_XCOFF32
@ ID_XCOFF32
Definition:Binary.h:59
llvm::object::Binary::ID_XCOFF64
@ ID_XCOFF64
Definition:Binary.h:60
llvm::object::Binary::isXCOFF
bool isXCOFF() const
Definition:Binary.h:135
llvm::object::Binary::isMachO
bool isMachO() const
Definition:Binary.h:127
llvm::object::Binary::isCOFF
bool isCOFF() const
Definition:Binary.h:131
llvm::object::Binary::isGOFF
bool isGOFF() const
Definition:Binary.h:149
llvm::object::ObjectFile::isBerkeleyText
virtual bool isBerkeleyText(DataRefImpl Sec) const
Definition:ObjectFile.cpp:89
llvm::object::ObjectFile::getRelocatedSection
virtual Expected< section_iterator > getRelocatedSection(DataRefImpl Sec) const
Definition:ObjectFile.cpp:105
llvm::object::ObjectFile::getCommonSymbolSize
uint64_t getCommonSymbolSize(DataRefImpl Symb) const
Definition:ObjectFile.h:307
llvm::object::ObjectFile::getSectionName
virtual Expected< StringRef > getSectionName(DataRefImpl Sec) const =0
llvm::object::ObjectFile::isBerkeleyData
virtual bool isBerkeleyData(DataRefImpl Sec) const
Definition:ObjectFile.cpp:93
llvm::object::ObjectFile::ObjectFile
ObjectFile()=delete
llvm::object::ObjectFile::getSymbolName
virtual Expected< StringRef > getSymbolName(DataRefImpl Symb) const =0
llvm::object::ObjectFile::createMachOObjectFile
static Expected< std::unique_ptr< MachOObjectFile > > createMachOObjectFile(MemoryBufferRef Object, uint32_t UniversalCputype=0, uint32_t UniversalIndex=0, size_t MachOFilesetEntryOffset=0)
Create a MachOObjectFile instance from a given buffer.
Definition:MachOObjectFile.cpp:5319
llvm::object::ObjectFile::createCOFFObjectFile
static Expected< std::unique_ptr< COFFObjectFile > > createCOFFObjectFile(MemoryBufferRef Object)
Definition:COFFObjectFile.cpp:1896
llvm::object::ObjectFile::printSymbolName
Error printSymbolName(raw_ostream &OS, DataRefImpl Symb) const override
Definition:ObjectFile.cpp:69
llvm::object::ObjectFile::createELFObjectFile
static Expected< std::unique_ptr< ObjectFile > > createELFObjectFile(MemoryBufferRef Object, bool InitContent=true)
Definition:ELFObjectFile.cpp:72
llvm::object::ObjectFile::makeTriple
Triple makeTriple() const
Create a triple from the data in this object file.
Definition:ObjectFile.cpp:109
llvm::object::ObjectFile::isSectionText
virtual bool isSectionText(DataRefImpl Sec) const =0
llvm::object::ObjectFile::sections
section_iterator_range sections() const
Definition:ObjectFile.h:329
llvm::object::ObjectFile::SectionRef
friend class SectionRef
Definition:ObjectFile.h:261
llvm::object::ObjectFile::getSymbolValueImpl
virtual uint64_t getSymbolValueImpl(DataRefImpl Symb) const =0
llvm::object::ObjectFile::isDebugSection
virtual bool isDebugSection(DataRefImpl Sec) const
Definition:ObjectFile.cpp:97
llvm::object::ObjectFile::setARMSubArch
virtual void setARMSubArch(Triple &TheTriple) const
Definition:ObjectFile.h:346
llvm::object::ObjectFile::createWasmObjectFile
static Expected< std::unique_ptr< WasmObjectFile > > createWasmObjectFile(MemoryBufferRef Object)
Definition:WasmObjectFile.cpp:66
llvm::object::ObjectFile::createObjectFile
static Expected< OwningBinary< ObjectFile > > createObjectFile(StringRef ObjectPath)
Definition:ObjectFile.cpp:209
llvm::object::ObjectFile::getSymbolAlignment
virtual uint32_t getSymbolAlignment(DataRefImpl Symb) const
Definition:ObjectFile.cpp:77
llvm::object::ObjectFile::isSectionData
virtual bool isSectionData(DataRefImpl Sec) const =0
llvm::object::ObjectFile::getSymbolValue
Expected< uint64_t > getSymbolValue(DataRefImpl Symb) const
Definition:ObjectFile.cpp:56
llvm::object::ObjectFile::getOS
virtual Triple::OSType getOS() const
Definition:ObjectFile.h:341
llvm::object::ObjectFile::isReflectionSectionStrippable
bool isReflectionSectionStrippable(llvm::binaryformat::Swift5ReflectionSectionKind ReflectionSectionKind) const
True if the reflection section can be stripped by the linker.
Definition:ObjectFile.cpp:225
llvm::object::ObjectFile::hasDebugInfo
virtual bool hasDebugInfo() const
Definition:ObjectFile.cpp:99
llvm::object::ObjectFile::createXCOFFObjectFile
static Expected< std::unique_ptr< ObjectFile > > createXCOFFObjectFile(MemoryBufferRef Object, unsigned FileType)
Definition:XCOFFObjectFile.cpp:1232
llvm::object::ObjectFile::getArch
virtual Triple::ArchType getArch() const =0
llvm::object::ObjectFile::isSectionStripped
virtual bool isSectionStripped(DataRefImpl Sec) const
Definition:ObjectFile.cpp:87
llvm::object::ObjectFile::isSectionBitcode
virtual bool isSectionBitcode(DataRefImpl Sec) const
Definition:ObjectFile.cpp:79
llvm::object::OwningBinary
Definition:Binary.h:196
llvm::object::SectionRef
This is a value type class that represents a single section in the list of sections in the object fil...
Definition:ObjectFile.h:81
llvm::object::SectionRef::isDebugSection
bool isDebugSection() const
Whether this section is a debug section.
Definition:ObjectFile.h:582
llvm::object::SectionRef::containsSymbol
bool containsSymbol(SymbolRef S) const
Definition:ObjectFile.cpp:46
llvm::object::SymbolRef
This is a value type class that represents a single symbol in the list of symbols in the object file.
Definition:ObjectFile.h:168
llvm::object::SymbolRef::getSection
Expected< section_iterator > getSection() const
Get section this symbol is defined in reference to.
Definition:ObjectFile.h:480
llvm::object::SymbolicFile
Definition:SymbolicFile.h:145
llvm::object::SymbolicFile::getSymbolFlags
virtual Expected< uint32_t > getSymbolFlags(DataRefImpl Symb) const =0
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition:raw_ostream.h:52
uint32_t
Error.h
ErrorHandling.h
llvm_unreachable
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Definition:ErrorHandling.h:143
Error.h
llvm::binaryformat::Swift5ReflectionSectionKind
Swift5ReflectionSectionKind
Definition:Swift.h:14
llvm::object::object_error::invalid_file_type
@ invalid_file_type
llvm::object::section_iterator
content_iterator< SectionRef > section_iterator
Definition:ObjectFile.h:47
llvm::object::operator<<
raw_ostream & operator<<(raw_ostream &OS, const SectionedAddress &Addr)
Definition:ObjectFile.cpp:34
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:AddressRanges.h:18
llvm::identify_magic
file_magic identify_magic(StringRef magic)
Identify the type of a binary file based on how magical it is.
Definition:Magic.cpp:33
llvm::any_of
bool any_of(R &&range, UnaryPredicate P)
Provide wrappers to std::any_of which take ranges instead of having to pass begin/end explicitly.
Definition:STLExtras.h:1746
llvm::format_hex
FormattedNumber format_hex(uint64_t N, unsigned Width, bool Upper=false)
format_hex - Output N as a fixed width hexadecimal.
Definition:Format.h:187
llvm::ModRefInfo::Ref
@ Ref
The access may reference the value stored in memory.
llvm::errorCodeToError
Error errorCodeToError(std::error_code EC)
Helper for converting an std::error_code to a Error.
Definition:Error.cpp:111
llvm::consumeError
void consumeError(Error Err)
Consume a Error without doing anything.
Definition:Error.h:1069
raw_ostream.h
llvm::file_magic
file_magic - An "enum class" enumeration of file types based on magic (the first N bytes of the file)...
Definition:Magic.h:20
llvm::file_magic::coff_import_library
@ coff_import_library
COFF import library.
Definition:Magic.h:48
llvm::file_magic::pdb
@ pdb
Windows PDB debug info file.
Definition:Magic.h:54
llvm::file_magic::spirv_object
@ spirv_object
A binary SPIR-V file.
Definition:Magic.h:61
llvm::file_magic::elf_relocatable
@ elf_relocatable
ELF Relocatable object file.
Definition:Magic.h:27
llvm::file_magic::archive
@ archive
ar style archive file
Definition:Magic.h:25
llvm::file_magic::elf_shared_object
@ elf_shared_object
ELF dynamically linked shared lib.
Definition:Magic.h:29
llvm::file_magic::goff_object
@ goff_object
GOFF object file.
Definition:Magic.h:31
llvm::file_magic::minidump
@ minidump
Windows minidump file.
Definition:Magic.h:45
llvm::file_magic::macho_dynamically_linked_shared_lib
@ macho_dynamically_linked_shared_lib
Mach-O dynlinked shared lib.
Definition:Magic.h:37
llvm::file_magic::xcoff_object_64
@ xcoff_object_64
64-bit XCOFF object file
Definition:Magic.h:52
llvm::file_magic::elf_executable
@ elf_executable
ELF Executable image.
Definition:Magic.h:28
llvm::file_magic::macho_dynamically_linked_shared_lib_stub
@ macho_dynamically_linked_shared_lib_stub
Mach-O Shared lib stub.
Definition:Magic.h:40
llvm::file_magic::macho_preload_executable
@ macho_preload_executable
Mach-O Preloaded Executable.
Definition:Magic.h:36
llvm::file_magic::offload_bundle
@ offload_bundle
Clang offload bundle file.
Definition:Magic.h:59
llvm::file_magic::offload_bundle_compressed
@ offload_bundle_compressed
Compressed clang offload bundle file.
Definition:Magic.h:60
llvm::file_magic::macho_file_set
@ macho_file_set
Mach-O file set binary.
Definition:Magic.h:44
llvm::file_magic::dxcontainer_object
@ dxcontainer_object
DirectX container file.
Definition:Magic.h:58
llvm::file_magic::macho_kext_bundle
@ macho_kext_bundle
Mach-O kext bundle file.
Definition:Magic.h:42
llvm::file_magic::pecoff_executable
@ pecoff_executable
PECOFF executable file.
Definition:Magic.h:49
llvm::file_magic::offload_binary
@ offload_binary
LLVM offload object file.
Definition:Magic.h:57
llvm::file_magic::macho_universal_binary
@ macho_universal_binary
Mach-O universal binary.
Definition:Magic.h:43
llvm::file_magic::bitcode
@ bitcode
Bitcode file.
Definition:Magic.h:23
llvm::file_magic::macho_core
@ macho_core
Mach-O Core File.
Definition:Magic.h:35
llvm::file_magic::wasm_object
@ wasm_object
WebAssembly Object file.
Definition:Magic.h:53
llvm::file_magic::xcoff_object_32
@ xcoff_object_32
32-bit XCOFF object file
Definition:Magic.h:51
llvm::file_magic::windows_resource
@ windows_resource
Windows compiled resource file (.res)
Definition:Magic.h:50
llvm::file_magic::clang_ast
@ clang_ast
Clang PCH or PCM.
Definition:Magic.h:24
llvm::file_magic::elf_core
@ elf_core
ELF core image.
Definition:Magic.h:30
llvm::file_magic::macho_object
@ macho_object
Mach-O Object file.
Definition:Magic.h:32
llvm::file_magic::coff_object
@ coff_object
COFF object file.
Definition:Magic.h:47
llvm::file_magic::elf
@ elf
ELF Unknown type.
Definition:Magic.h:26
llvm::file_magic::macho_bundle
@ macho_bundle
Mach-O Bundle file.
Definition:Magic.h:39
llvm::file_magic::coff_cl_gl_object
@ coff_cl_gl_object
Microsoft cl.exe's intermediate code file.
Definition:Magic.h:46
llvm::file_magic::cuda_fatbinary
@ cuda_fatbinary
CUDA Fatbinary object file.
Definition:Magic.h:56
llvm::file_magic::macho_executable
@ macho_executable
Mach-O Executable.
Definition:Magic.h:33
llvm::file_magic::macho_dsym_companion
@ macho_dsym_companion
Mach-O dSYM companion file.
Definition:Magic.h:41
llvm::file_magic::unknown
@ unknown
Unrecognized file.
Definition:Magic.h:22
llvm::file_magic::macho_fixed_virtual_memory_shared_lib
@ macho_fixed_virtual_memory_shared_lib
Mach-O Shared Lib, FVM.
Definition:Magic.h:34
llvm::file_magic::macho_dynamic_linker
@ macho_dynamic_linker
The Mach-O dynamic linker.
Definition:Magic.h:38
llvm::file_magic::tapi_file
@ tapi_file
Text-based Dynamic Library Stub file.
Definition:Magic.h:55
llvm::object::SectionedAddress
Definition:ObjectFile.h:145
llvm::object::SectionedAddress::UndefSection
static const uint64_t UndefSection
Definition:ObjectFile.h:146
llvm::object::DataRefImpl
Definition:SymbolicFile.h:35

Generated on Fri Jul 18 2025 11:45:59 for LLVM by doxygen 1.9.6
[8]ページ先頭

©2009-2025 Movatter.jp