Return a mapping from sonames to absolute paths, containing all the sonames declared as beeing needed by the given ObjectHandle. See the documentation for find_library(::RPath, ::String) and RPath for more details.
Return the absolute path to the given soname, using the linker search path that the given ObjectHandle would use at runtime. See the documentation for find_library(::RPath, ::String) for more details.
Return the full path to a library, searching the given RPath, and then the default library search paths. This method takes the given soname and joins it to the end of every path within the given RPath, returning the resultant path if it exists, returning back the original soname if it doesn't.
Given a collection, such as Sections, DynamicLinks, etc... use the given offset, stride, and T parameters to read in and construct a ref_type object located at index idx. Example invocation:
Return the absolute path to the given ObjectHandle, if it was a file loaded from the local disk. If it was loaded from a general IOStream or in some other way such that the path is unknown or unknowable, return the empty string.
Given a Type, (such as ELFSection64), unpack() it from the given object and return it, throwing errors as appropriate, and skipping over any excess padding bytes as determined by type_func and size_func. Example invocation:
Read an Object File out from an IOStream, guessing at the type of object within the stream by calling readmeta(io, T) for each T within ObjTypes, and returning the first that does not throw a MagicMismatch.
Given an ObjectHandle, return the size of a section header (used for reading in the sections header when trying to load a Section object or iterating over a Sections object)
Given an ObjectHandle, return the type of a section header (used for reading in the sections header when trying to load a Section object or iterating over a Sections object). For instance, for a 64-bit ELF file, this would return the type ELFSection64
Return the name of the given section as a string. In order to return a true name, it is necessary to perform a lookup within the object's string table, which cannot be done using just a Section object; use a SectionRef object instead if you need that. For sanity sake, this method will return a string, but the contents of the string may be something like the offset within the string table pointing to this Section's name, e.g. "@strtab.123"
Given an ObjectHandle, return the size of a segment header (used for reading in the segments header when trying to load a Segment object or iterating over a Segments object)
Given an ObjectHandle, return the type of a segment header (used for reading in the segments header when trying to load a Segment object or iterating over a Segments object). For instance, for a 64-bit ELF file, this would return the type ELFSegment64
The name of the given Segment, returned as a string. This method often performs some kind of lookup within the string table of the object to get the full name of the segment.
Return the name of the given symbol as a string. This method often performs some kind of lookup within the string table of the object to get the full name of the symbol.
Return the name of the given section as a string. In order to return a true name, it is necessary to perform a lookup within the object's string table, which cannot be done using just a SymtabEntry object; use a SymbolRef object instead if you need that. For sanity sake, this method will return a string, but the contents of the string may be something like the offset within the string table pointing to this SymtabEntry's name, e.g. "@strtab.123"
Given an ObjectHandle, return the size of a symbol table entry (used for reading in the symbol table when trying to load a SymtabEntry object or iterating over a Symbols object).
Given an ObjectHandle, return the type of a symbol table entry (used for reading in the symbol table when trying to load a SymtabEntry object or iterating over a Symbols object). For instance, for a 64-bit ELF file, this would return the type ELFSymtabEntry64
This type encapsulates the linkage of one object file to another. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
This type encapsulates the list of dynamic links within an object, holding a collection of DynamicLink objects. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
This is an error type used to denote that readmeta() was called on a file that does not contain the proper magic at the beginning for the type of object file that was attempting to be loaded.
The basic type that provides access to object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note tha "must implement" is a bit of a misnomer, if an Object file does not have need of a certain piece of this API (e.g. COFF files have no concept of Segments), leaving that chunk of the API undefined will simply cause errors if a user attempts to use methods that use that part of the API (in the example above, an error will be thrown if the user calls Segments(oh) where oh <: COFFHandle).
This type encapsulates the search path used by an object file when looking for a shared library. This class enables not only looking at the path, but querying the path for matches for given library names. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
An abstraction over the concept of a Section within an object file. Because many operations upon sections require global operations (access to the string table, knowledge of position within the file, etc...) some operations are defined only upon the SectionRef datatype. As a user, the SectionRef type should be the primary method of interacting with sections, as a developer adding new object file formats, some methods must support Sections, others must support only SectionRefs. Note that any method that works on a Section must also work with a SectionRef, see the @derefmethod macro for a convenient helper macro to generate SectionRef -> Section wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
Provides a reference to a Section, along with a reference to the ObjectHandle this Section comes from. This should be the primary method by which users interact with sections inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the Section object API, this is by design as many of the methods are simply passthroughs to the underlying Section API calls for ease of use.
An abstraction over the concept of a collection of Section types within an object file. One can think of the Sections object containing the table of section headers within the object file, whereas the Section/SectionRef objects contain the actual section data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
An abstraction over the concept of a Segment within an object file. A Segment is a portion of an object file that is given instruction on its layout in virtual memory; this is in contrast to a Section, which delineates different portions of an object file on disk. ELF files have the strictest separation here, with a single executable file containing multiple Segment and Section objects, with Sections being assigned to one or more Segments for virtual memory placement. Mach-O files typically have two Segments, one called __TEXT, one called __DATA. COFF files do not have Segment.
Just like with Section objects, many operations upon segments require global operations (access to the string table, knowledge of position within the file, etc...) which causes some operations to be defined only upon the SegmentRef datatype. As a user, the SegmentRef type should be the primary method of interacting with segments, as a developer adding new object file formats, some methods must support Segments, others must support only SegmentRefs. Note that any method that works on a Segment must also work with a SegmentRef, see the @derefmethod macro for a convenient helper macro to generate SegmentRef -> Section wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
Provides a reference to a Segment, along with a reference to the ObjectHandle this Segment comes from. This should be the primary method by which users interact with segments inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the Segment object API, this is by design as many of the methods are simply passthroughs to the underlying Segment API calls for ease of use.
An abstraction over the concept of a collection of Segment types within an object file. One can think of the Segments object containing the table of segment headers within the object file, whereas the Segment/SegmentRef objects contain the actual segment data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
This type encapsulates a string table within an object file, enabling queries against the string table for symbol names, section names, etc... The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
Provides a reference to a SymtabEntry, along with a reference to the ObjectHandle this SymtabEntry comes from. This should be the primary method by which users interact with symbols inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the SymtabEntry object API, this is by design as many of the methods are simply passthroughs to the underlying SymtabEntry API calls for ease of use.
An abstraction over the concept of a collection of symbol (SymtabEntry) types within an object file. One can think of the Symbols object containing the table of symbols within the object file, whereas the SymtabEntry/SymbolRef objects contain the actual symbol data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
An abstraction over the concept of a symbol within an object file. This type does not use the Symbol name as this would conflict with the builtin Julia Symbol type, so the name SymtabEntry is used instead. As a user, the SymbolRef type should be the primary method of interacting with symbols, as a developer adding new object file formats, some methods must support SymtabEntrys, others must support only SymbolRefs. Note that any method that works on a SymtabEntry must also work with a SymbolRef, see the @derefmethod macro for a convenient helper macro to generate SymbolRef -> SymtabEntry wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
This document was generated with Documenter.jl on Tuesday 15 December 2020. Using Julia version 1.5.3.
diff --git a/dev/search_index.js b/dev/search_index.js
new file mode 100644
index 0000000..1ecfbbe
--- /dev/null
+++ b/dev/search_index.js
@@ -0,0 +1,3 @@
+var documenterSearchIndex = {"docs":
+[{"location":"#ObjectFile.jl-Documentation-1","page":"Home","title":"ObjectFile.jl Documentation","text":"","category":"section"},{"location":"#Index-1","page":"Home","title":"Index","text":"","category":"section"},{"location":"#","page":"Home","title":"Home","text":"","category":"page"},{"location":"#","page":"Home","title":"Home","text":"Modules = [ObjectFile]\nOrder = [:function, :type]","category":"page"},{"location":"#Base.eof-Tuple{SectionRef}","page":"Home","title":"Base.eof","text":"eof(section::SectionRef)\n\nReturns true if the ObjectHandle that this SectionRef refers to has read beyond the current section's extent\n\n\n\n\n\n","category":"method"},{"location":"#Base.findall-Tuple{Sections,AbstractString}","page":"Home","title":"Base.findall","text":"findall(sections::Sections, name::String)\n\nReturn a list of sections that match the given name.\n\n\n\n\n\n","category":"method"},{"location":"#Base.findall-Union{Tuple{S}, Tuple{Sections,Array{S,1}}} where S<:AbstractString","page":"Home","title":"Base.findall","text":"findall(sections::Sections, name::String)\n\nReturn a list of sections that match one of the given names.\n\n\n\n\n\n","category":"method"},{"location":"#Base.findfirst-Tuple{Sections,AbstractString}","page":"Home","title":"Base.findfirst","text":"findfirst(sections::Sections, name::String)\n\nReturn the first section that matches the given name.\n\n\n\n\n\n","category":"method"},{"location":"#Base.findfirst-Tuple{Sections,Array{String,1}}","page":"Home","title":"Base.findfirst","text":"findfirst(sections::Sections, names::Vector{String})\n\nReturn the first section that matches on of the given names.\n\n\n\n\n\n","category":"method"},{"location":"#Base.read-Tuple{SectionRef}","page":"Home","title":"Base.read","text":"read(section::SectionRef)\n\nRead the contents of the section referred to by section, returning a Vector{UInt8}.\n\n\n\n\n\n","category":"method"},{"location":"#Base.read-Union{Tuple{H}, Tuple{H,Section{H}}} where H<:ObjectHandle","page":"Home","title":"Base.read","text":"read(oh::ObjectHandle, section::Section)\n\nRead the contents of the section referred to by section from the given ObjectHandle, returning a Vector{UInt8}.\n\n\n\n\n\n","category":"method"},{"location":"#Base.seek-Tuple{SectionRef,Any}","page":"Home","title":"Base.seek","text":"seek(section::SectionRef, offset)\n\nSeek to offset relative to section in the ObjectHandle that this SectionRef refers to\n\n\n\n\n\n","category":"method"},{"location":"#Base.seekstart-Tuple{SectionRef}","page":"Home","title":"Base.seekstart","text":"seekstart(section::SectionRef)\n\nSeek to the beginning of section in the ObjectHandle it was loaded from.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.canonical_rpaths-Tuple{RPath}","page":"Home","title":"ObjectFile.canonical_rpaths","text":"canonical_rpaths(rpath::RPath)\n\nReturn a canonicalized list of paths that will be searched.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.deref-Tuple{SectionRef}","page":"Home","title":"ObjectFile.deref","text":"deref(section::SectionRef)\n\nDereference the given SectionRef object to a Section.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.deref-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.deref","text":"deref(seg::SegmentRef)\n\nDereference the given SegmentRef object to a Segment.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.endianness-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.endianness","text":"endianness(oh::ObjectHandle)\n\nReturns the endianness of the given ObjectHandle (e.g. :LittleEndian)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.find_libraries-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.find_libraries","text":"find_libraries(oh::ObjectHandle)\n\nReturn a mapping from sonames to absolute paths, containing all the sonames declared as beeing needed by the given ObjectHandle. See the documentation for find_library(::RPath, ::String) and RPath for more details.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.find_library-Tuple{ObjectHandle,AbstractString}","page":"Home","title":"ObjectFile.find_library","text":"find_library(oh::ObjectHandle, soname::String)\n\nReturn the absolute path to the given soname, using the linker search path that the given ObjectHandle would use at runtime. See the documentation for find_library(::RPath, ::String) for more details.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.find_library-Tuple{RPath,AbstractString}","page":"Home","title":"ObjectFile.find_library","text":"find_library(rpath::RPath, soname::String)\n\nReturn the full path to a library, searching the given RPath, and then the default library search paths. This method takes the given soname and joins it to the end of every path within the given RPath, returning the resultant path if it exists, returning back the original soname if it doesn't.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.format_string-Tuple{Type}","page":"Home","title":"ObjectFile.format_string","text":"format_string(::Type{H}) where {H <: ObjectHandle}\n\nReturn the string name of the given ObjectHandle, examples are \"ELF\", \"MachO\", \"COFF\", etc...\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.getindex_ref-NTuple{6,Any}","page":"Home","title":"ObjectFile.getindex_ref","text":"getindex_ref(collection, offset, stride, T, ref_type, idx)\n\nGiven a collection, such as Sections, DynamicLinks, etc... use the given offset, stride, and T parameters to read in and construct a ref_type object located at index idx. Example invocation:\n\ngetindex_ref(\n sections,\n section_header_offset(oh),\n section_header_size(oh),\n section_header_type(oh),\n SectionRef,\n idx\n)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{RPath}","page":"Home","title":"ObjectFile.handle","text":"handle(rpath::RPath)\n\nReturn the handle that this RPath object refers to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{SectionRef}","page":"Home","title":"ObjectFile.handle","text":"handle(section::SectionRef)\n\nReturn the ObjectHandle this SectionRef belongs to. This method is SectionRef-only.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{Sections}","page":"Home","title":"ObjectFile.handle","text":"handle(sections::Sections)\n\nReturn the ObjectHandle that this Sections object belongs to\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.handle","text":"handle(seg::SegmentRef)\n\nReturn the ObjectHandle this SegmentRef belongs to. This method is SegmentRef-only.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{StrTab}","page":"Home","title":"ObjectFile.handle","text":"handle(s::StrTab)\n\nReturn the ObjectHandle this StrTab belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{SymbolRef}","page":"Home","title":"ObjectFile.handle","text":"handle(sym::SymbolRef)\n\nReturn the ObjectHandle that this SymbolRef belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.header-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.header","text":"header(oh::ObjectHandle)\n\nReturn the ObjectHandle's header object, whatever that may be for this particular object file format.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.iostream-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.iostream","text":"iostream(oh::ObjectHandle)\n\nReturns the IOStream backing the ObjectHandle\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.is64bit-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.is64bit","text":"is64bit(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle represents a 64-bit object\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isdynamic-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.isdynamic","text":"isdynamic(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle makes use of dynamic linking.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isexecutable-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.isexecutable","text":"isexecutable(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle represents an executable object\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isglobal-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.isglobal","text":"isglobal(sym::SymtabEntry)\n\nReturn true if the given symbol is global\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.islibrary-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.islibrary","text":"islibrary(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle represents a shared library\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.islocal-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.islocal","text":"islocal(sym::SymtabEntry)\n\nReturn true if the given symbol is local\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isrelocatable-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.isrelocatable","text":"isrelocatable(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle represents a relocatable object file, e.g. an .o file as generated by gcc -c\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isundef-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.isundef","text":"isundef(sym::SymtabEntry)\n\nReturn true if the given symbol is undefined\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isweak-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.isweak","text":"isweak(sym::SymtabEntry)\n\nReturn true if the given symbol is weak\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.mangle_section_name-Tuple{ObjectHandle,AbstractString}","page":"Home","title":"ObjectFile.mangle_section_name","text":"mangle_section_name(oh::ObjectHandle, name::AbstractString)\n\nTurn a section name into the object-format specific naming convention, e.g. returning \".bss\" for ELF/COFF files, and \"__bss\" for MachO files\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.mangle_symbol_name-Tuple{ObjectHandle,AbstractString}","page":"Home","title":"ObjectFile.mangle_symbol_name","text":"mangle_symbol_name(oh::ObjectHandle, name::AbstractString)\n\nMangle a symbol name using the object-format specific naming convention, e.g. prefixing \"_\" for MachO files.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.path-Tuple{IO}","page":"Home","title":"ObjectFile.path","text":"path(io::IO)\n\nTry to guess the path of an IO object. If it cannot be guessed, returns the empty string.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.path-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.path","text":"path(oh::ObjectHandle)\n\nReturn the absolute path to the given ObjectHandle, if it was a file loaded from the local disk. If it was loaded from a general IOStream or in some other way such that the path is unknown or unknowable, return the empty string.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.read_struct-NTuple{4,Any}","page":"Home","title":"ObjectFile.read_struct","text":"read_struct(oh, type_func, size_func, name)\n\nGiven a Type, (such as ELFSection64), unpack() it from the given object and return it, throwing errors as appropriate, and skipping over any excess padding bytes as determined by type_func and size_func. Example invocation:\n\nreadstruct(oh, symtabentrytype, symtabentry_size, \"Symbol Entry\")\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.readmeta-Tuple{Function,AbstractString}","page":"Home","title":"ObjectFile.readmeta","text":"readmeta(f::Function, file::AbstractString)\n\nDo-block variant of readmeta(). Use via something like:\n\nreadmeta(\"libfoo.so\") do f\n ...\nend\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.readmeta-Tuple{IO}","page":"Home","title":"ObjectFile.readmeta","text":"readmeta(io::IO)\n\nRead an Object File out from an IOStream, guessing at the type of object within the stream by calling readmeta(io, T) for each T within ObjTypes, and returning the first that does not throw a MagicMismatch.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.readmeta-Union{Tuple{T}, Tuple{IO,Type{T}}} where T<:ObjectHandle","page":"Home","title":"ObjectFile.readmeta","text":"readmeta(io::IO, ::ObjectHandle)\n\nRead an Object File out from an IOStream. This is the first method you should call in order to manipulate object files.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.rpaths-Tuple{RPath}","page":"Home","title":"ObjectFile.rpaths","text":"rpaths(rpath::RPath)\n\nReturn the list of paths that will be searched for shared libraries.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_address-Tuple{Section}","page":"Home","title":"ObjectFile.section_address","text":"section_address(section::Section)\n\nThe address of the section in virtual memory.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_header_offset-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.section_header_offset","text":"section_header_offset(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the offset (in bytes) at which the sections start within the containing object file.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_header_size-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.section_header_size","text":"section_header_size(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the size of a section header (used for reading in the sections header when trying to load a Section object or iterating over a Sections object)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_header_type-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.section_header_type","text":"section_header_type(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the type of a section header (used for reading in the sections header when trying to load a Section object or iterating over a Sections object). For instance, for a 64-bit ELF file, this would return the type ELFSection64\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_name-Tuple{Section}","page":"Home","title":"ObjectFile.section_name","text":"section_name(section::Section)\n\nReturn the name of the given section as a string. In order to return a true name, it is necessary to perform a lookup within the object's string table, which cannot be done using just a Section object; use a SectionRef object instead if you need that. For sanity sake, this method will return a string, but the contents of the string may be something like the offset within the string table pointing to this Section's name, e.g. \"@strtab.123\"\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_number-Tuple{SectionRef}","page":"Home","title":"ObjectFile.section_number","text":"section_number(section::SectionRef)\n\nThe index of the given section within the section header table.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_offset-Tuple{Section}","page":"Home","title":"ObjectFile.section_offset","text":"section_offset(section::Section)\n\nThe offset of the section in the file, in bytes\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_size-Tuple{Section}","page":"Home","title":"ObjectFile.section_size","text":"section_size(section::Section)\n\nThe size of the actual data contained in the section. This should exclude any padding mandated by the file format e.g. due to alignment rules\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_header_offset-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.segment_header_offset","text":"segment_header_offset(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the offset (in bytes) at which the segments start within the containing object file.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_header_size-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.segment_header_size","text":"segment_header_size(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the size of a segment header (used for reading in the segments header when trying to load a Segment object or iterating over a Segments object)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_header_type-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.segment_header_type","text":"segment_header_type(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the type of a segment header (used for reading in the segments header when trying to load a Segment object or iterating over a Segments object). For instance, for a 64-bit ELF file, this would return the type ELFSegment64\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_name-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.segment_name","text":"segment_name(seg::SegmentRef)\n\nThe name of the given Segment, returned as a string. This method often performs some kind of lookup within the string table of the object to get the full name of the segment.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_number-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.segment_number","text":"segment_number(seg::SegmentRef)\n\nReturn the index of the referred segment.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.strtab_lookup-Tuple{StrTab,Any}","page":"Home","title":"ObjectFile.strtab_lookup","text":"strtab_lookup(s::StrTab, index)\n\nReads a string from the given StrTab at index.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symbol_name-Tuple{SymbolRef}","page":"Home","title":"ObjectFile.symbol_name","text":"symbol_name(sym::SymbolRef)\n\nReturn the name of the given symbol as a string. This method often performs some kind of lookup within the string table of the object to get the full name of the symbol.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symbol_name-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.symbol_name","text":"symbol_name(sym::SymtabEntry)\n\nReturn the name of the given section as a string. In order to return a true name, it is necessary to perform a lookup within the object's string table, which cannot be done using just a SymtabEntry object; use a SymbolRef object instead if you need that. For sanity sake, this method will return a string, but the contents of the string may be something like the offset within the string table pointing to this SymtabEntry's name, e.g. \"@strtab.123\"\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symbol_number-Tuple{SymbolRef}","page":"Home","title":"ObjectFile.symbol_number","text":"symbol_number(sym::SymbolRef)\n\nReturn the number (index) of the given symbol.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symbol_value-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.symbol_value","text":"symbol_value(sym::SymtabEntry)\n\nReturn the value of the given symbol\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symtab_entry_offset-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.symtab_entry_offset","text":"symtab_entry_offset(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the offset (in bytes) at which the symbol table starts within the containing object file.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symtab_entry_size-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.symtab_entry_size","text":"symtab_entry_size(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the size of a symbol table entry (used for reading in the symbol table when trying to load a SymtabEntry object or iterating over a Symbols object).\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symtab_entry_type-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.symtab_entry_type","text":"symtab_entry_type(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the type of a symbol table entry (used for reading in the symbol table when trying to load a SymtabEntry object or iterating over a Symbols object). For instance, for a 64-bit ELF file, this would return the type ELFSymtabEntry64\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.DynamicLink","page":"Home","title":"ObjectFile.DynamicLink","text":"DynamicLink\n\nThis type encapsulates the linkage of one object file to another. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nDynamicLink()\n\nAccessors:\n\nDynamicLinks()\nhandle()\npath()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.DynamicLinks","page":"Home","title":"ObjectFile.DynamicLinks","text":"DynamicLinks\n\nThis type encapsulates the list of dynamic links within an object, holding a collection of DynamicLink objects. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nDynamicLinks()\n\nIteration\n\ngetindex()\nlastindex()\niterate()\nkeys()\neltype()\n\nMisc.\n\nhandle()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.MagicMismatch","page":"Home","title":"ObjectFile.MagicMismatch","text":"MagicMismatch\n\nThis is an error type used to denote that readmeta() was called on a file that does not contain the proper magic at the beginning for the type of object file that was attempting to be loaded.\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.ObjectHandle","page":"Home","title":"ObjectFile.ObjectHandle","text":"ObjectHandle\n\nThe basic type that provides access to object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note tha \"must implement\" is a bit of a misnomer, if an Object file does not have need of a certain piece of this API (e.g. COFF files have no concept of Segments), leaving that chunk of the API undefined will simply cause errors if a user attempts to use methods that use that part of the API (in the example above, an error will be thrown if the user calls Segments(oh) where oh <: COFFHandle).\n\nCreation\n\nreadmeta()\n\nIOStream-like operations:\n\nseek()\nseekstart()\nskip()\nstartaddr()\niostream()\nposition()\nread()\nreaduntil()\neof()\nunpack()\n\nFormat-specific properties\n\nendianness()\nis64bit()\nisrelocatable()\nisexecutable()\nislibrary()\nisdynamic()\nmanglesectionname()\nmanglesymbolname()\nhandle()\nheader()\nformat_string()\n\nSection properties\n\nsectionheaderoffset()\nsectionheadersize()\nsectionheadertype()\n\nSegment properties\n\nsegmentheaderoffset()\nsegmentheadersize()\nsegmentheadertype()\n\nSymbol properties\n\nsymtabentryoffset()\nsymtabentrysize()\nsymtabentrytype()\n\nMisc\n\npath()\nshow()\nfind_library()\nfind_libraries()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.RPath","page":"Home","title":"ObjectFile.RPath","text":"RPath\n\nThis type encapsulates the search path used by an object file when looking for a shared library. This class enables not only looking at the path, but querying the path for matches for given library names. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nRPath()\n\nUtility\n\nhandle()\n\nRPath operations\n\nrpaths()\ncanonical_rpaths()\nfind_library()\nlastindex()\niterate()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.RPath-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.RPath","text":"RPath(oh::ObjectHandle)\n\nConstruct an RPath object from the given ObjectHandle.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.Section","page":"Home","title":"ObjectFile.Section","text":"Section\n\nAn abstraction over the concept of a Section within an object file. Because many operations upon sections require global operations (access to the string table, knowledge of position within the file, etc...) some operations are defined only upon the SectionRef datatype. As a user, the SectionRef type should be the primary method of interacting with sections, as a developer adding new object file formats, some methods must support Sections, others must support only SectionRefs. Note that any method that works on a Section must also work with a SectionRef, see the @derefmethod macro for a convenient helper macro to generate SectionRef -> Section wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nread()\n\nUtility:\n\nderef()\n\nIO-like operations:\n\nread()\n\nFormat-specific properties:\n\nsection_name()\nsection_size()\nsection_offset()\nsection_address()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SectionRef","page":"Home","title":"ObjectFile.SectionRef","text":"SectionRef\n\nProvides a reference to a Section, along with a reference to the ObjectHandle this Section comes from. This should be the primary method by which users interact with sections inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the Section object API, this is by design as many of the methods are simply passthroughs to the underlying Section API calls for ease of use.\n\nCreation:\n\nSectionRef()\n\nUtility\n\nderef()\nhandle()\nSections()\n\nIO-like operations:\n\nread()\nseekstart()\nseek()\neof()\n\nFormat-specific properties:\n\nsection_name()\nsection_number()\nsection_type()\nsection_size()\nsection_offset()\nsection_address()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SectionRef-Tuple{Sections,Section,Any}","page":"Home","title":"ObjectFile.SectionRef","text":"SectionRef(sections::Sections, section::Section, idx)\n\nConstruct a SectionRef object pointing to the given Section, which itself represents the idx'th section within the given Sections.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.Sections","page":"Home","title":"ObjectFile.Sections","text":"Sections\n\nAn abstraction over the concept of a collection of Section types within an object file. One can think of the Sections object containing the table of section headers within the object file, whereas the Section/SectionRef objects contain the actual section data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nSections()\n\nIteration\n\ngetindex()\nlastindex()\nlength()\niterate()\nkeys()\neltype()\n\nSearch\n\nfindall()\nfindfirst()\n\nMisc.\n\nhandle()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.Sections-Tuple{SectionRef}","page":"Home","title":"ObjectFile.Sections","text":"Sections(section::SectionRef)\n\nReturn the Sections collection this section belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.Segment","page":"Home","title":"ObjectFile.Segment","text":"Segment\n\nAn abstraction over the concept of a Segment within an object file. A Segment is a portion of an object file that is given instruction on its layout in virtual memory; this is in contrast to a Section, which delineates different portions of an object file on disk. ELF files have the strictest separation here, with a single executable file containing multiple Segment and Section objects, with Sections being assigned to one or more Segments for virtual memory placement. Mach-O files typically have two Segments, one called __TEXT, one called __DATA. COFF files do not have Segment.\n\nJust like with Section objects, many operations upon segments require global operations (access to the string table, knowledge of position within the file, etc...) which causes some operations to be defined only upon the SegmentRef datatype. As a user, the SegmentRef type should be the primary method of interacting with segments, as a developer adding new object file formats, some methods must support Segments, others must support only SegmentRefs. Note that any method that works on a Segment must also work with a SegmentRef, see the @derefmethod macro for a convenient helper macro to generate SegmentRef -> Section wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nread()\n\nUtility:\n\nderef()\n\nFormat-specific properties:\n\nsegment_name()\nsegment_offset()\nsegmentfilesize()\nsegmentmemorysize()\nsegment_address()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SegmentRef","page":"Home","title":"ObjectFile.SegmentRef","text":"SegmentRef\n\nProvides a reference to a Segment, along with a reference to the ObjectHandle this Segment comes from. This should be the primary method by which users interact with segments inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the Segment object API, this is by design as many of the methods are simply passthroughs to the underlying Segment API calls for ease of use.\n\nCreation:\n\nSegmentRef()\n\nUtility\n\nderef()\nSegments()\nhandle()\n\nFormat-specific properties:\n\nsegment_name()\nsegment_number()\nsegment_offset()\nsegmentfilesize()\nsegmentmemorysize()\nsegment_address()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.Segments","page":"Home","title":"ObjectFile.Segments","text":"Segments\n\nAn abstraction over the concept of a collection of Segment types within an object file. One can think of the Segments object containing the table of segment headers within the object file, whereas the Segment/SegmentRef objects contain the actual segment data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nSegments()\n\nIteration\n\ngetindex()\nlastindex()\nlength()\niterate()\nkeys()\neltype()\n\nSearch\n\nfindall()\nfindfirst()\n\nMisc.\n\nhandle()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.Segments-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.Segments","text":"Segments(seg::SegmentRef)\n\nReturn the Segments collection this Segment belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.StrTab","page":"Home","title":"ObjectFile.StrTab","text":"StrTab\n\nThis type encapsulates a string table within an object file, enabling queries against the string table for symbol names, section names, etc... The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nStrTab()\n\nAccessors\n\nhandle()\nstrtab_lookup()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SymbolRef","page":"Home","title":"ObjectFile.SymbolRef","text":"SymbolRef\n\nProvides a reference to a SymtabEntry, along with a reference to the ObjectHandle this SymtabEntry comes from. This should be the primary method by which users interact with symbols inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the SymtabEntry object API, this is by design as many of the methods are simply passthroughs to the underlying SymtabEntry API calls for ease of use.\n\nCreation:\n\nSymbolRef()\n\nUtil:\n\nderef()\nSymbols()\nhandle()\n\nProperties:\n\nsymbol_number()\nsymbol_name()\nsymbol_value()\nisundef()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SymbolRef-Tuple{Symbols,SymtabEntry,UInt32}","page":"Home","title":"ObjectFile.SymbolRef","text":"SymbolRef(symbols::Symbols, sym::SymtabEntry, idx::UInt32)\n\nConstruct a SymbolRef object pointing to the given SymtabEntry, which itself represents the idx'th symbol within the given Symbols collection.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.Symbols","page":"Home","title":"ObjectFile.Symbols","text":"Symbols\n\nAn abstraction over the concept of a collection of symbol (SymtabEntry) types within an object file. One can think of the Symbols object containing the table of symbols within the object file, whereas the SymtabEntry/SymbolRef objects contain the actual symbol data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nSymbols()\n\nIteration\n\ngetindex()\nlastindex()\nlength()\niterate()\neltype()\n\nMisc.\n\nhandle()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.Symbols-Tuple{SymbolRef}","page":"Home","title":"ObjectFile.Symbols","text":"Symbols(sym::SymbolRef)\n\nReturn the Symbols object that this SymbolRef belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.SymtabEntry","page":"Home","title":"ObjectFile.SymtabEntry","text":"SymtabEntry\n\nAn abstraction over the concept of a symbol within an object file. This type does not use the Symbol name as this would conflict with the builtin Julia Symbol type, so the name SymtabEntry is used instead. As a user, the SymbolRef type should be the primary method of interacting with symbols, as a developer adding new object file formats, some methods must support SymtabEntrys, others must support only SymbolRefs. Note that any method that works on a SymtabEntry must also work with a SymbolRef, see the @derefmethod macro for a convenient helper macro to generate SymbolRef -> SymtabEntry wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nSymtabEntry()\n\nUtil:\n\nderef()\n\nProperties:\n\nsymbol_name()\nsymbol_value()\nisundef()\nisglobal()\nislocal()\nisweak()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.fixed_string","page":"Home","title":"ObjectFile.fixed_string","text":"fixed_string{T}\n\nA fixed-byte string, stored as an integer type (e.g. T = UInt128, or T = UInt64) but displayed and treated as a string.\n\n\n\n\n\n","category":"type"},{"location":"#Base.unsafe_string-Union{Tuple{T}, Tuple{Any,T}} where T<:Integer","page":"Home","title":"Base.unsafe_string","text":"unsafe_string(io, max_len::Integer)\n\nRead in a null-terminated string, stopping with a maximum length of max_len.\n\n\n\n\n\n","category":"method"},{"location":"#Base.unsafe_string-Union{Tuple{fixed_string{T}}, Tuple{T}} where T<:Integer","page":"Home","title":"Base.unsafe_string","text":"unsafe_string(x::fixed_string)\n\nConvert a fixed_string object to a native-Julia String\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.show_collection-Union{Tuple{ST}, Tuple{H}, Tuple{IO,ST,Type{H}}} where ST where H<:ObjectHandle","page":"Home","title":"ObjectFile.show_collection","text":"show_collection(io, collection, ::Type{H<:ObjectHandle})\n\nGiven a collection-like object, (Symbols, DynamicLinks, ``)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.startaddr-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.startaddr","text":"startaddr(oh::ObjectHandle)\n\nReturns the offset within the underlying IOStream at which this ObjectHandle is located.\n\n\n\n\n\n","category":"method"}]
+}
diff --git a/dev/siteinfo.js b/dev/siteinfo.js
new file mode 100644
index 0000000..3343491
--- /dev/null
+++ b/dev/siteinfo.js
@@ -0,0 +1 @@
+var DOCUMENTER_CURRENT_VERSION = "dev";
diff --git a/versions.js b/versions.js
new file mode 100644
index 0000000..0314857
--- /dev/null
+++ b/versions.js
@@ -0,0 +1,3 @@
+var DOC_VERSIONS = [
+ "dev",
+];
From a34d41e3bea1177747e148c77b09265e78b976e1 Mon Sep 17 00:00:00 2001
From: zeptodoctor <44736852+zeptodoctor@users.noreply.github.com>
Date: Wed, 16 Dec 2020 00:04:01 +0000
Subject: [PATCH 3/5] build based on 7797652
---
dev/index.html | 6 +++---
dev/search/index.html | 2 +-
dev/search_index.js | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dev/index.html b/dev/index.html
index 821dd18..0b36f2f 100644
--- a/dev/index.html
+++ b/dev/index.html
@@ -1,11 +1,11 @@
-Home · ObjectFile.jl
Return a mapping from sonames to absolute paths, containing all the sonames declared as beeing needed by the given ObjectHandle. See the documentation for find_library(::RPath, ::String) and RPath for more details.
Return the absolute path to the given soname, using the linker search path that the given ObjectHandle would use at runtime. See the documentation for find_library(::RPath, ::String) for more details.
Return the full path to a library, searching the given RPath, and then the default library search paths. This method takes the given soname and joins it to the end of every path within the given RPath, returning the resultant path if it exists, returning back the original soname if it doesn't.
Given a collection, such as Sections, DynamicLinks, etc... use the given offset, stride, and T parameters to read in and construct a ref_type object located at index idx. Example invocation:
Return a mapping from sonames to absolute paths, containing all the sonames declared as beeing needed by the given ObjectHandle. See the documentation for find_library(::RPath, ::String) and RPath for more details.
Return the absolute path to the given soname, using the linker search path that the given ObjectHandle would use at runtime. See the documentation for find_library(::RPath, ::String) for more details.
Return the full path to a library, searching the given RPath, and then the default library search paths. This method takes the given soname and joins it to the end of every path within the given RPath, returning the resultant path if it exists, returning back the original soname if it doesn't.
Given a collection, such as Sections, DynamicLinks, etc... use the given offset, stride, and T parameters to read in and construct a ref_type object located at index idx. Example invocation:
Return the absolute path to the given ObjectHandle, if it was a file loaded from the local disk. If it was loaded from a general IOStream or in some other way such that the path is unknown or unknowable, return the empty string.
Given a Type, (such as ELFSection64), unpack() it from the given object and return it, throwing errors as appropriate, and skipping over any excess padding bytes as determined by type_func and size_func. Example invocation:
Return the absolute path to the given ObjectHandle, if it was a file loaded from the local disk. If it was loaded from a general IOStream or in some other way such that the path is unknown or unknowable, return the empty string.
Given a Type, (such as ELFSection64), unpack() it from the given object and return it, throwing errors as appropriate, and skipping over any excess padding bytes as determined by type_func and size_func. Example invocation:
Read an Object File out from an IOStream, guessing at the type of object within the stream by calling readmeta(io, T) for each T within ObjTypes, and returning the first that does not throw a MagicMismatch.
Given an ObjectHandle, return the size of a section header (used for reading in the sections header when trying to load a Section object or iterating over a Sections object)
Given an ObjectHandle, return the type of a section header (used for reading in the sections header when trying to load a Section object or iterating over a Sections object). For instance, for a 64-bit ELF file, this would return the type ELFSection64
Return the name of the given section as a string. In order to return a true name, it is necessary to perform a lookup within the object's string table, which cannot be done using just a Section object; use a SectionRef object instead if you need that. For sanity sake, this method will return a string, but the contents of the string may be something like the offset within the string table pointing to this Section's name, e.g. "@strtab.123"
Given an ObjectHandle, return the size of a segment header (used for reading in the segments header when trying to load a Segment object or iterating over a Segments object)
Given an ObjectHandle, return the type of a segment header (used for reading in the segments header when trying to load a Segment object or iterating over a Segments object). For instance, for a 64-bit ELF file, this would return the type ELFSegment64
The name of the given Segment, returned as a string. This method often performs some kind of lookup within the string table of the object to get the full name of the segment.
Return the name of the given symbol as a string. This method often performs some kind of lookup within the string table of the object to get the full name of the symbol.
Return the name of the given section as a string. In order to return a true name, it is necessary to perform a lookup within the object's string table, which cannot be done using just a SymtabEntry object; use a SymbolRef object instead if you need that. For sanity sake, this method will return a string, but the contents of the string may be something like the offset within the string table pointing to this SymtabEntry's name, e.g. "@strtab.123"
Given an ObjectHandle, return the size of a symbol table entry (used for reading in the symbol table when trying to load a SymtabEntry object or iterating over a Symbols object).
Given an ObjectHandle, return the type of a symbol table entry (used for reading in the symbol table when trying to load a SymtabEntry object or iterating over a Symbols object). For instance, for a 64-bit ELF file, this would return the type ELFSymtabEntry64
This type encapsulates the linkage of one object file to another. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
This type encapsulates the list of dynamic links within an object, holding a collection of DynamicLink objects. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
This is an error type used to denote that readmeta() was called on a file that does not contain the proper magic at the beginning for the type of object file that was attempting to be loaded.
The basic type that provides access to object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note tha "must implement" is a bit of a misnomer, if an Object file does not have need of a certain piece of this API (e.g. COFF files have no concept of Segments), leaving that chunk of the API undefined will simply cause errors if a user attempts to use methods that use that part of the API (in the example above, an error will be thrown if the user calls Segments(oh) where oh <: COFFHandle).
This type encapsulates the search path used by an object file when looking for a shared library. This class enables not only looking at the path, but querying the path for matches for given library names. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
An abstraction over the concept of a Section within an object file. Because many operations upon sections require global operations (access to the string table, knowledge of position within the file, etc...) some operations are defined only upon the SectionRef datatype. As a user, the SectionRef type should be the primary method of interacting with sections, as a developer adding new object file formats, some methods must support Sections, others must support only SectionRefs. Note that any method that works on a Section must also work with a SectionRef, see the @derefmethod macro for a convenient helper macro to generate SectionRef -> Section wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
Provides a reference to a Section, along with a reference to the ObjectHandle this Section comes from. This should be the primary method by which users interact with sections inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the Section object API, this is by design as many of the methods are simply passthroughs to the underlying Section API calls for ease of use.
An abstraction over the concept of a collection of Section types within an object file. One can think of the Sections object containing the table of section headers within the object file, whereas the Section/SectionRef objects contain the actual section data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
An abstraction over the concept of a Segment within an object file. A Segment is a portion of an object file that is given instruction on its layout in virtual memory; this is in contrast to a Section, which delineates different portions of an object file on disk. ELF files have the strictest separation here, with a single executable file containing multiple Segment and Section objects, with Sections being assigned to one or more Segments for virtual memory placement. Mach-O files typically have two Segments, one called __TEXT, one called __DATA. COFF files do not have Segment.
Just like with Section objects, many operations upon segments require global operations (access to the string table, knowledge of position within the file, etc...) which causes some operations to be defined only upon the SegmentRef datatype. As a user, the SegmentRef type should be the primary method of interacting with segments, as a developer adding new object file formats, some methods must support Segments, others must support only SegmentRefs. Note that any method that works on a Segment must also work with a SegmentRef, see the @derefmethod macro for a convenient helper macro to generate SegmentRef -> Section wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
Provides a reference to a Segment, along with a reference to the ObjectHandle this Segment comes from. This should be the primary method by which users interact with segments inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the Segment object API, this is by design as many of the methods are simply passthroughs to the underlying Segment API calls for ease of use.
An abstraction over the concept of a collection of Segment types within an object file. One can think of the Segments object containing the table of segment headers within the object file, whereas the Segment/SegmentRef objects contain the actual segment data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
This type encapsulates a string table within an object file, enabling queries against the string table for symbol names, section names, etc... The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
Provides a reference to a SymtabEntry, along with a reference to the ObjectHandle this SymtabEntry comes from. This should be the primary method by which users interact with symbols inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the SymtabEntry object API, this is by design as many of the methods are simply passthroughs to the underlying SymtabEntry API calls for ease of use.
An abstraction over the concept of a collection of symbol (SymtabEntry) types within an object file. One can think of the Symbols object containing the table of symbols within the object file, whereas the SymtabEntry/SymbolRef objects contain the actual symbol data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
An abstraction over the concept of a symbol within an object file. This type does not use the Symbol name as this would conflict with the builtin Julia Symbol type, so the name SymtabEntry is used instead. As a user, the SymbolRef type should be the primary method of interacting with symbols, as a developer adding new object file formats, some methods must support SymtabEntrys, others must support only SymbolRefs. Note that any method that works on a SymtabEntry must also work with a SymbolRef, see the @derefmethod macro for a convenient helper macro to generate SymbolRef -> SymtabEntry wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
Read an Object File out from an IOStream, guessing at the type of object within the stream by calling readmeta(io, T) for each T within ObjTypes, and returning the first that does not throw a MagicMismatch.
Given an ObjectHandle, return the size of a section header (used for reading in the sections header when trying to load a Section object or iterating over a Sections object)
Given an ObjectHandle, return the type of a section header (used for reading in the sections header when trying to load a Section object or iterating over a Sections object). For instance, for a 64-bit ELF file, this would return the type ELFSection64
Return the name of the given section as a string. In order to return a true name, it is necessary to perform a lookup within the object's string table, which cannot be done using just a Section object; use a SectionRef object instead if you need that. For sanity sake, this method will return a string, but the contents of the string may be something like the offset within the string table pointing to this Section's name, e.g. "@strtab.123"
Given an ObjectHandle, return the size of a segment header (used for reading in the segments header when trying to load a Segment object or iterating over a Segments object)
Given an ObjectHandle, return the type of a segment header (used for reading in the segments header when trying to load a Segment object or iterating over a Segments object). For instance, for a 64-bit ELF file, this would return the type ELFSegment64
The name of the given Segment, returned as a string. This method often performs some kind of lookup within the string table of the object to get the full name of the segment.
Return the name of the given symbol as a string. This method often performs some kind of lookup within the string table of the object to get the full name of the symbol.
Return the name of the given section as a string. In order to return a true name, it is necessary to perform a lookup within the object's string table, which cannot be done using just a SymtabEntry object; use a SymbolRef object instead if you need that. For sanity sake, this method will return a string, but the contents of the string may be something like the offset within the string table pointing to this SymtabEntry's name, e.g. "@strtab.123"
Given an ObjectHandle, return the size of a symbol table entry (used for reading in the symbol table when trying to load a SymtabEntry object or iterating over a Symbols object).
Given an ObjectHandle, return the type of a symbol table entry (used for reading in the symbol table when trying to load a SymtabEntry object or iterating over a Symbols object). For instance, for a 64-bit ELF file, this would return the type ELFSymtabEntry64
This type encapsulates the linkage of one object file to another. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
This type encapsulates the list of dynamic links within an object, holding a collection of DynamicLink objects. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
This is an error type used to denote that readmeta() was called on a file that does not contain the proper magic at the beginning for the type of object file that was attempting to be loaded.
The basic type that provides access to object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note tha "must implement" is a bit of a misnomer, if an Object file does not have need of a certain piece of this API (e.g. COFF files have no concept of Segments), leaving that chunk of the API undefined will simply cause errors if a user attempts to use methods that use that part of the API (in the example above, an error will be thrown if the user calls Segments(oh) where oh <: COFFHandle).
This type encapsulates the search path used by an object file when looking for a shared library. This class enables not only looking at the path, but querying the path for matches for given library names. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
An abstraction over the concept of a Section within an object file. Because many operations upon sections require global operations (access to the string table, knowledge of position within the file, etc...) some operations are defined only upon the SectionRef datatype. As a user, the SectionRef type should be the primary method of interacting with sections, as a developer adding new object file formats, some methods must support Sections, others must support only SectionRefs. Note that any method that works on a Section must also work with a SectionRef, see the @derefmethod macro for a convenient helper macro to generate SectionRef -> Section wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
Provides a reference to a Section, along with a reference to the ObjectHandle this Section comes from. This should be the primary method by which users interact with sections inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the Section object API, this is by design as many of the methods are simply passthroughs to the underlying Section API calls for ease of use.
An abstraction over the concept of a collection of Section types within an object file. One can think of the Sections object containing the table of section headers within the object file, whereas the Section/SectionRef objects contain the actual section data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
An abstraction over the concept of a Segment within an object file. A Segment is a portion of an object file that is given instruction on its layout in virtual memory; this is in contrast to a Section, which delineates different portions of an object file on disk. ELF files have the strictest separation here, with a single executable file containing multiple Segment and Section objects, with Sections being assigned to one or more Segments for virtual memory placement. Mach-O files typically have two Segments, one called __TEXT, one called __DATA. COFF files do not have Segment.
Just like with Section objects, many operations upon segments require global operations (access to the string table, knowledge of position within the file, etc...) which causes some operations to be defined only upon the SegmentRef datatype. As a user, the SegmentRef type should be the primary method of interacting with segments, as a developer adding new object file formats, some methods must support Segments, others must support only SegmentRefs. Note that any method that works on a Segment must also work with a SegmentRef, see the @derefmethod macro for a convenient helper macro to generate SegmentRef -> Section wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
Provides a reference to a Segment, along with a reference to the ObjectHandle this Segment comes from. This should be the primary method by which users interact with segments inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the Segment object API, this is by design as many of the methods are simply passthroughs to the underlying Segment API calls for ease of use.
An abstraction over the concept of a collection of Segment types within an object file. One can think of the Segments object containing the table of segment headers within the object file, whereas the Segment/SegmentRef objects contain the actual segment data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
This type encapsulates a string table within an object file, enabling queries against the string table for symbol names, section names, etc... The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
Provides a reference to a SymtabEntry, along with a reference to the ObjectHandle this SymtabEntry comes from. This should be the primary method by which users interact with symbols inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the SymtabEntry object API, this is by design as many of the methods are simply passthroughs to the underlying SymtabEntry API calls for ease of use.
An abstraction over the concept of a collection of symbol (SymtabEntry) types within an object file. One can think of the Symbols object containing the table of symbols within the object file, whereas the SymtabEntry/SymbolRef objects contain the actual symbol data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
An abstraction over the concept of a symbol within an object file. This type does not use the Symbol name as this would conflict with the builtin Julia Symbol type, so the name SymtabEntry is used instead. As a user, the SymbolRef type should be the primary method of interacting with symbols, as a developer adding new object file formats, some methods must support SymtabEntrys, others must support only SymbolRefs. Note that any method that works on a SymtabEntry must also work with a SymbolRef, see the @derefmethod macro for a convenient helper macro to generate SymbolRef -> SymtabEntry wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
This document was generated with Documenter.jl on Tuesday 15 December 2020. Using Julia version 1.5.3.
+Search · ObjectFile.jl
Loading search...
Settings
This document was generated with Documenter.jl on Wednesday 16 December 2020. Using Julia version 1.5.3.
diff --git a/dev/search_index.js b/dev/search_index.js
index 1ecfbbe..8ec69b4 100644
--- a/dev/search_index.js
+++ b/dev/search_index.js
@@ -1,3 +1,3 @@
var documenterSearchIndex = {"docs":
-[{"location":"#ObjectFile.jl-Documentation-1","page":"Home","title":"ObjectFile.jl Documentation","text":"","category":"section"},{"location":"#Index-1","page":"Home","title":"Index","text":"","category":"section"},{"location":"#","page":"Home","title":"Home","text":"","category":"page"},{"location":"#","page":"Home","title":"Home","text":"Modules = [ObjectFile]\nOrder = [:function, :type]","category":"page"},{"location":"#Base.eof-Tuple{SectionRef}","page":"Home","title":"Base.eof","text":"eof(section::SectionRef)\n\nReturns true if the ObjectHandle that this SectionRef refers to has read beyond the current section's extent\n\n\n\n\n\n","category":"method"},{"location":"#Base.findall-Tuple{Sections,AbstractString}","page":"Home","title":"Base.findall","text":"findall(sections::Sections, name::String)\n\nReturn a list of sections that match the given name.\n\n\n\n\n\n","category":"method"},{"location":"#Base.findall-Union{Tuple{S}, Tuple{Sections,Array{S,1}}} where S<:AbstractString","page":"Home","title":"Base.findall","text":"findall(sections::Sections, name::String)\n\nReturn a list of sections that match one of the given names.\n\n\n\n\n\n","category":"method"},{"location":"#Base.findfirst-Tuple{Sections,AbstractString}","page":"Home","title":"Base.findfirst","text":"findfirst(sections::Sections, name::String)\n\nReturn the first section that matches the given name.\n\n\n\n\n\n","category":"method"},{"location":"#Base.findfirst-Tuple{Sections,Array{String,1}}","page":"Home","title":"Base.findfirst","text":"findfirst(sections::Sections, names::Vector{String})\n\nReturn the first section that matches on of the given names.\n\n\n\n\n\n","category":"method"},{"location":"#Base.read-Tuple{SectionRef}","page":"Home","title":"Base.read","text":"read(section::SectionRef)\n\nRead the contents of the section referred to by section, returning a Vector{UInt8}.\n\n\n\n\n\n","category":"method"},{"location":"#Base.read-Union{Tuple{H}, Tuple{H,Section{H}}} where H<:ObjectHandle","page":"Home","title":"Base.read","text":"read(oh::ObjectHandle, section::Section)\n\nRead the contents of the section referred to by section from the given ObjectHandle, returning a Vector{UInt8}.\n\n\n\n\n\n","category":"method"},{"location":"#Base.seek-Tuple{SectionRef,Any}","page":"Home","title":"Base.seek","text":"seek(section::SectionRef, offset)\n\nSeek to offset relative to section in the ObjectHandle that this SectionRef refers to\n\n\n\n\n\n","category":"method"},{"location":"#Base.seekstart-Tuple{SectionRef}","page":"Home","title":"Base.seekstart","text":"seekstart(section::SectionRef)\n\nSeek to the beginning of section in the ObjectHandle it was loaded from.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.canonical_rpaths-Tuple{RPath}","page":"Home","title":"ObjectFile.canonical_rpaths","text":"canonical_rpaths(rpath::RPath)\n\nReturn a canonicalized list of paths that will be searched.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.deref-Tuple{SectionRef}","page":"Home","title":"ObjectFile.deref","text":"deref(section::SectionRef)\n\nDereference the given SectionRef object to a Section.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.deref-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.deref","text":"deref(seg::SegmentRef)\n\nDereference the given SegmentRef object to a Segment.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.endianness-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.endianness","text":"endianness(oh::ObjectHandle)\n\nReturns the endianness of the given ObjectHandle (e.g. :LittleEndian)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.find_libraries-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.find_libraries","text":"find_libraries(oh::ObjectHandle)\n\nReturn a mapping from sonames to absolute paths, containing all the sonames declared as beeing needed by the given ObjectHandle. See the documentation for find_library(::RPath, ::String) and RPath for more details.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.find_library-Tuple{ObjectHandle,AbstractString}","page":"Home","title":"ObjectFile.find_library","text":"find_library(oh::ObjectHandle, soname::String)\n\nReturn the absolute path to the given soname, using the linker search path that the given ObjectHandle would use at runtime. See the documentation for find_library(::RPath, ::String) for more details.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.find_library-Tuple{RPath,AbstractString}","page":"Home","title":"ObjectFile.find_library","text":"find_library(rpath::RPath, soname::String)\n\nReturn the full path to a library, searching the given RPath, and then the default library search paths. This method takes the given soname and joins it to the end of every path within the given RPath, returning the resultant path if it exists, returning back the original soname if it doesn't.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.format_string-Tuple{Type}","page":"Home","title":"ObjectFile.format_string","text":"format_string(::Type{H}) where {H <: ObjectHandle}\n\nReturn the string name of the given ObjectHandle, examples are \"ELF\", \"MachO\", \"COFF\", etc...\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.getindex_ref-NTuple{6,Any}","page":"Home","title":"ObjectFile.getindex_ref","text":"getindex_ref(collection, offset, stride, T, ref_type, idx)\n\nGiven a collection, such as Sections, DynamicLinks, etc... use the given offset, stride, and T parameters to read in and construct a ref_type object located at index idx. Example invocation:\n\ngetindex_ref(\n sections,\n section_header_offset(oh),\n section_header_size(oh),\n section_header_type(oh),\n SectionRef,\n idx\n)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{RPath}","page":"Home","title":"ObjectFile.handle","text":"handle(rpath::RPath)\n\nReturn the handle that this RPath object refers to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{SectionRef}","page":"Home","title":"ObjectFile.handle","text":"handle(section::SectionRef)\n\nReturn the ObjectHandle this SectionRef belongs to. This method is SectionRef-only.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{Sections}","page":"Home","title":"ObjectFile.handle","text":"handle(sections::Sections)\n\nReturn the ObjectHandle that this Sections object belongs to\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.handle","text":"handle(seg::SegmentRef)\n\nReturn the ObjectHandle this SegmentRef belongs to. This method is SegmentRef-only.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{StrTab}","page":"Home","title":"ObjectFile.handle","text":"handle(s::StrTab)\n\nReturn the ObjectHandle this StrTab belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{SymbolRef}","page":"Home","title":"ObjectFile.handle","text":"handle(sym::SymbolRef)\n\nReturn the ObjectHandle that this SymbolRef belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.header-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.header","text":"header(oh::ObjectHandle)\n\nReturn the ObjectHandle's header object, whatever that may be for this particular object file format.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.iostream-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.iostream","text":"iostream(oh::ObjectHandle)\n\nReturns the IOStream backing the ObjectHandle\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.is64bit-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.is64bit","text":"is64bit(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle represents a 64-bit object\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isdynamic-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.isdynamic","text":"isdynamic(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle makes use of dynamic linking.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isexecutable-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.isexecutable","text":"isexecutable(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle represents an executable object\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isglobal-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.isglobal","text":"isglobal(sym::SymtabEntry)\n\nReturn true if the given symbol is global\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.islibrary-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.islibrary","text":"islibrary(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle represents a shared library\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.islocal-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.islocal","text":"islocal(sym::SymtabEntry)\n\nReturn true if the given symbol is local\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isrelocatable-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.isrelocatable","text":"isrelocatable(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle represents a relocatable object file, e.g. an .o file as generated by gcc -c\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isundef-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.isundef","text":"isundef(sym::SymtabEntry)\n\nReturn true if the given symbol is undefined\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isweak-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.isweak","text":"isweak(sym::SymtabEntry)\n\nReturn true if the given symbol is weak\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.mangle_section_name-Tuple{ObjectHandle,AbstractString}","page":"Home","title":"ObjectFile.mangle_section_name","text":"mangle_section_name(oh::ObjectHandle, name::AbstractString)\n\nTurn a section name into the object-format specific naming convention, e.g. returning \".bss\" for ELF/COFF files, and \"__bss\" for MachO files\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.mangle_symbol_name-Tuple{ObjectHandle,AbstractString}","page":"Home","title":"ObjectFile.mangle_symbol_name","text":"mangle_symbol_name(oh::ObjectHandle, name::AbstractString)\n\nMangle a symbol name using the object-format specific naming convention, e.g. prefixing \"_\" for MachO files.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.path-Tuple{IO}","page":"Home","title":"ObjectFile.path","text":"path(io::IO)\n\nTry to guess the path of an IO object. If it cannot be guessed, returns the empty string.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.path-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.path","text":"path(oh::ObjectHandle)\n\nReturn the absolute path to the given ObjectHandle, if it was a file loaded from the local disk. If it was loaded from a general IOStream or in some other way such that the path is unknown or unknowable, return the empty string.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.read_struct-NTuple{4,Any}","page":"Home","title":"ObjectFile.read_struct","text":"read_struct(oh, type_func, size_func, name)\n\nGiven a Type, (such as ELFSection64), unpack() it from the given object and return it, throwing errors as appropriate, and skipping over any excess padding bytes as determined by type_func and size_func. Example invocation:\n\nreadstruct(oh, symtabentrytype, symtabentry_size, \"Symbol Entry\")\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.readmeta-Tuple{Function,AbstractString}","page":"Home","title":"ObjectFile.readmeta","text":"readmeta(f::Function, file::AbstractString)\n\nDo-block variant of readmeta(). Use via something like:\n\nreadmeta(\"libfoo.so\") do f\n ...\nend\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.readmeta-Tuple{IO}","page":"Home","title":"ObjectFile.readmeta","text":"readmeta(io::IO)\n\nRead an Object File out from an IOStream, guessing at the type of object within the stream by calling readmeta(io, T) for each T within ObjTypes, and returning the first that does not throw a MagicMismatch.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.readmeta-Union{Tuple{T}, Tuple{IO,Type{T}}} where T<:ObjectHandle","page":"Home","title":"ObjectFile.readmeta","text":"readmeta(io::IO, ::ObjectHandle)\n\nRead an Object File out from an IOStream. This is the first method you should call in order to manipulate object files.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.rpaths-Tuple{RPath}","page":"Home","title":"ObjectFile.rpaths","text":"rpaths(rpath::RPath)\n\nReturn the list of paths that will be searched for shared libraries.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_address-Tuple{Section}","page":"Home","title":"ObjectFile.section_address","text":"section_address(section::Section)\n\nThe address of the section in virtual memory.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_header_offset-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.section_header_offset","text":"section_header_offset(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the offset (in bytes) at which the sections start within the containing object file.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_header_size-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.section_header_size","text":"section_header_size(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the size of a section header (used for reading in the sections header when trying to load a Section object or iterating over a Sections object)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_header_type-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.section_header_type","text":"section_header_type(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the type of a section header (used for reading in the sections header when trying to load a Section object or iterating over a Sections object). For instance, for a 64-bit ELF file, this would return the type ELFSection64\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_name-Tuple{Section}","page":"Home","title":"ObjectFile.section_name","text":"section_name(section::Section)\n\nReturn the name of the given section as a string. In order to return a true name, it is necessary to perform a lookup within the object's string table, which cannot be done using just a Section object; use a SectionRef object instead if you need that. For sanity sake, this method will return a string, but the contents of the string may be something like the offset within the string table pointing to this Section's name, e.g. \"@strtab.123\"\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_number-Tuple{SectionRef}","page":"Home","title":"ObjectFile.section_number","text":"section_number(section::SectionRef)\n\nThe index of the given section within the section header table.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_offset-Tuple{Section}","page":"Home","title":"ObjectFile.section_offset","text":"section_offset(section::Section)\n\nThe offset of the section in the file, in bytes\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_size-Tuple{Section}","page":"Home","title":"ObjectFile.section_size","text":"section_size(section::Section)\n\nThe size of the actual data contained in the section. This should exclude any padding mandated by the file format e.g. due to alignment rules\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_header_offset-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.segment_header_offset","text":"segment_header_offset(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the offset (in bytes) at which the segments start within the containing object file.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_header_size-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.segment_header_size","text":"segment_header_size(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the size of a segment header (used for reading in the segments header when trying to load a Segment object or iterating over a Segments object)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_header_type-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.segment_header_type","text":"segment_header_type(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the type of a segment header (used for reading in the segments header when trying to load a Segment object or iterating over a Segments object). For instance, for a 64-bit ELF file, this would return the type ELFSegment64\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_name-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.segment_name","text":"segment_name(seg::SegmentRef)\n\nThe name of the given Segment, returned as a string. This method often performs some kind of lookup within the string table of the object to get the full name of the segment.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_number-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.segment_number","text":"segment_number(seg::SegmentRef)\n\nReturn the index of the referred segment.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.strtab_lookup-Tuple{StrTab,Any}","page":"Home","title":"ObjectFile.strtab_lookup","text":"strtab_lookup(s::StrTab, index)\n\nReads a string from the given StrTab at index.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symbol_name-Tuple{SymbolRef}","page":"Home","title":"ObjectFile.symbol_name","text":"symbol_name(sym::SymbolRef)\n\nReturn the name of the given symbol as a string. This method often performs some kind of lookup within the string table of the object to get the full name of the symbol.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symbol_name-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.symbol_name","text":"symbol_name(sym::SymtabEntry)\n\nReturn the name of the given section as a string. In order to return a true name, it is necessary to perform a lookup within the object's string table, which cannot be done using just a SymtabEntry object; use a SymbolRef object instead if you need that. For sanity sake, this method will return a string, but the contents of the string may be something like the offset within the string table pointing to this SymtabEntry's name, e.g. \"@strtab.123\"\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symbol_number-Tuple{SymbolRef}","page":"Home","title":"ObjectFile.symbol_number","text":"symbol_number(sym::SymbolRef)\n\nReturn the number (index) of the given symbol.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symbol_value-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.symbol_value","text":"symbol_value(sym::SymtabEntry)\n\nReturn the value of the given symbol\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symtab_entry_offset-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.symtab_entry_offset","text":"symtab_entry_offset(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the offset (in bytes) at which the symbol table starts within the containing object file.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symtab_entry_size-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.symtab_entry_size","text":"symtab_entry_size(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the size of a symbol table entry (used for reading in the symbol table when trying to load a SymtabEntry object or iterating over a Symbols object).\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symtab_entry_type-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.symtab_entry_type","text":"symtab_entry_type(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the type of a symbol table entry (used for reading in the symbol table when trying to load a SymtabEntry object or iterating over a Symbols object). For instance, for a 64-bit ELF file, this would return the type ELFSymtabEntry64\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.DynamicLink","page":"Home","title":"ObjectFile.DynamicLink","text":"DynamicLink\n\nThis type encapsulates the linkage of one object file to another. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nDynamicLink()\n\nAccessors:\n\nDynamicLinks()\nhandle()\npath()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.DynamicLinks","page":"Home","title":"ObjectFile.DynamicLinks","text":"DynamicLinks\n\nThis type encapsulates the list of dynamic links within an object, holding a collection of DynamicLink objects. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nDynamicLinks()\n\nIteration\n\ngetindex()\nlastindex()\niterate()\nkeys()\neltype()\n\nMisc.\n\nhandle()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.MagicMismatch","page":"Home","title":"ObjectFile.MagicMismatch","text":"MagicMismatch\n\nThis is an error type used to denote that readmeta() was called on a file that does not contain the proper magic at the beginning for the type of object file that was attempting to be loaded.\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.ObjectHandle","page":"Home","title":"ObjectFile.ObjectHandle","text":"ObjectHandle\n\nThe basic type that provides access to object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note tha \"must implement\" is a bit of a misnomer, if an Object file does not have need of a certain piece of this API (e.g. COFF files have no concept of Segments), leaving that chunk of the API undefined will simply cause errors if a user attempts to use methods that use that part of the API (in the example above, an error will be thrown if the user calls Segments(oh) where oh <: COFFHandle).\n\nCreation\n\nreadmeta()\n\nIOStream-like operations:\n\nseek()\nseekstart()\nskip()\nstartaddr()\niostream()\nposition()\nread()\nreaduntil()\neof()\nunpack()\n\nFormat-specific properties\n\nendianness()\nis64bit()\nisrelocatable()\nisexecutable()\nislibrary()\nisdynamic()\nmanglesectionname()\nmanglesymbolname()\nhandle()\nheader()\nformat_string()\n\nSection properties\n\nsectionheaderoffset()\nsectionheadersize()\nsectionheadertype()\n\nSegment properties\n\nsegmentheaderoffset()\nsegmentheadersize()\nsegmentheadertype()\n\nSymbol properties\n\nsymtabentryoffset()\nsymtabentrysize()\nsymtabentrytype()\n\nMisc\n\npath()\nshow()\nfind_library()\nfind_libraries()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.RPath","page":"Home","title":"ObjectFile.RPath","text":"RPath\n\nThis type encapsulates the search path used by an object file when looking for a shared library. This class enables not only looking at the path, but querying the path for matches for given library names. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nRPath()\n\nUtility\n\nhandle()\n\nRPath operations\n\nrpaths()\ncanonical_rpaths()\nfind_library()\nlastindex()\niterate()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.RPath-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.RPath","text":"RPath(oh::ObjectHandle)\n\nConstruct an RPath object from the given ObjectHandle.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.Section","page":"Home","title":"ObjectFile.Section","text":"Section\n\nAn abstraction over the concept of a Section within an object file. Because many operations upon sections require global operations (access to the string table, knowledge of position within the file, etc...) some operations are defined only upon the SectionRef datatype. As a user, the SectionRef type should be the primary method of interacting with sections, as a developer adding new object file formats, some methods must support Sections, others must support only SectionRefs. Note that any method that works on a Section must also work with a SectionRef, see the @derefmethod macro for a convenient helper macro to generate SectionRef -> Section wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nread()\n\nUtility:\n\nderef()\n\nIO-like operations:\n\nread()\n\nFormat-specific properties:\n\nsection_name()\nsection_size()\nsection_offset()\nsection_address()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SectionRef","page":"Home","title":"ObjectFile.SectionRef","text":"SectionRef\n\nProvides a reference to a Section, along with a reference to the ObjectHandle this Section comes from. This should be the primary method by which users interact with sections inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the Section object API, this is by design as many of the methods are simply passthroughs to the underlying Section API calls for ease of use.\n\nCreation:\n\nSectionRef()\n\nUtility\n\nderef()\nhandle()\nSections()\n\nIO-like operations:\n\nread()\nseekstart()\nseek()\neof()\n\nFormat-specific properties:\n\nsection_name()\nsection_number()\nsection_type()\nsection_size()\nsection_offset()\nsection_address()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SectionRef-Tuple{Sections,Section,Any}","page":"Home","title":"ObjectFile.SectionRef","text":"SectionRef(sections::Sections, section::Section, idx)\n\nConstruct a SectionRef object pointing to the given Section, which itself represents the idx'th section within the given Sections.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.Sections","page":"Home","title":"ObjectFile.Sections","text":"Sections\n\nAn abstraction over the concept of a collection of Section types within an object file. One can think of the Sections object containing the table of section headers within the object file, whereas the Section/SectionRef objects contain the actual section data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nSections()\n\nIteration\n\ngetindex()\nlastindex()\nlength()\niterate()\nkeys()\neltype()\n\nSearch\n\nfindall()\nfindfirst()\n\nMisc.\n\nhandle()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.Sections-Tuple{SectionRef}","page":"Home","title":"ObjectFile.Sections","text":"Sections(section::SectionRef)\n\nReturn the Sections collection this section belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.Segment","page":"Home","title":"ObjectFile.Segment","text":"Segment\n\nAn abstraction over the concept of a Segment within an object file. A Segment is a portion of an object file that is given instruction on its layout in virtual memory; this is in contrast to a Section, which delineates different portions of an object file on disk. ELF files have the strictest separation here, with a single executable file containing multiple Segment and Section objects, with Sections being assigned to one or more Segments for virtual memory placement. Mach-O files typically have two Segments, one called __TEXT, one called __DATA. COFF files do not have Segment.\n\nJust like with Section objects, many operations upon segments require global operations (access to the string table, knowledge of position within the file, etc...) which causes some operations to be defined only upon the SegmentRef datatype. As a user, the SegmentRef type should be the primary method of interacting with segments, as a developer adding new object file formats, some methods must support Segments, others must support only SegmentRefs. Note that any method that works on a Segment must also work with a SegmentRef, see the @derefmethod macro for a convenient helper macro to generate SegmentRef -> Section wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nread()\n\nUtility:\n\nderef()\n\nFormat-specific properties:\n\nsegment_name()\nsegment_offset()\nsegmentfilesize()\nsegmentmemorysize()\nsegment_address()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SegmentRef","page":"Home","title":"ObjectFile.SegmentRef","text":"SegmentRef\n\nProvides a reference to a Segment, along with a reference to the ObjectHandle this Segment comes from. This should be the primary method by which users interact with segments inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the Segment object API, this is by design as many of the methods are simply passthroughs to the underlying Segment API calls for ease of use.\n\nCreation:\n\nSegmentRef()\n\nUtility\n\nderef()\nSegments()\nhandle()\n\nFormat-specific properties:\n\nsegment_name()\nsegment_number()\nsegment_offset()\nsegmentfilesize()\nsegmentmemorysize()\nsegment_address()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.Segments","page":"Home","title":"ObjectFile.Segments","text":"Segments\n\nAn abstraction over the concept of a collection of Segment types within an object file. One can think of the Segments object containing the table of segment headers within the object file, whereas the Segment/SegmentRef objects contain the actual segment data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nSegments()\n\nIteration\n\ngetindex()\nlastindex()\nlength()\niterate()\nkeys()\neltype()\n\nSearch\n\nfindall()\nfindfirst()\n\nMisc.\n\nhandle()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.Segments-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.Segments","text":"Segments(seg::SegmentRef)\n\nReturn the Segments collection this Segment belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.StrTab","page":"Home","title":"ObjectFile.StrTab","text":"StrTab\n\nThis type encapsulates a string table within an object file, enabling queries against the string table for symbol names, section names, etc... The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nStrTab()\n\nAccessors\n\nhandle()\nstrtab_lookup()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SymbolRef","page":"Home","title":"ObjectFile.SymbolRef","text":"SymbolRef\n\nProvides a reference to a SymtabEntry, along with a reference to the ObjectHandle this SymtabEntry comes from. This should be the primary method by which users interact with symbols inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the SymtabEntry object API, this is by design as many of the methods are simply passthroughs to the underlying SymtabEntry API calls for ease of use.\n\nCreation:\n\nSymbolRef()\n\nUtil:\n\nderef()\nSymbols()\nhandle()\n\nProperties:\n\nsymbol_number()\nsymbol_name()\nsymbol_value()\nisundef()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SymbolRef-Tuple{Symbols,SymtabEntry,UInt32}","page":"Home","title":"ObjectFile.SymbolRef","text":"SymbolRef(symbols::Symbols, sym::SymtabEntry, idx::UInt32)\n\nConstruct a SymbolRef object pointing to the given SymtabEntry, which itself represents the idx'th symbol within the given Symbols collection.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.Symbols","page":"Home","title":"ObjectFile.Symbols","text":"Symbols\n\nAn abstraction over the concept of a collection of symbol (SymtabEntry) types within an object file. One can think of the Symbols object containing the table of symbols within the object file, whereas the SymtabEntry/SymbolRef objects contain the actual symbol data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nSymbols()\n\nIteration\n\ngetindex()\nlastindex()\nlength()\niterate()\neltype()\n\nMisc.\n\nhandle()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.Symbols-Tuple{SymbolRef}","page":"Home","title":"ObjectFile.Symbols","text":"Symbols(sym::SymbolRef)\n\nReturn the Symbols object that this SymbolRef belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.SymtabEntry","page":"Home","title":"ObjectFile.SymtabEntry","text":"SymtabEntry\n\nAn abstraction over the concept of a symbol within an object file. This type does not use the Symbol name as this would conflict with the builtin Julia Symbol type, so the name SymtabEntry is used instead. As a user, the SymbolRef type should be the primary method of interacting with symbols, as a developer adding new object file formats, some methods must support SymtabEntrys, others must support only SymbolRefs. Note that any method that works on a SymtabEntry must also work with a SymbolRef, see the @derefmethod macro for a convenient helper macro to generate SymbolRef -> SymtabEntry wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nSymtabEntry()\n\nUtil:\n\nderef()\n\nProperties:\n\nsymbol_name()\nsymbol_value()\nisundef()\nisglobal()\nislocal()\nisweak()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.fixed_string","page":"Home","title":"ObjectFile.fixed_string","text":"fixed_string{T}\n\nA fixed-byte string, stored as an integer type (e.g. T = UInt128, or T = UInt64) but displayed and treated as a string.\n\n\n\n\n\n","category":"type"},{"location":"#Base.unsafe_string-Union{Tuple{T}, Tuple{Any,T}} where T<:Integer","page":"Home","title":"Base.unsafe_string","text":"unsafe_string(io, max_len::Integer)\n\nRead in a null-terminated string, stopping with a maximum length of max_len.\n\n\n\n\n\n","category":"method"},{"location":"#Base.unsafe_string-Union{Tuple{fixed_string{T}}, Tuple{T}} where T<:Integer","page":"Home","title":"Base.unsafe_string","text":"unsafe_string(x::fixed_string)\n\nConvert a fixed_string object to a native-Julia String\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.show_collection-Union{Tuple{ST}, Tuple{H}, Tuple{IO,ST,Type{H}}} where ST where H<:ObjectHandle","page":"Home","title":"ObjectFile.show_collection","text":"show_collection(io, collection, ::Type{H<:ObjectHandle})\n\nGiven a collection-like object, (Symbols, DynamicLinks, ``)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.startaddr-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.startaddr","text":"startaddr(oh::ObjectHandle)\n\nReturns the offset within the underlying IOStream at which this ObjectHandle is located.\n\n\n\n\n\n","category":"method"}]
+[{"location":"#ObjectFile.jl-Documentation-1","page":"Home","title":"ObjectFile.jl Documentation","text":"","category":"section"},{"location":"#Index-1","page":"Home","title":"Index","text":"","category":"section"},{"location":"#","page":"Home","title":"Home","text":"","category":"page"},{"location":"#","page":"Home","title":"Home","text":"Modules = [ObjectFile]\nOrder = [:function, :type]","category":"page"},{"location":"#Base.eof-Tuple{SectionRef}","page":"Home","title":"Base.eof","text":"eof(section::SectionRef)\n\nReturns true if the ObjectHandle that this SectionRef refers to has read beyond the current section's extent\n\n\n\n\n\n","category":"method"},{"location":"#Base.findall-Tuple{Sections,AbstractString}","page":"Home","title":"Base.findall","text":"findall(sections::Sections, name::String)\n\nReturn a list of sections that match the given name.\n\n\n\n\n\n","category":"method"},{"location":"#Base.findall-Union{Tuple{S}, Tuple{Sections,Array{S,1}}} where S<:AbstractString","page":"Home","title":"Base.findall","text":"findall(sections::Sections, name::String)\n\nReturn a list of sections that match one of the given names.\n\n\n\n\n\n","category":"method"},{"location":"#Base.findfirst-Tuple{Sections,AbstractString}","page":"Home","title":"Base.findfirst","text":"findfirst(sections::Sections, name::String)\n\nReturn the first section that matches the given name.\n\n\n\n\n\n","category":"method"},{"location":"#Base.findfirst-Tuple{Sections,Array{String,1}}","page":"Home","title":"Base.findfirst","text":"findfirst(sections::Sections, names::Vector{String})\n\nReturn the first section that matches on of the given names.\n\n\n\n\n\n","category":"method"},{"location":"#Base.read-Tuple{SectionRef}","page":"Home","title":"Base.read","text":"read(section::SectionRef)\n\nRead the contents of the section referred to by section, returning a Vector{UInt8}.\n\n\n\n\n\n","category":"method"},{"location":"#Base.read-Union{Tuple{H}, Tuple{H,Section{H}}} where H<:ObjectHandle","page":"Home","title":"Base.read","text":"read(oh::ObjectHandle, section::Section)\n\nRead the contents of the section referred to by section from the given ObjectHandle, returning a Vector{UInt8}.\n\n\n\n\n\n","category":"method"},{"location":"#Base.seek-Tuple{SectionRef,Any}","page":"Home","title":"Base.seek","text":"seek(section::SectionRef, offset)\n\nSeek to offset relative to section in the ObjectHandle that this SectionRef refers to\n\n\n\n\n\n","category":"method"},{"location":"#Base.seekstart-Tuple{SectionRef}","page":"Home","title":"Base.seekstart","text":"seekstart(section::SectionRef)\n\nSeek to the beginning of section in the ObjectHandle it was loaded from.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.canonical_rpaths-Tuple{RPath}","page":"Home","title":"ObjectFile.canonical_rpaths","text":"canonical_rpaths(rpath::RPath)\n\nReturn a canonicalized list of paths that will be searched.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.deref-Tuple{SectionRef}","page":"Home","title":"ObjectFile.deref","text":"deref(section::SectionRef)\n\nDereference the given SectionRef object to a Section.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.deref-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.deref","text":"deref(seg::SegmentRef)\n\nDereference the given SegmentRef object to a Segment.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.endianness-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.endianness","text":"endianness(oh::ObjectHandle)\n\nReturns the endianness of the given ObjectHandle (e.g. :LittleEndian)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.find_libraries-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.find_libraries","text":"find_libraries(oh::ObjectHandle)\n\nReturn a mapping from sonames to absolute paths, containing all the sonames declared as beeing needed by the given ObjectHandle. See the documentation for find_library(::RPath, ::String) and RPath for more details.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.find_library-Tuple{ObjectHandle,AbstractString}","page":"Home","title":"ObjectFile.find_library","text":"find_library(oh::ObjectHandle, soname::String)\n\nReturn the absolute path to the given soname, using the linker search path that the given ObjectHandle would use at runtime. See the documentation for find_library(::RPath, ::String) for more details.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.find_library-Tuple{RPath,AbstractString}","page":"Home","title":"ObjectFile.find_library","text":"find_library(rpath::RPath, soname::String)\n\nReturn the full path to a library, searching the given RPath, and then the default library search paths. This method takes the given soname and joins it to the end of every path within the given RPath, returning the resultant path if it exists, returning back the original soname if it doesn't.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.format_string-Tuple{Type}","page":"Home","title":"ObjectFile.format_string","text":"format_string(::Type{H}) where {H <: ObjectHandle}\n\nReturn the string name of the given ObjectHandle, examples are \"ELF\", \"MachO\", \"COFF\", etc...\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.getindex_ref-NTuple{6,Any}","page":"Home","title":"ObjectFile.getindex_ref","text":"getindex_ref(collection, offset, stride, T, ref_type, idx)\n\nGiven a collection, such as Sections, DynamicLinks, etc... use the given offset, stride, and T parameters to read in and construct a ref_type object located at index idx. Example invocation:\n\ngetindex_ref(\n sections,\n section_header_offset(oh),\n section_header_size(oh),\n section_header_type(oh),\n SectionRef,\n idx\n)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{RPath}","page":"Home","title":"ObjectFile.handle","text":"handle(rpath::RPath)\n\nReturn the handle that this RPath object refers to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{SectionRef}","page":"Home","title":"ObjectFile.handle","text":"handle(section::SectionRef)\n\nReturn the ObjectHandle this SectionRef belongs to. This method is SectionRef-only.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{Sections}","page":"Home","title":"ObjectFile.handle","text":"handle(sections::Sections)\n\nReturn the ObjectHandle that this Sections object belongs to\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.handle","text":"handle(seg::SegmentRef)\n\nReturn the ObjectHandle this SegmentRef belongs to. This method is SegmentRef-only.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{StrTab}","page":"Home","title":"ObjectFile.handle","text":"handle(s::StrTab)\n\nReturn the ObjectHandle this StrTab belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{SymbolRef}","page":"Home","title":"ObjectFile.handle","text":"handle(sym::SymbolRef)\n\nReturn the ObjectHandle that this SymbolRef belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.header-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.header","text":"header(oh::ObjectHandle)\n\nReturn the ObjectHandle's header object, whatever that may be for this particular object file format.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.iostream-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.iostream","text":"iostream(oh::ObjectHandle)\n\nReturns the IOStream backing the ObjectHandle\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.is64bit-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.is64bit","text":"is64bit(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle represents a 64-bit object\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isdynamic-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.isdynamic","text":"isdynamic(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle makes use of dynamic linking.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isexecutable-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.isexecutable","text":"isexecutable(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle represents an executable object\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isglobal-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.isglobal","text":"isglobal(sym::SymtabEntry)\n\nReturn true if the given symbol is global\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.islibrary-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.islibrary","text":"islibrary(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle represents a shared library\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.islocal-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.islocal","text":"islocal(sym::SymtabEntry)\n\nReturn true if the given symbol is local\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isrelocatable-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.isrelocatable","text":"isrelocatable(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle represents a relocatable object file, e.g. an .o file as generated by gcc -c\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isundef-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.isundef","text":"isundef(sym::SymtabEntry)\n\nReturn true if the given symbol is undefined\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isweak-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.isweak","text":"isweak(sym::SymtabEntry)\n\nReturn true if the given symbol is weak\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.mangle_section_name-Tuple{ObjectHandle,AbstractString}","page":"Home","title":"ObjectFile.mangle_section_name","text":"mangle_section_name(oh::ObjectHandle, name::AbstractString)\n\nTurn a section name into the object-format specific naming convention, e.g. returning \".bss\" for ELF/COFF files, and \"__bss\" for MachO files\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.mangle_symbol_name-Tuple{ObjectHandle,AbstractString}","page":"Home","title":"ObjectFile.mangle_symbol_name","text":"mangle_symbol_name(oh::ObjectHandle, name::AbstractString)\n\nMangle a symbol name using the object-format specific naming convention, e.g. prefixing \"_\" for MachO files.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.path-Tuple{IO}","page":"Home","title":"ObjectFile.path","text":"path(io::IO)\n\nTry to guess the path of an IO object. If it cannot be guessed, returns the empty string.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.path-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.path","text":"path(oh::ObjectHandle)\n\nReturn the absolute path to the given ObjectHandle, if it was a file loaded from the local disk. If it was loaded from a general IOStream or in some other way such that the path is unknown or unknowable, return the empty string.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.read_struct-NTuple{4,Any}","page":"Home","title":"ObjectFile.read_struct","text":"read_struct(oh, type_func, size_func, name)\n\nGiven a Type, (such as ELFSection64), unpack() it from the given object and return it, throwing errors as appropriate, and skipping over any excess padding bytes as determined by type_func and size_func. Example invocation:\n\nreadstruct(oh, symtabentrytype, symtabentry_size, \"Symbol Entry\")\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.readmeta-Tuple{Function,AbstractString}","page":"Home","title":"ObjectFile.readmeta","text":"readmeta(f::Function, file::AbstractString)\n\nDo-block variant of readmeta(). Use via something like:\n\nreadmeta(\"libfoo.so\") do f\n ...\nend\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.readmeta-Tuple{IO}","page":"Home","title":"ObjectFile.readmeta","text":"readmeta(io::IO)\n\nRead an Object File out from an IOStream, guessing at the type of object within the stream by calling readmeta(io, T) for each T within ObjTypes, and returning the first that does not throw a MagicMismatch.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.readmeta-Union{Tuple{T}, Tuple{IO,Type{T}}} where T<:ObjectHandle","page":"Home","title":"ObjectFile.readmeta","text":"readmeta(io::IO, ::ObjectHandle)\n\nRead an Object File out from an IOStream. This is the first method you should call in order to manipulate object files.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.rpaths-Tuple{RPath}","page":"Home","title":"ObjectFile.rpaths","text":"rpaths(rpath::RPath)\n\nReturn the list of paths that will be searched for shared libraries.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_address-Tuple{Section}","page":"Home","title":"ObjectFile.section_address","text":"section_address(section::Section)\n\nThe address of the section in virtual memory.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_header_offset-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.section_header_offset","text":"section_header_offset(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the offset (in bytes) at which the sections start within the containing object file.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_header_size-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.section_header_size","text":"section_header_size(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the size of a section header (used for reading in the sections header when trying to load a Section object or iterating over a Sections object)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_header_type-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.section_header_type","text":"section_header_type(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the type of a section header (used for reading in the sections header when trying to load a Section object or iterating over a Sections object). For instance, for a 64-bit ELF file, this would return the type ELFSection64\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_name-Tuple{Section}","page":"Home","title":"ObjectFile.section_name","text":"section_name(section::Section)\n\nReturn the name of the given section as a string. In order to return a true name, it is necessary to perform a lookup within the object's string table, which cannot be done using just a Section object; use a SectionRef object instead if you need that. For sanity sake, this method will return a string, but the contents of the string may be something like the offset within the string table pointing to this Section's name, e.g. \"@strtab.123\"\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_number-Tuple{SectionRef}","page":"Home","title":"ObjectFile.section_number","text":"section_number(section::SectionRef)\n\nThe index of the given section within the section header table.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_offset-Tuple{Section}","page":"Home","title":"ObjectFile.section_offset","text":"section_offset(section::Section)\n\nThe offset of the section in the file, in bytes\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_size-Tuple{Section}","page":"Home","title":"ObjectFile.section_size","text":"section_size(section::Section)\n\nThe size of the actual data contained in the section. This should exclude any padding mandated by the file format e.g. due to alignment rules\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_header_offset-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.segment_header_offset","text":"segment_header_offset(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the offset (in bytes) at which the segments start within the containing object file.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_header_size-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.segment_header_size","text":"segment_header_size(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the size of a segment header (used for reading in the segments header when trying to load a Segment object or iterating over a Segments object)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_header_type-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.segment_header_type","text":"segment_header_type(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the type of a segment header (used for reading in the segments header when trying to load a Segment object or iterating over a Segments object). For instance, for a 64-bit ELF file, this would return the type ELFSegment64\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_name-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.segment_name","text":"segment_name(seg::SegmentRef)\n\nThe name of the given Segment, returned as a string. This method often performs some kind of lookup within the string table of the object to get the full name of the segment.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_number-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.segment_number","text":"segment_number(seg::SegmentRef)\n\nReturn the index of the referred segment.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.strtab_lookup-Tuple{StrTab,Any}","page":"Home","title":"ObjectFile.strtab_lookup","text":"strtab_lookup(s::StrTab, index)\n\nReads a string from the given StrTab at index.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symbol_name-Tuple{SymbolRef}","page":"Home","title":"ObjectFile.symbol_name","text":"symbol_name(sym::SymbolRef)\n\nReturn the name of the given symbol as a string. This method often performs some kind of lookup within the string table of the object to get the full name of the symbol.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symbol_name-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.symbol_name","text":"symbol_name(sym::SymtabEntry)\n\nReturn the name of the given section as a string. In order to return a true name, it is necessary to perform a lookup within the object's string table, which cannot be done using just a SymtabEntry object; use a SymbolRef object instead if you need that. For sanity sake, this method will return a string, but the contents of the string may be something like the offset within the string table pointing to this SymtabEntry's name, e.g. \"@strtab.123\"\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symbol_number-Tuple{SymbolRef}","page":"Home","title":"ObjectFile.symbol_number","text":"symbol_number(sym::SymbolRef)\n\nReturn the number (index) of the given symbol.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symbol_value-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.symbol_value","text":"symbol_value(sym::SymtabEntry)\n\nReturn the value of the given symbol\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symtab_entry_offset-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.symtab_entry_offset","text":"symtab_entry_offset(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the offset (in bytes) at which the symbol table starts within the containing object file.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symtab_entry_size-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.symtab_entry_size","text":"symtab_entry_size(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the size of a symbol table entry (used for reading in the symbol table when trying to load a SymtabEntry object or iterating over a Symbols object).\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symtab_entry_type-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.symtab_entry_type","text":"symtab_entry_type(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the type of a symbol table entry (used for reading in the symbol table when trying to load a SymtabEntry object or iterating over a Symbols object). For instance, for a 64-bit ELF file, this would return the type ELFSymtabEntry64\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.DynamicLink","page":"Home","title":"ObjectFile.DynamicLink","text":"DynamicLink\n\nThis type encapsulates the linkage of one object file to another. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nDynamicLink()\n\nAccessors:\n\nDynamicLinks()\nhandle()\npath()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.DynamicLinks","page":"Home","title":"ObjectFile.DynamicLinks","text":"DynamicLinks\n\nThis type encapsulates the list of dynamic links within an object, holding a collection of DynamicLink objects. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nDynamicLinks()\n\nIteration\n\ngetindex()\nlastindex()\niterate()\nkeys()\neltype()\n\nMisc.\n\nhandle()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.MagicMismatch","page":"Home","title":"ObjectFile.MagicMismatch","text":"MagicMismatch\n\nThis is an error type used to denote that readmeta() was called on a file that does not contain the proper magic at the beginning for the type of object file that was attempting to be loaded.\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.ObjectHandle","page":"Home","title":"ObjectFile.ObjectHandle","text":"ObjectHandle\n\nThe basic type that provides access to object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note tha \"must implement\" is a bit of a misnomer, if an Object file does not have need of a certain piece of this API (e.g. COFF files have no concept of Segments), leaving that chunk of the API undefined will simply cause errors if a user attempts to use methods that use that part of the API (in the example above, an error will be thrown if the user calls Segments(oh) where oh <: COFFHandle).\n\nCreation\n\nreadmeta()\n\nIOStream-like operations:\n\nseek()\nseekstart()\nskip()\nstartaddr()\niostream()\nposition()\nread()\nreaduntil()\neof()\nunpack()\n\nFormat-specific properties\n\nendianness()\nis64bit()\nisrelocatable()\nisexecutable()\nislibrary()\nisdynamic()\nmanglesectionname()\nmanglesymbolname()\nhandle()\nheader()\nformat_string()\n\nSection properties\n\nsectionheaderoffset()\nsectionheadersize()\nsectionheadertype()\n\nSegment properties\n\nsegmentheaderoffset()\nsegmentheadersize()\nsegmentheadertype()\n\nSymbol properties\n\nsymtabentryoffset()\nsymtabentrysize()\nsymtabentrytype()\n\nMisc\n\npath()\nshow()\nfind_library()\nfind_libraries()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.RPath","page":"Home","title":"ObjectFile.RPath","text":"RPath\n\nThis type encapsulates the search path used by an object file when looking for a shared library. This class enables not only looking at the path, but querying the path for matches for given library names. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nRPath()\n\nUtility\n\nhandle()\n\nRPath operations\n\nrpaths()\ncanonical_rpaths()\nfind_library()\nlastindex()\niterate()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.RPath-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.RPath","text":"RPath(oh::ObjectHandle)\n\nConstruct an RPath object from the given ObjectHandle.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.Section","page":"Home","title":"ObjectFile.Section","text":"Section\n\nAn abstraction over the concept of a Section within an object file. Because many operations upon sections require global operations (access to the string table, knowledge of position within the file, etc...) some operations are defined only upon the SectionRef datatype. As a user, the SectionRef type should be the primary method of interacting with sections, as a developer adding new object file formats, some methods must support Sections, others must support only SectionRefs. Note that any method that works on a Section must also work with a SectionRef, see the @derefmethod macro for a convenient helper macro to generate SectionRef -> Section wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nread()\n\nUtility:\n\nderef()\n\nIO-like operations:\n\nread()\n\nFormat-specific properties:\n\nsection_name()\nsection_size()\nsection_offset()\nsection_address()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SectionRef","page":"Home","title":"ObjectFile.SectionRef","text":"SectionRef\n\nProvides a reference to a Section, along with a reference to the ObjectHandle this Section comes from. This should be the primary method by which users interact with sections inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the Section object API, this is by design as many of the methods are simply passthroughs to the underlying Section API calls for ease of use.\n\nCreation:\n\nSectionRef()\n\nUtility\n\nderef()\nhandle()\nSections()\n\nIO-like operations:\n\nread()\nseekstart()\nseek()\neof()\n\nFormat-specific properties:\n\nsection_name()\nsection_number()\nsection_type()\nsection_size()\nsection_offset()\nsection_address()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SectionRef-Tuple{Sections,Section,Any}","page":"Home","title":"ObjectFile.SectionRef","text":"SectionRef(sections::Sections, section::Section, idx)\n\nConstruct a SectionRef object pointing to the given Section, which itself represents the idx'th section within the given Sections.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.Sections","page":"Home","title":"ObjectFile.Sections","text":"Sections\n\nAn abstraction over the concept of a collection of Section types within an object file. One can think of the Sections object containing the table of section headers within the object file, whereas the Section/SectionRef objects contain the actual section data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nSections()\n\nIteration\n\ngetindex()\nlastindex()\nlength()\niterate()\nkeys()\neltype()\n\nSearch\n\nfindall()\nfindfirst()\n\nMisc.\n\nhandle()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.Sections-Tuple{SectionRef}","page":"Home","title":"ObjectFile.Sections","text":"Sections(section::SectionRef)\n\nReturn the Sections collection this section belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.Segment","page":"Home","title":"ObjectFile.Segment","text":"Segment\n\nAn abstraction over the concept of a Segment within an object file. A Segment is a portion of an object file that is given instruction on its layout in virtual memory; this is in contrast to a Section, which delineates different portions of an object file on disk. ELF files have the strictest separation here, with a single executable file containing multiple Segment and Section objects, with Sections being assigned to one or more Segments for virtual memory placement. Mach-O files typically have two Segments, one called __TEXT, one called __DATA. COFF files do not have Segment.\n\nJust like with Section objects, many operations upon segments require global operations (access to the string table, knowledge of position within the file, etc...) which causes some operations to be defined only upon the SegmentRef datatype. As a user, the SegmentRef type should be the primary method of interacting with segments, as a developer adding new object file formats, some methods must support Segments, others must support only SegmentRefs. Note that any method that works on a Segment must also work with a SegmentRef, see the @derefmethod macro for a convenient helper macro to generate SegmentRef -> Section wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nread()\n\nUtility:\n\nderef()\n\nFormat-specific properties:\n\nsegment_name()\nsegment_offset()\nsegmentfilesize()\nsegmentmemorysize()\nsegment_address()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SegmentRef","page":"Home","title":"ObjectFile.SegmentRef","text":"SegmentRef\n\nProvides a reference to a Segment, along with a reference to the ObjectHandle this Segment comes from. This should be the primary method by which users interact with segments inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the Segment object API, this is by design as many of the methods are simply passthroughs to the underlying Segment API calls for ease of use.\n\nCreation:\n\nSegmentRef()\n\nUtility\n\nderef()\nSegments()\nhandle()\n\nFormat-specific properties:\n\nsegment_name()\nsegment_number()\nsegment_offset()\nsegmentfilesize()\nsegmentmemorysize()\nsegment_address()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.Segments","page":"Home","title":"ObjectFile.Segments","text":"Segments\n\nAn abstraction over the concept of a collection of Segment types within an object file. One can think of the Segments object containing the table of segment headers within the object file, whereas the Segment/SegmentRef objects contain the actual segment data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nSegments()\n\nIteration\n\ngetindex()\nlastindex()\nlength()\niterate()\nkeys()\neltype()\n\nSearch\n\nfindall()\nfindfirst()\n\nMisc.\n\nhandle()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.Segments-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.Segments","text":"Segments(seg::SegmentRef)\n\nReturn the Segments collection this Segment belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.StrTab","page":"Home","title":"ObjectFile.StrTab","text":"StrTab\n\nThis type encapsulates a string table within an object file, enabling queries against the string table for symbol names, section names, etc... The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nStrTab()\n\nAccessors\n\nhandle()\nstrtab_lookup()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SymbolRef","page":"Home","title":"ObjectFile.SymbolRef","text":"SymbolRef\n\nProvides a reference to a SymtabEntry, along with a reference to the ObjectHandle this SymtabEntry comes from. This should be the primary method by which users interact with symbols inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the SymtabEntry object API, this is by design as many of the methods are simply passthroughs to the underlying SymtabEntry API calls for ease of use.\n\nCreation:\n\nSymbolRef()\n\nUtil:\n\nderef()\nSymbols()\nhandle()\n\nProperties:\n\nsymbol_number()\nsymbol_name()\nsymbol_value()\nisundef()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SymbolRef-Tuple{Symbols,SymtabEntry,Any}","page":"Home","title":"ObjectFile.SymbolRef","text":"SymbolRef(symbols::Symbols, sym::SymtabEntry, idx::UInt32)\n\nConstruct a SymbolRef object pointing to the given SymtabEntry, which itself represents the idx'th symbol within the given Symbols collection.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.Symbols","page":"Home","title":"ObjectFile.Symbols","text":"Symbols\n\nAn abstraction over the concept of a collection of symbol (SymtabEntry) types within an object file. One can think of the Symbols object containing the table of symbols within the object file, whereas the SymtabEntry/SymbolRef objects contain the actual symbol data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nSymbols()\n\nIteration\n\ngetindex()\nlastindex()\nlength()\niterate()\neltype()\n\nMisc.\n\nhandle()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.Symbols-Tuple{SymbolRef}","page":"Home","title":"ObjectFile.Symbols","text":"Symbols(sym::SymbolRef)\n\nReturn the Symbols object that this SymbolRef belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.SymtabEntry","page":"Home","title":"ObjectFile.SymtabEntry","text":"SymtabEntry\n\nAn abstraction over the concept of a symbol within an object file. This type does not use the Symbol name as this would conflict with the builtin Julia Symbol type, so the name SymtabEntry is used instead. As a user, the SymbolRef type should be the primary method of interacting with symbols, as a developer adding new object file formats, some methods must support SymtabEntrys, others must support only SymbolRefs. Note that any method that works on a SymtabEntry must also work with a SymbolRef, see the @derefmethod macro for a convenient helper macro to generate SymbolRef -> SymtabEntry wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nSymtabEntry()\n\nUtil:\n\nderef()\n\nProperties:\n\nsymbol_name()\nsymbol_value()\nisundef()\nisglobal()\nislocal()\nisweak()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.fixed_string","page":"Home","title":"ObjectFile.fixed_string","text":"fixed_string{T}\n\nA fixed-byte string, stored as an integer type (e.g. T = UInt128, or T = UInt64) but displayed and treated as a string.\n\n\n\n\n\n","category":"type"},{"location":"#Base.unsafe_string-Union{Tuple{T}, Tuple{Any,T}} where T<:Integer","page":"Home","title":"Base.unsafe_string","text":"unsafe_string(io, max_len::Integer)\n\nRead in a null-terminated string, stopping with a maximum length of max_len.\n\n\n\n\n\n","category":"method"},{"location":"#Base.unsafe_string-Union{Tuple{fixed_string{T}}, Tuple{T}} where T<:Integer","page":"Home","title":"Base.unsafe_string","text":"unsafe_string(x::fixed_string)\n\nConvert a fixed_string object to a native-Julia String\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.show_collection-Union{Tuple{ST}, Tuple{H}, Tuple{IO,ST,Type{H}}} where ST where H<:ObjectHandle","page":"Home","title":"ObjectFile.show_collection","text":"show_collection(io, collection, ::Type{H<:ObjectHandle})\n\nGiven a collection-like object, (Symbols, DynamicLinks, ``)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.startaddr-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.startaddr","text":"startaddr(oh::ObjectHandle)\n\nReturns the offset within the underlying IOStream at which this ObjectHandle is located.\n\n\n\n\n\n","category":"method"}]
}
From c13335eb354b4399855ea4075282d765b82d373d Mon Sep 17 00:00:00 2001
From: zeptodoctor <44736852+zeptodoctor@users.noreply.github.com>
Date: Wed, 19 May 2021 00:15:16 +0000
Subject: [PATCH 4/5] build based on c1c705c
---
dev/index.html | 6 +++---
dev/search/index.html | 2 +-
dev/search_index.js | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dev/index.html b/dev/index.html
index 0b36f2f..4deeca6 100644
--- a/dev/index.html
+++ b/dev/index.html
@@ -1,11 +1,11 @@
-Home · ObjectFile.jl
Return a mapping from sonames to absolute paths, containing all the sonames declared as beeing needed by the given ObjectHandle. See the documentation for find_library(::RPath, ::String) and RPath for more details.
Return the absolute path to the given soname, using the linker search path that the given ObjectHandle would use at runtime. See the documentation for find_library(::RPath, ::String) for more details.
Return the full path to a library, searching the given RPath, and then the default library search paths. This method takes the given soname and joins it to the end of every path within the given RPath, returning the resultant path if it exists, returning back the original soname if it doesn't.
Given a collection, such as Sections, DynamicLinks, etc... use the given offset, stride, and T parameters to read in and construct a ref_type object located at index idx. Example invocation:
Return a mapping from sonames to absolute paths, containing all the sonames declared as beeing needed by the given ObjectHandle. See the documentation for find_library(::RPath, ::String) and RPath for more details.
Return the absolute path to the given soname, using the linker search path that the given ObjectHandle would use at runtime. See the documentation for find_library(::RPath, ::String) for more details.
Return the full path to a library, searching the given RPath, and then the default library search paths. This method takes the given soname and joins it to the end of every path within the given RPath, returning the resultant path if it exists, returning back the original soname if it doesn't.
Given a collection, such as Sections, DynamicLinks, etc... use the given offset, stride, and T parameters to read in and construct a ref_type object located at index idx. Example invocation:
Return the absolute path to the given ObjectHandle, if it was a file loaded from the local disk. If it was loaded from a general IOStream or in some other way such that the path is unknown or unknowable, return the empty string.
Given a Type, (such as ELFSection64), unpack() it from the given object and return it, throwing errors as appropriate, and skipping over any excess padding bytes as determined by type_func and size_func. Example invocation:
Return the absolute path to the given ObjectHandle, if it was a file loaded from the local disk. If it was loaded from a general IOStream or in some other way such that the path is unknown or unknowable, return the empty string.
Given a Type, (such as ELFSection64), unpack() it from the given object and return it, throwing errors as appropriate, and skipping over any excess padding bytes as determined by type_func and size_func. Example invocation:
Read an Object File out from an IOStream, guessing at the type of object within the stream by calling readmeta(io, T) for each T within ObjTypes, and returning the first that does not throw a MagicMismatch.
Given an ObjectHandle, return the size of a section header (used for reading in the sections header when trying to load a Section object or iterating over a Sections object)
Given an ObjectHandle, return the type of a section header (used for reading in the sections header when trying to load a Section object or iterating over a Sections object). For instance, for a 64-bit ELF file, this would return the type ELFSection64
Return the name of the given section as a string. In order to return a true name, it is necessary to perform a lookup within the object's string table, which cannot be done using just a Section object; use a SectionRef object instead if you need that. For sanity sake, this method will return a string, but the contents of the string may be something like the offset within the string table pointing to this Section's name, e.g. "@strtab.123"
Given an ObjectHandle, return the size of a segment header (used for reading in the segments header when trying to load a Segment object or iterating over a Segments object)
Given an ObjectHandle, return the type of a segment header (used for reading in the segments header when trying to load a Segment object or iterating over a Segments object). For instance, for a 64-bit ELF file, this would return the type ELFSegment64
The name of the given Segment, returned as a string. This method often performs some kind of lookup within the string table of the object to get the full name of the segment.
Return the name of the given symbol as a string. This method often performs some kind of lookup within the string table of the object to get the full name of the symbol.
Return the name of the given section as a string. In order to return a true name, it is necessary to perform a lookup within the object's string table, which cannot be done using just a SymtabEntry object; use a SymbolRef object instead if you need that. For sanity sake, this method will return a string, but the contents of the string may be something like the offset within the string table pointing to this SymtabEntry's name, e.g. "@strtab.123"
Given an ObjectHandle, return the size of a symbol table entry (used for reading in the symbol table when trying to load a SymtabEntry object or iterating over a Symbols object).
Given an ObjectHandle, return the type of a symbol table entry (used for reading in the symbol table when trying to load a SymtabEntry object or iterating over a Symbols object). For instance, for a 64-bit ELF file, this would return the type ELFSymtabEntry64
This type encapsulates the linkage of one object file to another. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
This type encapsulates the list of dynamic links within an object, holding a collection of DynamicLink objects. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
This is an error type used to denote that readmeta() was called on a file that does not contain the proper magic at the beginning for the type of object file that was attempting to be loaded.
The basic type that provides access to object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note tha "must implement" is a bit of a misnomer, if an Object file does not have need of a certain piece of this API (e.g. COFF files have no concept of Segments), leaving that chunk of the API undefined will simply cause errors if a user attempts to use methods that use that part of the API (in the example above, an error will be thrown if the user calls Segments(oh) where oh <: COFFHandle).
This type encapsulates the search path used by an object file when looking for a shared library. This class enables not only looking at the path, but querying the path for matches for given library names. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
An abstraction over the concept of a Section within an object file. Because many operations upon sections require global operations (access to the string table, knowledge of position within the file, etc...) some operations are defined only upon the SectionRef datatype. As a user, the SectionRef type should be the primary method of interacting with sections, as a developer adding new object file formats, some methods must support Sections, others must support only SectionRefs. Note that any method that works on a Section must also work with a SectionRef, see the @derefmethod macro for a convenient helper macro to generate SectionRef -> Section wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
Provides a reference to a Section, along with a reference to the ObjectHandle this Section comes from. This should be the primary method by which users interact with sections inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the Section object API, this is by design as many of the methods are simply passthroughs to the underlying Section API calls for ease of use.
An abstraction over the concept of a collection of Section types within an object file. One can think of the Sections object containing the table of section headers within the object file, whereas the Section/SectionRef objects contain the actual section data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
An abstraction over the concept of a Segment within an object file. A Segment is a portion of an object file that is given instruction on its layout in virtual memory; this is in contrast to a Section, which delineates different portions of an object file on disk. ELF files have the strictest separation here, with a single executable file containing multiple Segment and Section objects, with Sections being assigned to one or more Segments for virtual memory placement. Mach-O files typically have two Segments, one called __TEXT, one called __DATA. COFF files do not have Segment.
Just like with Section objects, many operations upon segments require global operations (access to the string table, knowledge of position within the file, etc...) which causes some operations to be defined only upon the SegmentRef datatype. As a user, the SegmentRef type should be the primary method of interacting with segments, as a developer adding new object file formats, some methods must support Segments, others must support only SegmentRefs. Note that any method that works on a Segment must also work with a SegmentRef, see the @derefmethod macro for a convenient helper macro to generate SegmentRef -> Section wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
Provides a reference to a Segment, along with a reference to the ObjectHandle this Segment comes from. This should be the primary method by which users interact with segments inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the Segment object API, this is by design as many of the methods are simply passthroughs to the underlying Segment API calls for ease of use.
An abstraction over the concept of a collection of Segment types within an object file. One can think of the Segments object containing the table of segment headers within the object file, whereas the Segment/SegmentRef objects contain the actual segment data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
This type encapsulates a string table within an object file, enabling queries against the string table for symbol names, section names, etc... The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
Provides a reference to a SymtabEntry, along with a reference to the ObjectHandle this SymtabEntry comes from. This should be the primary method by which users interact with symbols inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the SymtabEntry object API, this is by design as many of the methods are simply passthroughs to the underlying SymtabEntry API calls for ease of use.
An abstraction over the concept of a collection of symbol (SymtabEntry) types within an object file. One can think of the Symbols object containing the table of symbols within the object file, whereas the SymtabEntry/SymbolRef objects contain the actual symbol data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
An abstraction over the concept of a symbol within an object file. This type does not use the Symbol name as this would conflict with the builtin Julia Symbol type, so the name SymtabEntry is used instead. As a user, the SymbolRef type should be the primary method of interacting with symbols, as a developer adding new object file formats, some methods must support SymtabEntrys, others must support only SymbolRefs. Note that any method that works on a SymtabEntry must also work with a SymbolRef, see the @derefmethod macro for a convenient helper macro to generate SymbolRef -> SymtabEntry wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
Read an Object File out from an IOStream, guessing at the type of object within the stream by calling readmeta(io, T) for each T within ObjTypes, and returning the first that does not throw a MagicMismatch.
Given an ObjectHandle, return the size of a section header (used for reading in the sections header when trying to load a Section object or iterating over a Sections object)
Given an ObjectHandle, return the type of a section header (used for reading in the sections header when trying to load a Section object or iterating over a Sections object). For instance, for a 64-bit ELF file, this would return the type ELFSection64
Return the name of the given section as a string. In order to return a true name, it is necessary to perform a lookup within the object's string table, which cannot be done using just a Section object; use a SectionRef object instead if you need that. For sanity sake, this method will return a string, but the contents of the string may be something like the offset within the string table pointing to this Section's name, e.g. "@strtab.123"
Given an ObjectHandle, return the size of a segment header (used for reading in the segments header when trying to load a Segment object or iterating over a Segments object)
Given an ObjectHandle, return the type of a segment header (used for reading in the segments header when trying to load a Segment object or iterating over a Segments object). For instance, for a 64-bit ELF file, this would return the type ELFSegment64
The name of the given Segment, returned as a string. This method often performs some kind of lookup within the string table of the object to get the full name of the segment.
Return the name of the given symbol as a string. This method often performs some kind of lookup within the string table of the object to get the full name of the symbol.
Return the name of the given section as a string. In order to return a true name, it is necessary to perform a lookup within the object's string table, which cannot be done using just a SymtabEntry object; use a SymbolRef object instead if you need that. For sanity sake, this method will return a string, but the contents of the string may be something like the offset within the string table pointing to this SymtabEntry's name, e.g. "@strtab.123"
Given an ObjectHandle, return the size of a symbol table entry (used for reading in the symbol table when trying to load a SymtabEntry object or iterating over a Symbols object).
Given an ObjectHandle, return the type of a symbol table entry (used for reading in the symbol table when trying to load a SymtabEntry object or iterating over a Symbols object). For instance, for a 64-bit ELF file, this would return the type ELFSymtabEntry64
This type encapsulates the linkage of one object file to another. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
This type encapsulates the list of dynamic links within an object, holding a collection of DynamicLink objects. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
This is an error type used to denote that readmeta() was called on a file that does not contain the proper magic at the beginning for the type of object file that was attempting to be loaded.
The basic type that provides access to object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note tha "must implement" is a bit of a misnomer, if an Object file does not have need of a certain piece of this API (e.g. COFF files have no concept of Segments), leaving that chunk of the API undefined will simply cause errors if a user attempts to use methods that use that part of the API (in the example above, an error will be thrown if the user calls Segments(oh) where oh <: COFFHandle).
This type encapsulates the search path used by an object file when looking for a shared library. This class enables not only looking at the path, but querying the path for matches for given library names. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
An abstraction over the concept of a Section within an object file. Because many operations upon sections require global operations (access to the string table, knowledge of position within the file, etc...) some operations are defined only upon the SectionRef datatype. As a user, the SectionRef type should be the primary method of interacting with sections, as a developer adding new object file formats, some methods must support Sections, others must support only SectionRefs. Note that any method that works on a Section must also work with a SectionRef, see the @derefmethod macro for a convenient helper macro to generate SectionRef -> Section wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
Provides a reference to a Section, along with a reference to the ObjectHandle this Section comes from. This should be the primary method by which users interact with sections inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the Section object API, this is by design as many of the methods are simply passthroughs to the underlying Section API calls for ease of use.
An abstraction over the concept of a collection of Section types within an object file. One can think of the Sections object containing the table of section headers within the object file, whereas the Section/SectionRef objects contain the actual section data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
An abstraction over the concept of a Segment within an object file. A Segment is a portion of an object file that is given instruction on its layout in virtual memory; this is in contrast to a Section, which delineates different portions of an object file on disk. ELF files have the strictest separation here, with a single executable file containing multiple Segment and Section objects, with Sections being assigned to one or more Segments for virtual memory placement. Mach-O files typically have two Segments, one called __TEXT, one called __DATA. COFF files do not have Segment.
Just like with Section objects, many operations upon segments require global operations (access to the string table, knowledge of position within the file, etc...) which causes some operations to be defined only upon the SegmentRef datatype. As a user, the SegmentRef type should be the primary method of interacting with segments, as a developer adding new object file formats, some methods must support Segments, others must support only SegmentRefs. Note that any method that works on a Segment must also work with a SegmentRef, see the @derefmethod macro for a convenient helper macro to generate SegmentRef -> Section wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
Provides a reference to a Segment, along with a reference to the ObjectHandle this Segment comes from. This should be the primary method by which users interact with segments inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the Segment object API, this is by design as many of the methods are simply passthroughs to the underlying Segment API calls for ease of use.
An abstraction over the concept of a collection of Segment types within an object file. One can think of the Segments object containing the table of segment headers within the object file, whereas the Segment/SegmentRef objects contain the actual segment data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
This type encapsulates a string table within an object file, enabling queries against the string table for symbol names, section names, etc... The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
Provides a reference to a SymtabEntry, along with a reference to the ObjectHandle this SymtabEntry comes from. This should be the primary method by which users interact with symbols inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the SymtabEntry object API, this is by design as many of the methods are simply passthroughs to the underlying SymtabEntry API calls for ease of use.
An abstraction over the concept of a collection of symbol (SymtabEntry) types within an object file. One can think of the Symbols object containing the table of symbols within the object file, whereas the SymtabEntry/SymbolRef objects contain the actual symbol data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
An abstraction over the concept of a symbol within an object file. This type does not use the Symbol name as this would conflict with the builtin Julia Symbol type, so the name SymtabEntry is used instead. As a user, the SymbolRef type should be the primary method of interacting with symbols, as a developer adding new object file formats, some methods must support SymtabEntrys, others must support only SymbolRefs. Note that any method that works on a SymtabEntry must also work with a SymbolRef, see the @derefmethod macro for a convenient helper macro to generate SymbolRef -> SymtabEntry wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
This document was generated with Documenter.jl on Wednesday 16 December 2020. Using Julia version 1.5.3.
+Search · ObjectFile.jl
Loading search...
Settings
This document was generated with Documenter.jl on Wednesday 19 May 2021. Using Julia version 1.6.1.
diff --git a/dev/search_index.js b/dev/search_index.js
index 8ec69b4..a6b2686 100644
--- a/dev/search_index.js
+++ b/dev/search_index.js
@@ -1,3 +1,3 @@
var documenterSearchIndex = {"docs":
-[{"location":"#ObjectFile.jl-Documentation-1","page":"Home","title":"ObjectFile.jl Documentation","text":"","category":"section"},{"location":"#Index-1","page":"Home","title":"Index","text":"","category":"section"},{"location":"#","page":"Home","title":"Home","text":"","category":"page"},{"location":"#","page":"Home","title":"Home","text":"Modules = [ObjectFile]\nOrder = [:function, :type]","category":"page"},{"location":"#Base.eof-Tuple{SectionRef}","page":"Home","title":"Base.eof","text":"eof(section::SectionRef)\n\nReturns true if the ObjectHandle that this SectionRef refers to has read beyond the current section's extent\n\n\n\n\n\n","category":"method"},{"location":"#Base.findall-Tuple{Sections,AbstractString}","page":"Home","title":"Base.findall","text":"findall(sections::Sections, name::String)\n\nReturn a list of sections that match the given name.\n\n\n\n\n\n","category":"method"},{"location":"#Base.findall-Union{Tuple{S}, Tuple{Sections,Array{S,1}}} where S<:AbstractString","page":"Home","title":"Base.findall","text":"findall(sections::Sections, name::String)\n\nReturn a list of sections that match one of the given names.\n\n\n\n\n\n","category":"method"},{"location":"#Base.findfirst-Tuple{Sections,AbstractString}","page":"Home","title":"Base.findfirst","text":"findfirst(sections::Sections, name::String)\n\nReturn the first section that matches the given name.\n\n\n\n\n\n","category":"method"},{"location":"#Base.findfirst-Tuple{Sections,Array{String,1}}","page":"Home","title":"Base.findfirst","text":"findfirst(sections::Sections, names::Vector{String})\n\nReturn the first section that matches on of the given names.\n\n\n\n\n\n","category":"method"},{"location":"#Base.read-Tuple{SectionRef}","page":"Home","title":"Base.read","text":"read(section::SectionRef)\n\nRead the contents of the section referred to by section, returning a Vector{UInt8}.\n\n\n\n\n\n","category":"method"},{"location":"#Base.read-Union{Tuple{H}, Tuple{H,Section{H}}} where H<:ObjectHandle","page":"Home","title":"Base.read","text":"read(oh::ObjectHandle, section::Section)\n\nRead the contents of the section referred to by section from the given ObjectHandle, returning a Vector{UInt8}.\n\n\n\n\n\n","category":"method"},{"location":"#Base.seek-Tuple{SectionRef,Any}","page":"Home","title":"Base.seek","text":"seek(section::SectionRef, offset)\n\nSeek to offset relative to section in the ObjectHandle that this SectionRef refers to\n\n\n\n\n\n","category":"method"},{"location":"#Base.seekstart-Tuple{SectionRef}","page":"Home","title":"Base.seekstart","text":"seekstart(section::SectionRef)\n\nSeek to the beginning of section in the ObjectHandle it was loaded from.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.canonical_rpaths-Tuple{RPath}","page":"Home","title":"ObjectFile.canonical_rpaths","text":"canonical_rpaths(rpath::RPath)\n\nReturn a canonicalized list of paths that will be searched.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.deref-Tuple{SectionRef}","page":"Home","title":"ObjectFile.deref","text":"deref(section::SectionRef)\n\nDereference the given SectionRef object to a Section.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.deref-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.deref","text":"deref(seg::SegmentRef)\n\nDereference the given SegmentRef object to a Segment.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.endianness-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.endianness","text":"endianness(oh::ObjectHandle)\n\nReturns the endianness of the given ObjectHandle (e.g. :LittleEndian)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.find_libraries-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.find_libraries","text":"find_libraries(oh::ObjectHandle)\n\nReturn a mapping from sonames to absolute paths, containing all the sonames declared as beeing needed by the given ObjectHandle. See the documentation for find_library(::RPath, ::String) and RPath for more details.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.find_library-Tuple{ObjectHandle,AbstractString}","page":"Home","title":"ObjectFile.find_library","text":"find_library(oh::ObjectHandle, soname::String)\n\nReturn the absolute path to the given soname, using the linker search path that the given ObjectHandle would use at runtime. See the documentation for find_library(::RPath, ::String) for more details.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.find_library-Tuple{RPath,AbstractString}","page":"Home","title":"ObjectFile.find_library","text":"find_library(rpath::RPath, soname::String)\n\nReturn the full path to a library, searching the given RPath, and then the default library search paths. This method takes the given soname and joins it to the end of every path within the given RPath, returning the resultant path if it exists, returning back the original soname if it doesn't.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.format_string-Tuple{Type}","page":"Home","title":"ObjectFile.format_string","text":"format_string(::Type{H}) where {H <: ObjectHandle}\n\nReturn the string name of the given ObjectHandle, examples are \"ELF\", \"MachO\", \"COFF\", etc...\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.getindex_ref-NTuple{6,Any}","page":"Home","title":"ObjectFile.getindex_ref","text":"getindex_ref(collection, offset, stride, T, ref_type, idx)\n\nGiven a collection, such as Sections, DynamicLinks, etc... use the given offset, stride, and T parameters to read in and construct a ref_type object located at index idx. Example invocation:\n\ngetindex_ref(\n sections,\n section_header_offset(oh),\n section_header_size(oh),\n section_header_type(oh),\n SectionRef,\n idx\n)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{RPath}","page":"Home","title":"ObjectFile.handle","text":"handle(rpath::RPath)\n\nReturn the handle that this RPath object refers to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{SectionRef}","page":"Home","title":"ObjectFile.handle","text":"handle(section::SectionRef)\n\nReturn the ObjectHandle this SectionRef belongs to. This method is SectionRef-only.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{Sections}","page":"Home","title":"ObjectFile.handle","text":"handle(sections::Sections)\n\nReturn the ObjectHandle that this Sections object belongs to\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.handle","text":"handle(seg::SegmentRef)\n\nReturn the ObjectHandle this SegmentRef belongs to. This method is SegmentRef-only.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{StrTab}","page":"Home","title":"ObjectFile.handle","text":"handle(s::StrTab)\n\nReturn the ObjectHandle this StrTab belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{SymbolRef}","page":"Home","title":"ObjectFile.handle","text":"handle(sym::SymbolRef)\n\nReturn the ObjectHandle that this SymbolRef belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.header-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.header","text":"header(oh::ObjectHandle)\n\nReturn the ObjectHandle's header object, whatever that may be for this particular object file format.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.iostream-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.iostream","text":"iostream(oh::ObjectHandle)\n\nReturns the IOStream backing the ObjectHandle\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.is64bit-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.is64bit","text":"is64bit(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle represents a 64-bit object\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isdynamic-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.isdynamic","text":"isdynamic(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle makes use of dynamic linking.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isexecutable-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.isexecutable","text":"isexecutable(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle represents an executable object\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isglobal-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.isglobal","text":"isglobal(sym::SymtabEntry)\n\nReturn true if the given symbol is global\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.islibrary-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.islibrary","text":"islibrary(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle represents a shared library\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.islocal-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.islocal","text":"islocal(sym::SymtabEntry)\n\nReturn true if the given symbol is local\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isrelocatable-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.isrelocatable","text":"isrelocatable(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle represents a relocatable object file, e.g. an .o file as generated by gcc -c\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isundef-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.isundef","text":"isundef(sym::SymtabEntry)\n\nReturn true if the given symbol is undefined\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isweak-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.isweak","text":"isweak(sym::SymtabEntry)\n\nReturn true if the given symbol is weak\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.mangle_section_name-Tuple{ObjectHandle,AbstractString}","page":"Home","title":"ObjectFile.mangle_section_name","text":"mangle_section_name(oh::ObjectHandle, name::AbstractString)\n\nTurn a section name into the object-format specific naming convention, e.g. returning \".bss\" for ELF/COFF files, and \"__bss\" for MachO files\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.mangle_symbol_name-Tuple{ObjectHandle,AbstractString}","page":"Home","title":"ObjectFile.mangle_symbol_name","text":"mangle_symbol_name(oh::ObjectHandle, name::AbstractString)\n\nMangle a symbol name using the object-format specific naming convention, e.g. prefixing \"_\" for MachO files.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.path-Tuple{IO}","page":"Home","title":"ObjectFile.path","text":"path(io::IO)\n\nTry to guess the path of an IO object. If it cannot be guessed, returns the empty string.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.path-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.path","text":"path(oh::ObjectHandle)\n\nReturn the absolute path to the given ObjectHandle, if it was a file loaded from the local disk. If it was loaded from a general IOStream or in some other way such that the path is unknown or unknowable, return the empty string.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.read_struct-NTuple{4,Any}","page":"Home","title":"ObjectFile.read_struct","text":"read_struct(oh, type_func, size_func, name)\n\nGiven a Type, (such as ELFSection64), unpack() it from the given object and return it, throwing errors as appropriate, and skipping over any excess padding bytes as determined by type_func and size_func. Example invocation:\n\nreadstruct(oh, symtabentrytype, symtabentry_size, \"Symbol Entry\")\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.readmeta-Tuple{Function,AbstractString}","page":"Home","title":"ObjectFile.readmeta","text":"readmeta(f::Function, file::AbstractString)\n\nDo-block variant of readmeta(). Use via something like:\n\nreadmeta(\"libfoo.so\") do f\n ...\nend\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.readmeta-Tuple{IO}","page":"Home","title":"ObjectFile.readmeta","text":"readmeta(io::IO)\n\nRead an Object File out from an IOStream, guessing at the type of object within the stream by calling readmeta(io, T) for each T within ObjTypes, and returning the first that does not throw a MagicMismatch.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.readmeta-Union{Tuple{T}, Tuple{IO,Type{T}}} where T<:ObjectHandle","page":"Home","title":"ObjectFile.readmeta","text":"readmeta(io::IO, ::ObjectHandle)\n\nRead an Object File out from an IOStream. This is the first method you should call in order to manipulate object files.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.rpaths-Tuple{RPath}","page":"Home","title":"ObjectFile.rpaths","text":"rpaths(rpath::RPath)\n\nReturn the list of paths that will be searched for shared libraries.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_address-Tuple{Section}","page":"Home","title":"ObjectFile.section_address","text":"section_address(section::Section)\n\nThe address of the section in virtual memory.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_header_offset-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.section_header_offset","text":"section_header_offset(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the offset (in bytes) at which the sections start within the containing object file.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_header_size-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.section_header_size","text":"section_header_size(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the size of a section header (used for reading in the sections header when trying to load a Section object or iterating over a Sections object)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_header_type-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.section_header_type","text":"section_header_type(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the type of a section header (used for reading in the sections header when trying to load a Section object or iterating over a Sections object). For instance, for a 64-bit ELF file, this would return the type ELFSection64\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_name-Tuple{Section}","page":"Home","title":"ObjectFile.section_name","text":"section_name(section::Section)\n\nReturn the name of the given section as a string. In order to return a true name, it is necessary to perform a lookup within the object's string table, which cannot be done using just a Section object; use a SectionRef object instead if you need that. For sanity sake, this method will return a string, but the contents of the string may be something like the offset within the string table pointing to this Section's name, e.g. \"@strtab.123\"\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_number-Tuple{SectionRef}","page":"Home","title":"ObjectFile.section_number","text":"section_number(section::SectionRef)\n\nThe index of the given section within the section header table.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_offset-Tuple{Section}","page":"Home","title":"ObjectFile.section_offset","text":"section_offset(section::Section)\n\nThe offset of the section in the file, in bytes\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_size-Tuple{Section}","page":"Home","title":"ObjectFile.section_size","text":"section_size(section::Section)\n\nThe size of the actual data contained in the section. This should exclude any padding mandated by the file format e.g. due to alignment rules\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_header_offset-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.segment_header_offset","text":"segment_header_offset(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the offset (in bytes) at which the segments start within the containing object file.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_header_size-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.segment_header_size","text":"segment_header_size(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the size of a segment header (used for reading in the segments header when trying to load a Segment object or iterating over a Segments object)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_header_type-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.segment_header_type","text":"segment_header_type(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the type of a segment header (used for reading in the segments header when trying to load a Segment object or iterating over a Segments object). For instance, for a 64-bit ELF file, this would return the type ELFSegment64\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_name-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.segment_name","text":"segment_name(seg::SegmentRef)\n\nThe name of the given Segment, returned as a string. This method often performs some kind of lookup within the string table of the object to get the full name of the segment.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_number-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.segment_number","text":"segment_number(seg::SegmentRef)\n\nReturn the index of the referred segment.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.strtab_lookup-Tuple{StrTab,Any}","page":"Home","title":"ObjectFile.strtab_lookup","text":"strtab_lookup(s::StrTab, index)\n\nReads a string from the given StrTab at index.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symbol_name-Tuple{SymbolRef}","page":"Home","title":"ObjectFile.symbol_name","text":"symbol_name(sym::SymbolRef)\n\nReturn the name of the given symbol as a string. This method often performs some kind of lookup within the string table of the object to get the full name of the symbol.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symbol_name-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.symbol_name","text":"symbol_name(sym::SymtabEntry)\n\nReturn the name of the given section as a string. In order to return a true name, it is necessary to perform a lookup within the object's string table, which cannot be done using just a SymtabEntry object; use a SymbolRef object instead if you need that. For sanity sake, this method will return a string, but the contents of the string may be something like the offset within the string table pointing to this SymtabEntry's name, e.g. \"@strtab.123\"\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symbol_number-Tuple{SymbolRef}","page":"Home","title":"ObjectFile.symbol_number","text":"symbol_number(sym::SymbolRef)\n\nReturn the number (index) of the given symbol.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symbol_value-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.symbol_value","text":"symbol_value(sym::SymtabEntry)\n\nReturn the value of the given symbol\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symtab_entry_offset-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.symtab_entry_offset","text":"symtab_entry_offset(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the offset (in bytes) at which the symbol table starts within the containing object file.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symtab_entry_size-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.symtab_entry_size","text":"symtab_entry_size(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the size of a symbol table entry (used for reading in the symbol table when trying to load a SymtabEntry object or iterating over a Symbols object).\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symtab_entry_type-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.symtab_entry_type","text":"symtab_entry_type(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the type of a symbol table entry (used for reading in the symbol table when trying to load a SymtabEntry object or iterating over a Symbols object). For instance, for a 64-bit ELF file, this would return the type ELFSymtabEntry64\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.DynamicLink","page":"Home","title":"ObjectFile.DynamicLink","text":"DynamicLink\n\nThis type encapsulates the linkage of one object file to another. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nDynamicLink()\n\nAccessors:\n\nDynamicLinks()\nhandle()\npath()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.DynamicLinks","page":"Home","title":"ObjectFile.DynamicLinks","text":"DynamicLinks\n\nThis type encapsulates the list of dynamic links within an object, holding a collection of DynamicLink objects. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nDynamicLinks()\n\nIteration\n\ngetindex()\nlastindex()\niterate()\nkeys()\neltype()\n\nMisc.\n\nhandle()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.MagicMismatch","page":"Home","title":"ObjectFile.MagicMismatch","text":"MagicMismatch\n\nThis is an error type used to denote that readmeta() was called on a file that does not contain the proper magic at the beginning for the type of object file that was attempting to be loaded.\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.ObjectHandle","page":"Home","title":"ObjectFile.ObjectHandle","text":"ObjectHandle\n\nThe basic type that provides access to object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note tha \"must implement\" is a bit of a misnomer, if an Object file does not have need of a certain piece of this API (e.g. COFF files have no concept of Segments), leaving that chunk of the API undefined will simply cause errors if a user attempts to use methods that use that part of the API (in the example above, an error will be thrown if the user calls Segments(oh) where oh <: COFFHandle).\n\nCreation\n\nreadmeta()\n\nIOStream-like operations:\n\nseek()\nseekstart()\nskip()\nstartaddr()\niostream()\nposition()\nread()\nreaduntil()\neof()\nunpack()\n\nFormat-specific properties\n\nendianness()\nis64bit()\nisrelocatable()\nisexecutable()\nislibrary()\nisdynamic()\nmanglesectionname()\nmanglesymbolname()\nhandle()\nheader()\nformat_string()\n\nSection properties\n\nsectionheaderoffset()\nsectionheadersize()\nsectionheadertype()\n\nSegment properties\n\nsegmentheaderoffset()\nsegmentheadersize()\nsegmentheadertype()\n\nSymbol properties\n\nsymtabentryoffset()\nsymtabentrysize()\nsymtabentrytype()\n\nMisc\n\npath()\nshow()\nfind_library()\nfind_libraries()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.RPath","page":"Home","title":"ObjectFile.RPath","text":"RPath\n\nThis type encapsulates the search path used by an object file when looking for a shared library. This class enables not only looking at the path, but querying the path for matches for given library names. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nRPath()\n\nUtility\n\nhandle()\n\nRPath operations\n\nrpaths()\ncanonical_rpaths()\nfind_library()\nlastindex()\niterate()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.RPath-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.RPath","text":"RPath(oh::ObjectHandle)\n\nConstruct an RPath object from the given ObjectHandle.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.Section","page":"Home","title":"ObjectFile.Section","text":"Section\n\nAn abstraction over the concept of a Section within an object file. Because many operations upon sections require global operations (access to the string table, knowledge of position within the file, etc...) some operations are defined only upon the SectionRef datatype. As a user, the SectionRef type should be the primary method of interacting with sections, as a developer adding new object file formats, some methods must support Sections, others must support only SectionRefs. Note that any method that works on a Section must also work with a SectionRef, see the @derefmethod macro for a convenient helper macro to generate SectionRef -> Section wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nread()\n\nUtility:\n\nderef()\n\nIO-like operations:\n\nread()\n\nFormat-specific properties:\n\nsection_name()\nsection_size()\nsection_offset()\nsection_address()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SectionRef","page":"Home","title":"ObjectFile.SectionRef","text":"SectionRef\n\nProvides a reference to a Section, along with a reference to the ObjectHandle this Section comes from. This should be the primary method by which users interact with sections inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the Section object API, this is by design as many of the methods are simply passthroughs to the underlying Section API calls for ease of use.\n\nCreation:\n\nSectionRef()\n\nUtility\n\nderef()\nhandle()\nSections()\n\nIO-like operations:\n\nread()\nseekstart()\nseek()\neof()\n\nFormat-specific properties:\n\nsection_name()\nsection_number()\nsection_type()\nsection_size()\nsection_offset()\nsection_address()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SectionRef-Tuple{Sections,Section,Any}","page":"Home","title":"ObjectFile.SectionRef","text":"SectionRef(sections::Sections, section::Section, idx)\n\nConstruct a SectionRef object pointing to the given Section, which itself represents the idx'th section within the given Sections.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.Sections","page":"Home","title":"ObjectFile.Sections","text":"Sections\n\nAn abstraction over the concept of a collection of Section types within an object file. One can think of the Sections object containing the table of section headers within the object file, whereas the Section/SectionRef objects contain the actual section data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nSections()\n\nIteration\n\ngetindex()\nlastindex()\nlength()\niterate()\nkeys()\neltype()\n\nSearch\n\nfindall()\nfindfirst()\n\nMisc.\n\nhandle()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.Sections-Tuple{SectionRef}","page":"Home","title":"ObjectFile.Sections","text":"Sections(section::SectionRef)\n\nReturn the Sections collection this section belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.Segment","page":"Home","title":"ObjectFile.Segment","text":"Segment\n\nAn abstraction over the concept of a Segment within an object file. A Segment is a portion of an object file that is given instruction on its layout in virtual memory; this is in contrast to a Section, which delineates different portions of an object file on disk. ELF files have the strictest separation here, with a single executable file containing multiple Segment and Section objects, with Sections being assigned to one or more Segments for virtual memory placement. Mach-O files typically have two Segments, one called __TEXT, one called __DATA. COFF files do not have Segment.\n\nJust like with Section objects, many operations upon segments require global operations (access to the string table, knowledge of position within the file, etc...) which causes some operations to be defined only upon the SegmentRef datatype. As a user, the SegmentRef type should be the primary method of interacting with segments, as a developer adding new object file formats, some methods must support Segments, others must support only SegmentRefs. Note that any method that works on a Segment must also work with a SegmentRef, see the @derefmethod macro for a convenient helper macro to generate SegmentRef -> Section wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nread()\n\nUtility:\n\nderef()\n\nFormat-specific properties:\n\nsegment_name()\nsegment_offset()\nsegmentfilesize()\nsegmentmemorysize()\nsegment_address()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SegmentRef","page":"Home","title":"ObjectFile.SegmentRef","text":"SegmentRef\n\nProvides a reference to a Segment, along with a reference to the ObjectHandle this Segment comes from. This should be the primary method by which users interact with segments inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the Segment object API, this is by design as many of the methods are simply passthroughs to the underlying Segment API calls for ease of use.\n\nCreation:\n\nSegmentRef()\n\nUtility\n\nderef()\nSegments()\nhandle()\n\nFormat-specific properties:\n\nsegment_name()\nsegment_number()\nsegment_offset()\nsegmentfilesize()\nsegmentmemorysize()\nsegment_address()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.Segments","page":"Home","title":"ObjectFile.Segments","text":"Segments\n\nAn abstraction over the concept of a collection of Segment types within an object file. One can think of the Segments object containing the table of segment headers within the object file, whereas the Segment/SegmentRef objects contain the actual segment data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nSegments()\n\nIteration\n\ngetindex()\nlastindex()\nlength()\niterate()\nkeys()\neltype()\n\nSearch\n\nfindall()\nfindfirst()\n\nMisc.\n\nhandle()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.Segments-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.Segments","text":"Segments(seg::SegmentRef)\n\nReturn the Segments collection this Segment belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.StrTab","page":"Home","title":"ObjectFile.StrTab","text":"StrTab\n\nThis type encapsulates a string table within an object file, enabling queries against the string table for symbol names, section names, etc... The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nStrTab()\n\nAccessors\n\nhandle()\nstrtab_lookup()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SymbolRef","page":"Home","title":"ObjectFile.SymbolRef","text":"SymbolRef\n\nProvides a reference to a SymtabEntry, along with a reference to the ObjectHandle this SymtabEntry comes from. This should be the primary method by which users interact with symbols inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the SymtabEntry object API, this is by design as many of the methods are simply passthroughs to the underlying SymtabEntry API calls for ease of use.\n\nCreation:\n\nSymbolRef()\n\nUtil:\n\nderef()\nSymbols()\nhandle()\n\nProperties:\n\nsymbol_number()\nsymbol_name()\nsymbol_value()\nisundef()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SymbolRef-Tuple{Symbols,SymtabEntry,Any}","page":"Home","title":"ObjectFile.SymbolRef","text":"SymbolRef(symbols::Symbols, sym::SymtabEntry, idx::UInt32)\n\nConstruct a SymbolRef object pointing to the given SymtabEntry, which itself represents the idx'th symbol within the given Symbols collection.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.Symbols","page":"Home","title":"ObjectFile.Symbols","text":"Symbols\n\nAn abstraction over the concept of a collection of symbol (SymtabEntry) types within an object file. One can think of the Symbols object containing the table of symbols within the object file, whereas the SymtabEntry/SymbolRef objects contain the actual symbol data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nSymbols()\n\nIteration\n\ngetindex()\nlastindex()\nlength()\niterate()\neltype()\n\nMisc.\n\nhandle()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.Symbols-Tuple{SymbolRef}","page":"Home","title":"ObjectFile.Symbols","text":"Symbols(sym::SymbolRef)\n\nReturn the Symbols object that this SymbolRef belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.SymtabEntry","page":"Home","title":"ObjectFile.SymtabEntry","text":"SymtabEntry\n\nAn abstraction over the concept of a symbol within an object file. This type does not use the Symbol name as this would conflict with the builtin Julia Symbol type, so the name SymtabEntry is used instead. As a user, the SymbolRef type should be the primary method of interacting with symbols, as a developer adding new object file formats, some methods must support SymtabEntrys, others must support only SymbolRefs. Note that any method that works on a SymtabEntry must also work with a SymbolRef, see the @derefmethod macro for a convenient helper macro to generate SymbolRef -> SymtabEntry wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nSymtabEntry()\n\nUtil:\n\nderef()\n\nProperties:\n\nsymbol_name()\nsymbol_value()\nisundef()\nisglobal()\nislocal()\nisweak()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.fixed_string","page":"Home","title":"ObjectFile.fixed_string","text":"fixed_string{T}\n\nA fixed-byte string, stored as an integer type (e.g. T = UInt128, or T = UInt64) but displayed and treated as a string.\n\n\n\n\n\n","category":"type"},{"location":"#Base.unsafe_string-Union{Tuple{T}, Tuple{Any,T}} where T<:Integer","page":"Home","title":"Base.unsafe_string","text":"unsafe_string(io, max_len::Integer)\n\nRead in a null-terminated string, stopping with a maximum length of max_len.\n\n\n\n\n\n","category":"method"},{"location":"#Base.unsafe_string-Union{Tuple{fixed_string{T}}, Tuple{T}} where T<:Integer","page":"Home","title":"Base.unsafe_string","text":"unsafe_string(x::fixed_string)\n\nConvert a fixed_string object to a native-Julia String\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.show_collection-Union{Tuple{ST}, Tuple{H}, Tuple{IO,ST,Type{H}}} where ST where H<:ObjectHandle","page":"Home","title":"ObjectFile.show_collection","text":"show_collection(io, collection, ::Type{H<:ObjectHandle})\n\nGiven a collection-like object, (Symbols, DynamicLinks, ``)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.startaddr-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.startaddr","text":"startaddr(oh::ObjectHandle)\n\nReturns the offset within the underlying IOStream at which this ObjectHandle is located.\n\n\n\n\n\n","category":"method"}]
+[{"location":"#ObjectFile.jl-Documentation-1","page":"Home","title":"ObjectFile.jl Documentation","text":"","category":"section"},{"location":"#Index-1","page":"Home","title":"Index","text":"","category":"section"},{"location":"#","page":"Home","title":"Home","text":"","category":"page"},{"location":"#","page":"Home","title":"Home","text":"Modules = [ObjectFile]\nOrder = [:function, :type]","category":"page"},{"location":"#Base.eof-Tuple{SectionRef}","page":"Home","title":"Base.eof","text":"eof(section::SectionRef)\n\nReturns true if the ObjectHandle that this SectionRef refers to has read beyond the current section's extent\n\n\n\n\n\n","category":"method"},{"location":"#Base.findall-Tuple{Sections, AbstractString}","page":"Home","title":"Base.findall","text":"findall(sections::Sections, name::String)\n\nReturn a list of sections that match the given name.\n\n\n\n\n\n","category":"method"},{"location":"#Base.findall-Union{Tuple{S}, Tuple{Sections, Vector{S}}} where S<:AbstractString","page":"Home","title":"Base.findall","text":"findall(sections::Sections, name::String)\n\nReturn a list of sections that match one of the given names.\n\n\n\n\n\n","category":"method"},{"location":"#Base.findfirst-Tuple{Sections, AbstractString}","page":"Home","title":"Base.findfirst","text":"findfirst(sections::Sections, name::String)\n\nReturn the first section that matches the given name.\n\n\n\n\n\n","category":"method"},{"location":"#Base.findfirst-Tuple{Sections, Vector{String}}","page":"Home","title":"Base.findfirst","text":"findfirst(sections::Sections, names::Vector{String})\n\nReturn the first section that matches on of the given names.\n\n\n\n\n\n","category":"method"},{"location":"#Base.read-Tuple{SectionRef}","page":"Home","title":"Base.read","text":"read(section::SectionRef)\n\nRead the contents of the section referred to by section, returning a Vector{UInt8}.\n\n\n\n\n\n","category":"method"},{"location":"#Base.read-Union{Tuple{H}, Tuple{H, Section{H}}} where H<:ObjectHandle","page":"Home","title":"Base.read","text":"read(oh::ObjectHandle, section::Section)\n\nRead the contents of the section referred to by section from the given ObjectHandle, returning a Vector{UInt8}.\n\n\n\n\n\n","category":"method"},{"location":"#Base.seek-Tuple{SectionRef, Any}","page":"Home","title":"Base.seek","text":"seek(section::SectionRef, offset)\n\nSeek to offset relative to section in the ObjectHandle that this SectionRef refers to\n\n\n\n\n\n","category":"method"},{"location":"#Base.seekstart-Tuple{SectionRef}","page":"Home","title":"Base.seekstart","text":"seekstart(section::SectionRef)\n\nSeek to the beginning of section in the ObjectHandle it was loaded from.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.canonical_rpaths-Tuple{RPath}","page":"Home","title":"ObjectFile.canonical_rpaths","text":"canonical_rpaths(rpath::RPath)\n\nReturn a canonicalized list of paths that will be searched.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.deref-Tuple{SectionRef}","page":"Home","title":"ObjectFile.deref","text":"deref(section::SectionRef)\n\nDereference the given SectionRef object to a Section.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.deref-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.deref","text":"deref(seg::SegmentRef)\n\nDereference the given SegmentRef object to a Segment.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.endianness-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.endianness","text":"endianness(oh::ObjectHandle)\n\nReturns the endianness of the given ObjectHandle (e.g. :LittleEndian)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.find_libraries-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.find_libraries","text":"find_libraries(oh::ObjectHandle)\n\nReturn a mapping from sonames to absolute paths, containing all the sonames declared as beeing needed by the given ObjectHandle. See the documentation for find_library(::RPath, ::String) and RPath for more details.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.find_library-Tuple{ObjectHandle, AbstractString}","page":"Home","title":"ObjectFile.find_library","text":"find_library(oh::ObjectHandle, soname::String)\n\nReturn the absolute path to the given soname, using the linker search path that the given ObjectHandle would use at runtime. See the documentation for find_library(::RPath, ::String) for more details.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.find_library-Tuple{RPath, AbstractString}","page":"Home","title":"ObjectFile.find_library","text":"find_library(rpath::RPath, soname::String)\n\nReturn the full path to a library, searching the given RPath, and then the default library search paths. This method takes the given soname and joins it to the end of every path within the given RPath, returning the resultant path if it exists, returning back the original soname if it doesn't.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.format_string-Tuple{Type}","page":"Home","title":"ObjectFile.format_string","text":"format_string(::Type{H}) where {H <: ObjectHandle}\n\nReturn the string name of the given ObjectHandle, examples are \"ELF\", \"MachO\", \"COFF\", etc...\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.getindex_ref-NTuple{6, Any}","page":"Home","title":"ObjectFile.getindex_ref","text":"getindex_ref(collection, offset, stride, T, ref_type, idx)\n\nGiven a collection, such as Sections, DynamicLinks, etc... use the given offset, stride, and T parameters to read in and construct a ref_type object located at index idx. Example invocation:\n\ngetindex_ref(\n sections,\n section_header_offset(oh),\n section_header_size(oh),\n section_header_type(oh),\n SectionRef,\n idx\n)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{RPath}","page":"Home","title":"ObjectFile.handle","text":"handle(rpath::RPath)\n\nReturn the handle that this RPath object refers to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{SectionRef}","page":"Home","title":"ObjectFile.handle","text":"handle(section::SectionRef)\n\nReturn the ObjectHandle this SectionRef belongs to. This method is SectionRef-only.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{Sections}","page":"Home","title":"ObjectFile.handle","text":"handle(sections::Sections)\n\nReturn the ObjectHandle that this Sections object belongs to\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.handle","text":"handle(seg::SegmentRef)\n\nReturn the ObjectHandle this SegmentRef belongs to. This method is SegmentRef-only.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{StrTab}","page":"Home","title":"ObjectFile.handle","text":"handle(s::StrTab)\n\nReturn the ObjectHandle this StrTab belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{SymbolRef}","page":"Home","title":"ObjectFile.handle","text":"handle(sym::SymbolRef)\n\nReturn the ObjectHandle that this SymbolRef belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.header-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.header","text":"header(oh::ObjectHandle)\n\nReturn the ObjectHandle's header object, whatever that may be for this particular object file format.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.iostream-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.iostream","text":"iostream(oh::ObjectHandle)\n\nReturns the IOStream backing the ObjectHandle\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.is64bit-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.is64bit","text":"is64bit(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle represents a 64-bit object\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isdynamic-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.isdynamic","text":"isdynamic(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle makes use of dynamic linking.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isexecutable-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.isexecutable","text":"isexecutable(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle represents an executable object\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isglobal-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.isglobal","text":"isglobal(sym::SymtabEntry)\n\nReturn true if the given symbol is global\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.islibrary-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.islibrary","text":"islibrary(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle represents a shared library\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.islocal-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.islocal","text":"islocal(sym::SymtabEntry)\n\nReturn true if the given symbol is local\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isrelocatable-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.isrelocatable","text":"isrelocatable(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle represents a relocatable object file, e.g. an .o file as generated by gcc -c\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isundef-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.isundef","text":"isundef(sym::SymtabEntry)\n\nReturn true if the given symbol is undefined\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isweak-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.isweak","text":"isweak(sym::SymtabEntry)\n\nReturn true if the given symbol is weak\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.mangle_section_name-Tuple{ObjectHandle, AbstractString}","page":"Home","title":"ObjectFile.mangle_section_name","text":"mangle_section_name(oh::ObjectHandle, name::AbstractString)\n\nTurn a section name into the object-format specific naming convention, e.g. returning \".bss\" for ELF/COFF files, and \"__bss\" for MachO files\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.mangle_symbol_name-Tuple{ObjectHandle, AbstractString}","page":"Home","title":"ObjectFile.mangle_symbol_name","text":"mangle_symbol_name(oh::ObjectHandle, name::AbstractString)\n\nMangle a symbol name using the object-format specific naming convention, e.g. prefixing \"_\" for MachO files.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.path-Tuple{IO}","page":"Home","title":"ObjectFile.path","text":"path(io::IO)\n\nTry to guess the path of an IO object. If it cannot be guessed, returns the empty string.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.path-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.path","text":"path(oh::ObjectHandle)\n\nReturn the absolute path to the given ObjectHandle, if it was a file loaded from the local disk. If it was loaded from a general IOStream or in some other way such that the path is unknown or unknowable, return the empty string.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.read_struct-NTuple{4, Any}","page":"Home","title":"ObjectFile.read_struct","text":"read_struct(oh, type_func, size_func, name)\n\nGiven a Type, (such as ELFSection64), unpack() it from the given object and return it, throwing errors as appropriate, and skipping over any excess padding bytes as determined by type_func and size_func. Example invocation:\n\nreadstruct(oh, symtabentrytype, symtabentry_size, \"Symbol Entry\")\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.readmeta-Tuple{Function, AbstractString}","page":"Home","title":"ObjectFile.readmeta","text":"readmeta(f::Function, file::AbstractString)\n\nDo-block variant of readmeta(). Use via something like:\n\nreadmeta(\"libfoo.so\") do f\n ...\nend\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.readmeta-Tuple{IO}","page":"Home","title":"ObjectFile.readmeta","text":"readmeta(io::IO)\n\nRead an Object File out from an IOStream, guessing at the type of object within the stream by calling readmeta(io, T) for each T within ObjTypes, and returning the first that does not throw a MagicMismatch.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.readmeta-Union{Tuple{T}, Tuple{IO, Type{T}}} where T<:ObjectHandle","page":"Home","title":"ObjectFile.readmeta","text":"readmeta(io::IO, ::ObjectHandle)\n\nRead an Object File out from an IOStream. This is the first method you should call in order to manipulate object files.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.rpaths-Tuple{RPath}","page":"Home","title":"ObjectFile.rpaths","text":"rpaths(rpath::RPath)\n\nReturn the list of paths that will be searched for shared libraries.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_address-Tuple{Section}","page":"Home","title":"ObjectFile.section_address","text":"section_address(section::Section)\n\nThe address of the section in virtual memory.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_header_offset-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.section_header_offset","text":"section_header_offset(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the offset (in bytes) at which the sections start within the containing object file.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_header_size-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.section_header_size","text":"section_header_size(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the size of a section header (used for reading in the sections header when trying to load a Section object or iterating over a Sections object)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_header_type-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.section_header_type","text":"section_header_type(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the type of a section header (used for reading in the sections header when trying to load a Section object or iterating over a Sections object). For instance, for a 64-bit ELF file, this would return the type ELFSection64\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_name-Tuple{Section}","page":"Home","title":"ObjectFile.section_name","text":"section_name(section::Section)\n\nReturn the name of the given section as a string. In order to return a true name, it is necessary to perform a lookup within the object's string table, which cannot be done using just a Section object; use a SectionRef object instead if you need that. For sanity sake, this method will return a string, but the contents of the string may be something like the offset within the string table pointing to this Section's name, e.g. \"@strtab.123\"\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_number-Tuple{SectionRef}","page":"Home","title":"ObjectFile.section_number","text":"section_number(section::SectionRef)\n\nThe index of the given section within the section header table.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_offset-Tuple{Section}","page":"Home","title":"ObjectFile.section_offset","text":"section_offset(section::Section)\n\nThe offset of the section in the file, in bytes\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_size-Tuple{Section}","page":"Home","title":"ObjectFile.section_size","text":"section_size(section::Section)\n\nThe size of the actual data contained in the section. This should exclude any padding mandated by the file format e.g. due to alignment rules\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_header_offset-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.segment_header_offset","text":"segment_header_offset(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the offset (in bytes) at which the segments start within the containing object file.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_header_size-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.segment_header_size","text":"segment_header_size(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the size of a segment header (used for reading in the segments header when trying to load a Segment object or iterating over a Segments object)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_header_type-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.segment_header_type","text":"segment_header_type(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the type of a segment header (used for reading in the segments header when trying to load a Segment object or iterating over a Segments object). For instance, for a 64-bit ELF file, this would return the type ELFSegment64\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_name-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.segment_name","text":"segment_name(seg::SegmentRef)\n\nThe name of the given Segment, returned as a string. This method often performs some kind of lookup within the string table of the object to get the full name of the segment.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_number-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.segment_number","text":"segment_number(seg::SegmentRef)\n\nReturn the index of the referred segment.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.strtab_lookup-Tuple{StrTab, Any}","page":"Home","title":"ObjectFile.strtab_lookup","text":"strtab_lookup(s::StrTab, index)\n\nReads a string from the given StrTab at index.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symbol_name-Tuple{SymbolRef}","page":"Home","title":"ObjectFile.symbol_name","text":"symbol_name(sym::SymbolRef)\n\nReturn the name of the given symbol as a string. This method often performs some kind of lookup within the string table of the object to get the full name of the symbol.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symbol_name-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.symbol_name","text":"symbol_name(sym::SymtabEntry)\n\nReturn the name of the given section as a string. In order to return a true name, it is necessary to perform a lookup within the object's string table, which cannot be done using just a SymtabEntry object; use a SymbolRef object instead if you need that. For sanity sake, this method will return a string, but the contents of the string may be something like the offset within the string table pointing to this SymtabEntry's name, e.g. \"@strtab.123\"\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symbol_number-Tuple{SymbolRef}","page":"Home","title":"ObjectFile.symbol_number","text":"symbol_number(sym::SymbolRef)\n\nReturn the number (index) of the given symbol.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symbol_value-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.symbol_value","text":"symbol_value(sym::SymtabEntry)\n\nReturn the value of the given symbol\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symtab_entry_offset-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.symtab_entry_offset","text":"symtab_entry_offset(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the offset (in bytes) at which the symbol table starts within the containing object file.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symtab_entry_size-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.symtab_entry_size","text":"symtab_entry_size(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the size of a symbol table entry (used for reading in the symbol table when trying to load a SymtabEntry object or iterating over a Symbols object).\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symtab_entry_type-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.symtab_entry_type","text":"symtab_entry_type(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the type of a symbol table entry (used for reading in the symbol table when trying to load a SymtabEntry object or iterating over a Symbols object). For instance, for a 64-bit ELF file, this would return the type ELFSymtabEntry64\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.DynamicLink","page":"Home","title":"ObjectFile.DynamicLink","text":"DynamicLink\n\nThis type encapsulates the linkage of one object file to another. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nDynamicLink()\n\nAccessors:\n\nDynamicLinks()\nhandle()\npath()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.DynamicLinks","page":"Home","title":"ObjectFile.DynamicLinks","text":"DynamicLinks\n\nThis type encapsulates the list of dynamic links within an object, holding a collection of DynamicLink objects. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nDynamicLinks()\n\nIteration\n\ngetindex()\nlastindex()\niterate()\nkeys()\neltype()\n\nMisc.\n\nhandle()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.MagicMismatch","page":"Home","title":"ObjectFile.MagicMismatch","text":"MagicMismatch\n\nThis is an error type used to denote that readmeta() was called on a file that does not contain the proper magic at the beginning for the type of object file that was attempting to be loaded.\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.ObjectHandle","page":"Home","title":"ObjectFile.ObjectHandle","text":"ObjectHandle\n\nThe basic type that provides access to object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note tha \"must implement\" is a bit of a misnomer, if an Object file does not have need of a certain piece of this API (e.g. COFF files have no concept of Segments), leaving that chunk of the API undefined will simply cause errors if a user attempts to use methods that use that part of the API (in the example above, an error will be thrown if the user calls Segments(oh) where oh <: COFFHandle).\n\nCreation\n\nreadmeta()\n\nIOStream-like operations:\n\nseek()\nseekstart()\nskip()\nstartaddr()\niostream()\nposition()\nread()\nreaduntil()\neof()\nunpack()\n\nFormat-specific properties\n\nendianness()\nis64bit()\nisrelocatable()\nisexecutable()\nislibrary()\nisdynamic()\nmanglesectionname()\nmanglesymbolname()\nhandle()\nheader()\nformat_string()\n\nSection properties\n\nsectionheaderoffset()\nsectionheadersize()\nsectionheadertype()\n\nSegment properties\n\nsegmentheaderoffset()\nsegmentheadersize()\nsegmentheadertype()\n\nSymbol properties\n\nsymtabentryoffset()\nsymtabentrysize()\nsymtabentrytype()\n\nMisc\n\npath()\nshow()\nfind_library()\nfind_libraries()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.RPath","page":"Home","title":"ObjectFile.RPath","text":"RPath\n\nThis type encapsulates the search path used by an object file when looking for a shared library. This class enables not only looking at the path, but querying the path for matches for given library names. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nRPath()\n\nUtility\n\nhandle()\n\nRPath operations\n\nrpaths()\ncanonical_rpaths()\nfind_library()\nlastindex()\niterate()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.RPath-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.RPath","text":"RPath(oh::ObjectHandle)\n\nConstruct an RPath object from the given ObjectHandle.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.Section","page":"Home","title":"ObjectFile.Section","text":"Section\n\nAn abstraction over the concept of a Section within an object file. Because many operations upon sections require global operations (access to the string table, knowledge of position within the file, etc...) some operations are defined only upon the SectionRef datatype. As a user, the SectionRef type should be the primary method of interacting with sections, as a developer adding new object file formats, some methods must support Sections, others must support only SectionRefs. Note that any method that works on a Section must also work with a SectionRef, see the @derefmethod macro for a convenient helper macro to generate SectionRef -> Section wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nread()\n\nUtility:\n\nderef()\n\nIO-like operations:\n\nread()\n\nFormat-specific properties:\n\nsection_name()\nsection_size()\nsection_offset()\nsection_address()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SectionRef","page":"Home","title":"ObjectFile.SectionRef","text":"SectionRef\n\nProvides a reference to a Section, along with a reference to the ObjectHandle this Section comes from. This should be the primary method by which users interact with sections inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the Section object API, this is by design as many of the methods are simply passthroughs to the underlying Section API calls for ease of use.\n\nCreation:\n\nSectionRef()\n\nUtility\n\nderef()\nhandle()\nSections()\n\nIO-like operations:\n\nread()\nseekstart()\nseek()\neof()\n\nFormat-specific properties:\n\nsection_name()\nsection_number()\nsection_type()\nsection_size()\nsection_offset()\nsection_address()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SectionRef-Tuple{Sections, Section, Any}","page":"Home","title":"ObjectFile.SectionRef","text":"SectionRef(sections::Sections, section::Section, idx)\n\nConstruct a SectionRef object pointing to the given Section, which itself represents the idx'th section within the given Sections.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.Sections","page":"Home","title":"ObjectFile.Sections","text":"Sections\n\nAn abstraction over the concept of a collection of Section types within an object file. One can think of the Sections object containing the table of section headers within the object file, whereas the Section/SectionRef objects contain the actual section data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nSections()\n\nIteration\n\ngetindex()\nlastindex()\nlength()\niterate()\nkeys()\neltype()\n\nSearch\n\nfindall()\nfindfirst()\n\nMisc.\n\nhandle()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.Sections-Tuple{SectionRef}","page":"Home","title":"ObjectFile.Sections","text":"Sections(section::SectionRef)\n\nReturn the Sections collection this section belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.Segment","page":"Home","title":"ObjectFile.Segment","text":"Segment\n\nAn abstraction over the concept of a Segment within an object file. A Segment is a portion of an object file that is given instruction on its layout in virtual memory; this is in contrast to a Section, which delineates different portions of an object file on disk. ELF files have the strictest separation here, with a single executable file containing multiple Segment and Section objects, with Sections being assigned to one or more Segments for virtual memory placement. Mach-O files typically have two Segments, one called __TEXT, one called __DATA. COFF files do not have Segment.\n\nJust like with Section objects, many operations upon segments require global operations (access to the string table, knowledge of position within the file, etc...) which causes some operations to be defined only upon the SegmentRef datatype. As a user, the SegmentRef type should be the primary method of interacting with segments, as a developer adding new object file formats, some methods must support Segments, others must support only SegmentRefs. Note that any method that works on a Segment must also work with a SegmentRef, see the @derefmethod macro for a convenient helper macro to generate SegmentRef -> Section wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nread()\n\nUtility:\n\nderef()\n\nFormat-specific properties:\n\nsegment_name()\nsegment_offset()\nsegmentfilesize()\nsegmentmemorysize()\nsegment_address()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SegmentRef","page":"Home","title":"ObjectFile.SegmentRef","text":"SegmentRef\n\nProvides a reference to a Segment, along with a reference to the ObjectHandle this Segment comes from. This should be the primary method by which users interact with segments inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the Segment object API, this is by design as many of the methods are simply passthroughs to the underlying Segment API calls for ease of use.\n\nCreation:\n\nSegmentRef()\n\nUtility\n\nderef()\nSegments()\nhandle()\n\nFormat-specific properties:\n\nsegment_name()\nsegment_number()\nsegment_offset()\nsegmentfilesize()\nsegmentmemorysize()\nsegment_address()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.Segments","page":"Home","title":"ObjectFile.Segments","text":"Segments\n\nAn abstraction over the concept of a collection of Segment types within an object file. One can think of the Segments object containing the table of segment headers within the object file, whereas the Segment/SegmentRef objects contain the actual segment data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nSegments()\n\nIteration\n\ngetindex()\nlastindex()\nlength()\niterate()\nkeys()\neltype()\n\nSearch\n\nfindall()\nfindfirst()\n\nMisc.\n\nhandle()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.Segments-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.Segments","text":"Segments(seg::SegmentRef)\n\nReturn the Segments collection this Segment belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.StrTab","page":"Home","title":"ObjectFile.StrTab","text":"StrTab\n\nThis type encapsulates a string table within an object file, enabling queries against the string table for symbol names, section names, etc... The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nStrTab()\n\nAccessors\n\nhandle()\nstrtab_lookup()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SymbolRef","page":"Home","title":"ObjectFile.SymbolRef","text":"SymbolRef\n\nProvides a reference to a SymtabEntry, along with a reference to the ObjectHandle this SymtabEntry comes from. This should be the primary method by which users interact with symbols inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the SymtabEntry object API, this is by design as many of the methods are simply passthroughs to the underlying SymtabEntry API calls for ease of use.\n\nCreation:\n\nSymbolRef()\n\nUtil:\n\nderef()\nSymbols()\nhandle()\n\nProperties:\n\nsymbol_number()\nsymbol_name()\nsymbol_value()\nisundef()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SymbolRef-Tuple{Symbols, SymtabEntry, Any}","page":"Home","title":"ObjectFile.SymbolRef","text":"SymbolRef(symbols::Symbols, sym::SymtabEntry, idx::UInt32)\n\nConstruct a SymbolRef object pointing to the given SymtabEntry, which itself represents the idx'th symbol within the given Symbols collection.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.Symbols","page":"Home","title":"ObjectFile.Symbols","text":"Symbols\n\nAn abstraction over the concept of a collection of symbol (SymtabEntry) types within an object file. One can think of the Symbols object containing the table of symbols within the object file, whereas the SymtabEntry/SymbolRef objects contain the actual symbol data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nSymbols()\n\nIteration\n\ngetindex()\nlastindex()\nlength()\niterate()\neltype()\n\nMisc.\n\nhandle()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.Symbols-Tuple{SymbolRef}","page":"Home","title":"ObjectFile.Symbols","text":"Symbols(sym::SymbolRef)\n\nReturn the Symbols object that this SymbolRef belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.SymtabEntry","page":"Home","title":"ObjectFile.SymtabEntry","text":"SymtabEntry\n\nAn abstraction over the concept of a symbol within an object file. This type does not use the Symbol name as this would conflict with the builtin Julia Symbol type, so the name SymtabEntry is used instead. As a user, the SymbolRef type should be the primary method of interacting with symbols, as a developer adding new object file formats, some methods must support SymtabEntrys, others must support only SymbolRefs. Note that any method that works on a SymtabEntry must also work with a SymbolRef, see the @derefmethod macro for a convenient helper macro to generate SymbolRef -> SymtabEntry wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nSymtabEntry()\n\nUtil:\n\nderef()\n\nProperties:\n\nsymbol_name()\nsymbol_value()\nisundef()\nisglobal()\nislocal()\nisweak()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.fixed_string","page":"Home","title":"ObjectFile.fixed_string","text":"fixed_string{T}\n\nA fixed-byte string, stored as an integer type (e.g. T = UInt128, or T = UInt64) but displayed and treated as a string.\n\n\n\n\n\n","category":"type"},{"location":"#Base.unsafe_string-Union{Tuple{T}, Tuple{Any, T}} where T<:Integer","page":"Home","title":"Base.unsafe_string","text":"unsafe_string(io, max_len::Integer)\n\nRead in a null-terminated string, stopping with a maximum length of max_len.\n\n\n\n\n\n","category":"method"},{"location":"#Base.unsafe_string-Union{Tuple{fixed_string{T}}, Tuple{T}} where T<:Integer","page":"Home","title":"Base.unsafe_string","text":"unsafe_string(x::fixed_string)\n\nConvert a fixed_string object to a native-Julia String\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.show_collection-Union{Tuple{ST}, Tuple{H}, Tuple{IO, ST, Type{H}}} where {H<:ObjectHandle, ST}","page":"Home","title":"ObjectFile.show_collection","text":"show_collection(io, collection, ::Type{H<:ObjectHandle})\n\nGiven a collection-like object, (Symbols, DynamicLinks, ``)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.startaddr-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.startaddr","text":"startaddr(oh::ObjectHandle)\n\nReturns the offset within the underlying IOStream at which this ObjectHandle is located.\n\n\n\n\n\n","category":"method"}]
}
From 0c44ac4799bb23b8343eef49402268251eb2c368 Mon Sep 17 00:00:00 2001
From: zeptodoctor <44736852+zeptodoctor@users.noreply.github.com>
Date: Tue, 22 Jun 2021 23:12:28 +0000
Subject: [PATCH 5/5] build based on c1c705c
---
stable | 1 +
v0.3 | 1 +
v0.3.7/assets/documenter.js | 260 +
v0.3.7/assets/search.js | 248 +
v0.3.7/assets/themes/documenter-dark.css | 7623 +++++++++++++++++++++
v0.3.7/assets/themes/documenter-light.css | 7609 ++++++++++++++++++++
v0.3.7/assets/themeswap.js | 42 +
v0.3.7/index.html | 11 +
v0.3.7/search/index.html | 2 +
v0.3.7/search_index.js | 3 +
v0.3.7/siteinfo.js | 1 +
versions.js | 2 +
12 files changed, 15803 insertions(+)
create mode 120000 stable
create mode 120000 v0.3
create mode 100644 v0.3.7/assets/documenter.js
create mode 100644 v0.3.7/assets/search.js
create mode 100644 v0.3.7/assets/themes/documenter-dark.css
create mode 100644 v0.3.7/assets/themes/documenter-light.css
create mode 100644 v0.3.7/assets/themeswap.js
create mode 100644 v0.3.7/index.html
create mode 100644 v0.3.7/search/index.html
create mode 100644 v0.3.7/search_index.js
create mode 100644 v0.3.7/siteinfo.js
diff --git a/stable b/stable
new file mode 120000
index 0000000..f969a39
--- /dev/null
+++ b/stable
@@ -0,0 +1 @@
+v0.3.7
\ No newline at end of file
diff --git a/v0.3 b/v0.3
new file mode 120000
index 0000000..f969a39
--- /dev/null
+++ b/v0.3
@@ -0,0 +1 @@
+v0.3.7
\ No newline at end of file
diff --git a/v0.3.7/assets/documenter.js b/v0.3.7/assets/documenter.js
new file mode 100644
index 0000000..22f0f9a
--- /dev/null
+++ b/v0.3.7/assets/documenter.js
@@ -0,0 +1,260 @@
+// Generated by Documenter.jl
+requirejs.config({
+ paths: {
+ 'highlight-julia': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.10/languages/julia.min',
+ 'headroom': 'https://cdnjs.cloudflare.com/ajax/libs/headroom/0.10.3/headroom.min',
+ 'jqueryui': 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min',
+ 'katex-auto-render': 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/contrib/auto-render.min',
+ 'jquery': 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min',
+ 'headroom-jquery': 'https://cdnjs.cloudflare.com/ajax/libs/headroom/0.10.3/jQuery.headroom.min',
+ 'katex': 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min',
+ 'highlight': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.10/highlight.min',
+ 'highlight-julia-repl': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.10/languages/julia-repl.min',
+ },
+ shim: {
+ "highlight-julia": {
+ "deps": [
+ "highlight"
+ ]
+ },
+ "katex-auto-render": {
+ "deps": [
+ "katex"
+ ]
+ },
+ "headroom-jquery": {
+ "deps": [
+ "jquery",
+ "headroom"
+ ]
+ },
+ "highlight-julia-repl": {
+ "deps": [
+ "highlight"
+ ]
+ }
+}
+});
+////////////////////////////////////////////////////////////////////////////////
+require(['jquery', 'katex', 'katex-auto-render'], function($, katex, renderMathInElement) {
+$(document).ready(function() {
+ renderMathInElement(
+ document.body,
+ {
+ "delimiters": [
+ {
+ "left": "$",
+ "right": "$",
+ "display": false
+ },
+ {
+ "left": "$$",
+ "right": "$$",
+ "display": true
+ },
+ {
+ "left": "\\[",
+ "right": "\\]",
+ "display": true
+ }
+ ]
+}
+
+ );
+})
+
+})
+////////////////////////////////////////////////////////////////////////////////
+require(['jquery', 'highlight', 'highlight-julia', 'highlight-julia-repl'], function($, hljs) {
+$(document).ready(function() {
+ hljs.initHighlighting();
+})
+
+})
+////////////////////////////////////////////////////////////////////////////////
+require(['jquery', 'headroom', 'headroom-jquery'], function($, Headroom) {
+
+// Manages the top navigation bar (hides it when the user starts scrolling down on the
+// mobile).
+window.Headroom = Headroom; // work around buggy module loading?
+$(document).ready(function() {
+ $('#documenter .docs-navbar').headroom({
+ "tolerance": {"up": 10, "down": 10},
+ });
+})
+
+})
+////////////////////////////////////////////////////////////////////////////////
+require(['jquery'], function($) {
+
+// Modal settings dialog
+$(document).ready(function() {
+ var settings = $('#documenter-settings');
+ $('#documenter-settings-button').click(function(){
+ settings.toggleClass('is-active');
+ });
+ // Close the dialog if X is clicked
+ $('#documenter-settings button.delete').click(function(){
+ settings.removeClass('is-active');
+ });
+ // Close dialog if ESC is pressed
+ $(document).keyup(function(e) {
+ if (e.keyCode == 27) settings.removeClass('is-active');
+ });
+});
+
+})
+////////////////////////////////////////////////////////////////////////////////
+require(['jquery'], function($) {
+
+// Manages the showing and hiding of the sidebar.
+$(document).ready(function() {
+ var sidebar = $("#documenter > .docs-sidebar");
+ var sidebar_button = $("#documenter-sidebar-button")
+ sidebar_button.click(function(ev) {
+ ev.preventDefault();
+ sidebar.toggleClass('visible');
+ if (sidebar.hasClass('visible')) {
+ // Makes sure that the current menu item is visible in the sidebar.
+ $("#documenter .docs-menu a.is-active").focus();
+ }
+ });
+ $("#documenter > .docs-main").bind('click', function(ev) {
+ if ($(ev.target).is(sidebar_button)) {
+ return;
+ }
+ if (sidebar.hasClass('visible')) {
+ sidebar.removeClass('visible');
+ }
+ });
+})
+
+// Resizes the package name / sitename in the sidebar if it is too wide.
+// Inspired by: https://github.com/davatron5000/FitText.js
+$(document).ready(function() {
+ e = $("#documenter .docs-autofit");
+ function resize() {
+ var L = parseInt(e.css('max-width'), 10);
+ var L0 = e.width();
+ if(L0 > L) {
+ var h0 = parseInt(e.css('font-size'), 10);
+ e.css('font-size', L * h0 / L0);
+ // TODO: make sure it survives resizes?
+ }
+ }
+ // call once and then register events
+ resize();
+ $(window).resize(resize);
+ $(window).on('orientationchange', resize);
+});
+
+// Scroll the navigation bar to the currently selected menu item
+$(document).ready(function() {
+ var sidebar = $("#documenter .docs-menu").get(0);
+ var active = $("#documenter .docs-menu .is-active").get(0);
+ if(typeof active !== 'undefined') {
+ sidebar.scrollTop = active.offsetTop - sidebar.offsetTop - 15;
+ }
+})
+
+})
+////////////////////////////////////////////////////////////////////////////////
+require(['jquery'], function($) {
+
+function set_theme(theme) {
+ var active = null;
+ var disabled = [];
+ for (var i = 0; i < document.styleSheets.length; i++) {
+ var ss = document.styleSheets[i];
+ var themename = ss.ownerNode.getAttribute("data-theme-name");
+ if(themename === null) continue; // ignore non-theme stylesheets
+ // Find the active theme
+ if(themename === theme) active = ss;
+ else disabled.push(ss);
+ }
+ if(active !== null) {
+ active.disabled = false;
+ if(active.ownerNode.getAttribute("data-theme-primary") === null) {
+ document.getElementsByTagName('html')[0].className = "theme--" + theme;
+ } else {
+ document.getElementsByTagName('html')[0].className = "";
+ }
+ disabled.forEach(function(ss){
+ ss.disabled = true;
+ });
+ }
+
+ // Store the theme in localStorage
+ if(typeof(window.localStorage) !== "undefined") {
+ window.localStorage.setItem("documenter-theme", theme);
+ } else {
+ console.error("Browser does not support window.localStorage");
+ }
+}
+
+// Theme picker setup
+$(document).ready(function() {
+ // onchange callback
+ $('#documenter-themepicker').change(function themepick_callback(ev){
+ var themename = $('#documenter-themepicker option:selected').attr('value');
+ set_theme(themename);
+ });
+
+ // Make sure that the themepicker displays the correct theme when the theme is retrieved
+ // from localStorage
+ if(typeof(window.localStorage) !== "undefined") {
+ var theme = window.localStorage.getItem("documenter-theme");
+ if(theme !== null) {
+ $('#documenter-themepicker option').each(function(i,e) {
+ e.selected = (e.value === theme);
+ })
+ }
+ }
+})
+
+})
+////////////////////////////////////////////////////////////////////////////////
+require(['jquery'], function($) {
+
+// update the version selector with info from the siteinfo.js and ../versions.js files
+$(document).ready(function() {
+ var version_selector = $("#documenter .docs-version-selector");
+ var version_selector_select = $("#documenter .docs-version-selector select");
+
+ version_selector_select.change(function(x) {
+ target_href = version_selector_select.children("option:selected").get(0).value;
+ window.location.href = target_href;
+ });
+
+ // add the current version to the selector based on siteinfo.js, but only if the selector is empty
+ if (typeof DOCUMENTER_CURRENT_VERSION !== 'undefined' && $('#version-selector > option').length == 0) {
+ var option = $("");
+ version_selector_select.append(option);
+ }
+
+ if (typeof DOC_VERSIONS !== 'undefined') {
+ var existing_versions = version_selector_select.children("option");
+ var existing_versions_texts = existing_versions.map(function(i,x){return x.text});
+ DOC_VERSIONS.forEach(function(each) {
+ var version_url = documenterBaseURL + "/../" + each;
+ var existing_id = $.inArray(each, existing_versions_texts);
+ // if not already in the version selector, add it as a new option,
+ // otherwise update the old option with the URL and enable it
+ if (existing_id == -1) {
+ var option = $("");
+ version_selector_select.append(option);
+ } else {
+ var option = existing_versions[existing_id];
+ option.value = version_url;
+ option.disabled = false;
+ }
+ });
+ }
+
+ // only show the version selector if the selector has been populated
+ if (version_selector_select.children("option").length > 0) {
+ version_selector.toggleClass("visible");
+ }
+})
+
+})
diff --git a/v0.3.7/assets/search.js b/v0.3.7/assets/search.js
new file mode 100644
index 0000000..42a273f
--- /dev/null
+++ b/v0.3.7/assets/search.js
@@ -0,0 +1,248 @@
+// Generated by Documenter.jl
+requirejs.config({
+ paths: {
+ 'lunr': 'https://cdnjs.cloudflare.com/ajax/libs/lunr.js/2.3.6/lunr.min',
+ 'lodash': 'https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.min',
+ 'jquery': 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min',
+ }
+});
+////////////////////////////////////////////////////////////////////////////////
+require(['jquery', 'lunr', 'lodash'], function($, lunr, _) {
+
+$(document).ready(function() {
+ // parseUri 1.2.2
+ // (c) Steven Levithan
+ // MIT License
+ function parseUri (str) {
+ var o = parseUri.options,
+ m = o.parser[o.strictMode ? "strict" : "loose"].exec(str),
+ uri = {},
+ i = 14;
+
+ while (i--) uri[o.key[i]] = m[i] || "";
+
+ uri[o.q.name] = {};
+ uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {
+ if ($1) uri[o.q.name][$1] = $2;
+ });
+
+ return uri;
+ };
+ parseUri.options = {
+ strictMode: false,
+ key: ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],
+ q: {
+ name: "queryKey",
+ parser: /(?:^|&)([^&=]*)=?([^&]*)/g
+ },
+ parser: {
+ strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
+ loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
+ }
+ };
+
+ $("#search-form").submit(function(e) {
+ e.preventDefault()
+ })
+
+ // list below is the lunr 2.1.3 list minus the intersect with names(Base)
+ // (all, any, get, in, is, which) and (do, else, for, let, where, while, with)
+ // ideally we'd just filter the original list but it's not available as a variable
+ lunr.stopWordFilter = lunr.generateStopWordFilter([
+ 'a',
+ 'able',
+ 'about',
+ 'across',
+ 'after',
+ 'almost',
+ 'also',
+ 'am',
+ 'among',
+ 'an',
+ 'and',
+ 'are',
+ 'as',
+ 'at',
+ 'be',
+ 'because',
+ 'been',
+ 'but',
+ 'by',
+ 'can',
+ 'cannot',
+ 'could',
+ 'dear',
+ 'did',
+ 'does',
+ 'either',
+ 'ever',
+ 'every',
+ 'from',
+ 'got',
+ 'had',
+ 'has',
+ 'have',
+ 'he',
+ 'her',
+ 'hers',
+ 'him',
+ 'his',
+ 'how',
+ 'however',
+ 'i',
+ 'if',
+ 'into',
+ 'it',
+ 'its',
+ 'just',
+ 'least',
+ 'like',
+ 'likely',
+ 'may',
+ 'me',
+ 'might',
+ 'most',
+ 'must',
+ 'my',
+ 'neither',
+ 'no',
+ 'nor',
+ 'not',
+ 'of',
+ 'off',
+ 'often',
+ 'on',
+ 'only',
+ 'or',
+ 'other',
+ 'our',
+ 'own',
+ 'rather',
+ 'said',
+ 'say',
+ 'says',
+ 'she',
+ 'should',
+ 'since',
+ 'so',
+ 'some',
+ 'than',
+ 'that',
+ 'the',
+ 'their',
+ 'them',
+ 'then',
+ 'there',
+ 'these',
+ 'they',
+ 'this',
+ 'tis',
+ 'to',
+ 'too',
+ 'twas',
+ 'us',
+ 'wants',
+ 'was',
+ 'we',
+ 'were',
+ 'what',
+ 'when',
+ 'who',
+ 'whom',
+ 'why',
+ 'will',
+ 'would',
+ 'yet',
+ 'you',
+ 'your'
+ ])
+
+ // add . as a separator, because otherwise "title": "Documenter.Anchors.add!"
+ // would not find anything if searching for "add!", only for the entire qualification
+ lunr.tokenizer.separator = /[\s\-\.]+/
+
+ // custom trimmer that doesn't strip @ and !, which are used in julia macro and function names
+ lunr.trimmer = function (token) {
+ return token.update(function (s) {
+ return s.replace(/^[^a-zA-Z0-9@!]+/, '').replace(/[^a-zA-Z0-9@!]+$/, '')
+ })
+ }
+
+ lunr.Pipeline.registerFunction(lunr.stopWordFilter, 'juliaStopWordFilter')
+ lunr.Pipeline.registerFunction(lunr.trimmer, 'juliaTrimmer')
+
+ var index = lunr(function () {
+ this.ref('location')
+ this.field('title',{boost: 100})
+ this.field('text')
+ documenterSearchIndex['docs'].forEach(function(e) {
+ this.add(e)
+ }, this)
+ })
+ var store = {}
+
+ documenterSearchIndex['docs'].forEach(function(e) {
+ store[e.location] = {title: e.title, category: e.category}
+ })
+
+ $(function(){
+ searchresults = $('#documenter-search-results');
+ searchinfo = $('#documenter-search-info');
+ searchbox = $('#documenter-search-query');
+ function update_search(querystring) {
+ tokens = lunr.tokenizer(querystring)
+ results = index.query(function (q) {
+ tokens.forEach(function (t) {
+ q.term(t.toString(), {
+ fields: ["title"],
+ boost: 100,
+ usePipeline: false,
+ editDistance: 0,
+ wildcard: lunr.Query.wildcard.NONE
+ })
+ q.term(t.toString(), {
+ fields: ["title"],
+ boost: 10,
+ usePipeline: false,
+ editDistance: 2,
+ wildcard: lunr.Query.wildcard.NONE
+ })
+ q.term(t.toString(), {
+ fields: ["text"],
+ boost: 1,
+ usePipeline: true,
+ editDistance: 0,
+ wildcard: lunr.Query.wildcard.NONE
+ })
+ })
+ })
+ searchinfo.text("Number of results: " + results.length)
+ searchresults.empty()
+ results.forEach(function(result) {
+ data = store[result.ref]
+ link = $(''+data.title+'')
+ link.attr('href', documenterBaseURL+'/'+result.ref)
+ cat = $('('+data.category+')')
+ li = $('
Return a mapping from sonames to absolute paths, containing all the sonames declared as beeing needed by the given ObjectHandle. See the documentation for find_library(::RPath, ::String) and RPath for more details.
Return the absolute path to the given soname, using the linker search path that the given ObjectHandle would use at runtime. See the documentation for find_library(::RPath, ::String) for more details.
Return the full path to a library, searching the given RPath, and then the default library search paths. This method takes the given soname and joins it to the end of every path within the given RPath, returning the resultant path if it exists, returning back the original soname if it doesn't.
Given a collection, such as Sections, DynamicLinks, etc... use the given offset, stride, and T parameters to read in and construct a ref_type object located at index idx. Example invocation:
Return the absolute path to the given ObjectHandle, if it was a file loaded from the local disk. If it was loaded from a general IOStream or in some other way such that the path is unknown or unknowable, return the empty string.
Given a Type, (such as ELFSection64), unpack() it from the given object and return it, throwing errors as appropriate, and skipping over any excess padding bytes as determined by type_func and size_func. Example invocation:
Read an Object File out from an IOStream, guessing at the type of object within the stream by calling readmeta(io, T) for each T within ObjTypes, and returning the first that does not throw a MagicMismatch.
Given an ObjectHandle, return the size of a section header (used for reading in the sections header when trying to load a Section object or iterating over a Sections object)
Given an ObjectHandle, return the type of a section header (used for reading in the sections header when trying to load a Section object or iterating over a Sections object). For instance, for a 64-bit ELF file, this would return the type ELFSection64
Return the name of the given section as a string. In order to return a true name, it is necessary to perform a lookup within the object's string table, which cannot be done using just a Section object; use a SectionRef object instead if you need that. For sanity sake, this method will return a string, but the contents of the string may be something like the offset within the string table pointing to this Section's name, e.g. "@strtab.123"
Given an ObjectHandle, return the size of a segment header (used for reading in the segments header when trying to load a Segment object or iterating over a Segments object)
Given an ObjectHandle, return the type of a segment header (used for reading in the segments header when trying to load a Segment object or iterating over a Segments object). For instance, for a 64-bit ELF file, this would return the type ELFSegment64
The name of the given Segment, returned as a string. This method often performs some kind of lookup within the string table of the object to get the full name of the segment.
Return the name of the given symbol as a string. This method often performs some kind of lookup within the string table of the object to get the full name of the symbol.
Return the name of the given section as a string. In order to return a true name, it is necessary to perform a lookup within the object's string table, which cannot be done using just a SymtabEntry object; use a SymbolRef object instead if you need that. For sanity sake, this method will return a string, but the contents of the string may be something like the offset within the string table pointing to this SymtabEntry's name, e.g. "@strtab.123"
Given an ObjectHandle, return the size of a symbol table entry (used for reading in the symbol table when trying to load a SymtabEntry object or iterating over a Symbols object).
Given an ObjectHandle, return the type of a symbol table entry (used for reading in the symbol table when trying to load a SymtabEntry object or iterating over a Symbols object). For instance, for a 64-bit ELF file, this would return the type ELFSymtabEntry64
This type encapsulates the linkage of one object file to another. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
This type encapsulates the list of dynamic links within an object, holding a collection of DynamicLink objects. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
This is an error type used to denote that readmeta() was called on a file that does not contain the proper magic at the beginning for the type of object file that was attempting to be loaded.
The basic type that provides access to object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note tha "must implement" is a bit of a misnomer, if an Object file does not have need of a certain piece of this API (e.g. COFF files have no concept of Segments), leaving that chunk of the API undefined will simply cause errors if a user attempts to use methods that use that part of the API (in the example above, an error will be thrown if the user calls Segments(oh) where oh <: COFFHandle).
This type encapsulates the search path used by an object file when looking for a shared library. This class enables not only looking at the path, but querying the path for matches for given library names. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
An abstraction over the concept of a Section within an object file. Because many operations upon sections require global operations (access to the string table, knowledge of position within the file, etc...) some operations are defined only upon the SectionRef datatype. As a user, the SectionRef type should be the primary method of interacting with sections, as a developer adding new object file formats, some methods must support Sections, others must support only SectionRefs. Note that any method that works on a Section must also work with a SectionRef, see the @derefmethod macro for a convenient helper macro to generate SectionRef -> Section wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
Provides a reference to a Section, along with a reference to the ObjectHandle this Section comes from. This should be the primary method by which users interact with sections inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the Section object API, this is by design as many of the methods are simply passthroughs to the underlying Section API calls for ease of use.
An abstraction over the concept of a collection of Section types within an object file. One can think of the Sections object containing the table of section headers within the object file, whereas the Section/SectionRef objects contain the actual section data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
An abstraction over the concept of a Segment within an object file. A Segment is a portion of an object file that is given instruction on its layout in virtual memory; this is in contrast to a Section, which delineates different portions of an object file on disk. ELF files have the strictest separation here, with a single executable file containing multiple Segment and Section objects, with Sections being assigned to one or more Segments for virtual memory placement. Mach-O files typically have two Segments, one called __TEXT, one called __DATA. COFF files do not have Segment.
Just like with Section objects, many operations upon segments require global operations (access to the string table, knowledge of position within the file, etc...) which causes some operations to be defined only upon the SegmentRef datatype. As a user, the SegmentRef type should be the primary method of interacting with segments, as a developer adding new object file formats, some methods must support Segments, others must support only SegmentRefs. Note that any method that works on a Segment must also work with a SegmentRef, see the @derefmethod macro for a convenient helper macro to generate SegmentRef -> Section wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
Provides a reference to a Segment, along with a reference to the ObjectHandle this Segment comes from. This should be the primary method by which users interact with segments inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the Segment object API, this is by design as many of the methods are simply passthroughs to the underlying Segment API calls for ease of use.
An abstraction over the concept of a collection of Segment types within an object file. One can think of the Segments object containing the table of segment headers within the object file, whereas the Segment/SegmentRef objects contain the actual segment data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
This type encapsulates a string table within an object file, enabling queries against the string table for symbol names, section names, etc... The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
Provides a reference to a SymtabEntry, along with a reference to the ObjectHandle this SymtabEntry comes from. This should be the primary method by which users interact with symbols inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the SymtabEntry object API, this is by design as many of the methods are simply passthroughs to the underlying SymtabEntry API calls for ease of use.
An abstraction over the concept of a collection of symbol (SymtabEntry) types within an object file. One can think of the Symbols object containing the table of symbols within the object file, whereas the SymtabEntry/SymbolRef objects contain the actual symbol data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
An abstraction over the concept of a symbol within an object file. This type does not use the Symbol name as this would conflict with the builtin Julia Symbol type, so the name SymtabEntry is used instead. As a user, the SymbolRef type should be the primary method of interacting with symbols, as a developer adding new object file formats, some methods must support SymtabEntrys, others must support only SymbolRefs. Note that any method that works on a SymtabEntry must also work with a SymbolRef, see the @derefmethod macro for a convenient helper macro to generate SymbolRef -> SymtabEntry wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:
This document was generated with Documenter.jl on Tuesday 22 June 2021. Using Julia version 1.6.1.
diff --git a/v0.3.7/search_index.js b/v0.3.7/search_index.js
new file mode 100644
index 0000000..a6b2686
--- /dev/null
+++ b/v0.3.7/search_index.js
@@ -0,0 +1,3 @@
+var documenterSearchIndex = {"docs":
+[{"location":"#ObjectFile.jl-Documentation-1","page":"Home","title":"ObjectFile.jl Documentation","text":"","category":"section"},{"location":"#Index-1","page":"Home","title":"Index","text":"","category":"section"},{"location":"#","page":"Home","title":"Home","text":"","category":"page"},{"location":"#","page":"Home","title":"Home","text":"Modules = [ObjectFile]\nOrder = [:function, :type]","category":"page"},{"location":"#Base.eof-Tuple{SectionRef}","page":"Home","title":"Base.eof","text":"eof(section::SectionRef)\n\nReturns true if the ObjectHandle that this SectionRef refers to has read beyond the current section's extent\n\n\n\n\n\n","category":"method"},{"location":"#Base.findall-Tuple{Sections, AbstractString}","page":"Home","title":"Base.findall","text":"findall(sections::Sections, name::String)\n\nReturn a list of sections that match the given name.\n\n\n\n\n\n","category":"method"},{"location":"#Base.findall-Union{Tuple{S}, Tuple{Sections, Vector{S}}} where S<:AbstractString","page":"Home","title":"Base.findall","text":"findall(sections::Sections, name::String)\n\nReturn a list of sections that match one of the given names.\n\n\n\n\n\n","category":"method"},{"location":"#Base.findfirst-Tuple{Sections, AbstractString}","page":"Home","title":"Base.findfirst","text":"findfirst(sections::Sections, name::String)\n\nReturn the first section that matches the given name.\n\n\n\n\n\n","category":"method"},{"location":"#Base.findfirst-Tuple{Sections, Vector{String}}","page":"Home","title":"Base.findfirst","text":"findfirst(sections::Sections, names::Vector{String})\n\nReturn the first section that matches on of the given names.\n\n\n\n\n\n","category":"method"},{"location":"#Base.read-Tuple{SectionRef}","page":"Home","title":"Base.read","text":"read(section::SectionRef)\n\nRead the contents of the section referred to by section, returning a Vector{UInt8}.\n\n\n\n\n\n","category":"method"},{"location":"#Base.read-Union{Tuple{H}, Tuple{H, Section{H}}} where H<:ObjectHandle","page":"Home","title":"Base.read","text":"read(oh::ObjectHandle, section::Section)\n\nRead the contents of the section referred to by section from the given ObjectHandle, returning a Vector{UInt8}.\n\n\n\n\n\n","category":"method"},{"location":"#Base.seek-Tuple{SectionRef, Any}","page":"Home","title":"Base.seek","text":"seek(section::SectionRef, offset)\n\nSeek to offset relative to section in the ObjectHandle that this SectionRef refers to\n\n\n\n\n\n","category":"method"},{"location":"#Base.seekstart-Tuple{SectionRef}","page":"Home","title":"Base.seekstart","text":"seekstart(section::SectionRef)\n\nSeek to the beginning of section in the ObjectHandle it was loaded from.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.canonical_rpaths-Tuple{RPath}","page":"Home","title":"ObjectFile.canonical_rpaths","text":"canonical_rpaths(rpath::RPath)\n\nReturn a canonicalized list of paths that will be searched.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.deref-Tuple{SectionRef}","page":"Home","title":"ObjectFile.deref","text":"deref(section::SectionRef)\n\nDereference the given SectionRef object to a Section.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.deref-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.deref","text":"deref(seg::SegmentRef)\n\nDereference the given SegmentRef object to a Segment.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.endianness-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.endianness","text":"endianness(oh::ObjectHandle)\n\nReturns the endianness of the given ObjectHandle (e.g. :LittleEndian)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.find_libraries-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.find_libraries","text":"find_libraries(oh::ObjectHandle)\n\nReturn a mapping from sonames to absolute paths, containing all the sonames declared as beeing needed by the given ObjectHandle. See the documentation for find_library(::RPath, ::String) and RPath for more details.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.find_library-Tuple{ObjectHandle, AbstractString}","page":"Home","title":"ObjectFile.find_library","text":"find_library(oh::ObjectHandle, soname::String)\n\nReturn the absolute path to the given soname, using the linker search path that the given ObjectHandle would use at runtime. See the documentation for find_library(::RPath, ::String) for more details.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.find_library-Tuple{RPath, AbstractString}","page":"Home","title":"ObjectFile.find_library","text":"find_library(rpath::RPath, soname::String)\n\nReturn the full path to a library, searching the given RPath, and then the default library search paths. This method takes the given soname and joins it to the end of every path within the given RPath, returning the resultant path if it exists, returning back the original soname if it doesn't.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.format_string-Tuple{Type}","page":"Home","title":"ObjectFile.format_string","text":"format_string(::Type{H}) where {H <: ObjectHandle}\n\nReturn the string name of the given ObjectHandle, examples are \"ELF\", \"MachO\", \"COFF\", etc...\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.getindex_ref-NTuple{6, Any}","page":"Home","title":"ObjectFile.getindex_ref","text":"getindex_ref(collection, offset, stride, T, ref_type, idx)\n\nGiven a collection, such as Sections, DynamicLinks, etc... use the given offset, stride, and T parameters to read in and construct a ref_type object located at index idx. Example invocation:\n\ngetindex_ref(\n sections,\n section_header_offset(oh),\n section_header_size(oh),\n section_header_type(oh),\n SectionRef,\n idx\n)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{RPath}","page":"Home","title":"ObjectFile.handle","text":"handle(rpath::RPath)\n\nReturn the handle that this RPath object refers to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{SectionRef}","page":"Home","title":"ObjectFile.handle","text":"handle(section::SectionRef)\n\nReturn the ObjectHandle this SectionRef belongs to. This method is SectionRef-only.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{Sections}","page":"Home","title":"ObjectFile.handle","text":"handle(sections::Sections)\n\nReturn the ObjectHandle that this Sections object belongs to\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.handle","text":"handle(seg::SegmentRef)\n\nReturn the ObjectHandle this SegmentRef belongs to. This method is SegmentRef-only.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{StrTab}","page":"Home","title":"ObjectFile.handle","text":"handle(s::StrTab)\n\nReturn the ObjectHandle this StrTab belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.handle-Tuple{SymbolRef}","page":"Home","title":"ObjectFile.handle","text":"handle(sym::SymbolRef)\n\nReturn the ObjectHandle that this SymbolRef belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.header-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.header","text":"header(oh::ObjectHandle)\n\nReturn the ObjectHandle's header object, whatever that may be for this particular object file format.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.iostream-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.iostream","text":"iostream(oh::ObjectHandle)\n\nReturns the IOStream backing the ObjectHandle\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.is64bit-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.is64bit","text":"is64bit(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle represents a 64-bit object\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isdynamic-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.isdynamic","text":"isdynamic(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle makes use of dynamic linking.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isexecutable-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.isexecutable","text":"isexecutable(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle represents an executable object\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isglobal-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.isglobal","text":"isglobal(sym::SymtabEntry)\n\nReturn true if the given symbol is global\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.islibrary-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.islibrary","text":"islibrary(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle represents a shared library\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.islocal-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.islocal","text":"islocal(sym::SymtabEntry)\n\nReturn true if the given symbol is local\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isrelocatable-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.isrelocatable","text":"isrelocatable(oh::ObjectHandle)\n\nReturns true if the given ObjectHandle represents a relocatable object file, e.g. an .o file as generated by gcc -c\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isundef-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.isundef","text":"isundef(sym::SymtabEntry)\n\nReturn true if the given symbol is undefined\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.isweak-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.isweak","text":"isweak(sym::SymtabEntry)\n\nReturn true if the given symbol is weak\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.mangle_section_name-Tuple{ObjectHandle, AbstractString}","page":"Home","title":"ObjectFile.mangle_section_name","text":"mangle_section_name(oh::ObjectHandle, name::AbstractString)\n\nTurn a section name into the object-format specific naming convention, e.g. returning \".bss\" for ELF/COFF files, and \"__bss\" for MachO files\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.mangle_symbol_name-Tuple{ObjectHandle, AbstractString}","page":"Home","title":"ObjectFile.mangle_symbol_name","text":"mangle_symbol_name(oh::ObjectHandle, name::AbstractString)\n\nMangle a symbol name using the object-format specific naming convention, e.g. prefixing \"_\" for MachO files.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.path-Tuple{IO}","page":"Home","title":"ObjectFile.path","text":"path(io::IO)\n\nTry to guess the path of an IO object. If it cannot be guessed, returns the empty string.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.path-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.path","text":"path(oh::ObjectHandle)\n\nReturn the absolute path to the given ObjectHandle, if it was a file loaded from the local disk. If it was loaded from a general IOStream or in some other way such that the path is unknown or unknowable, return the empty string.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.read_struct-NTuple{4, Any}","page":"Home","title":"ObjectFile.read_struct","text":"read_struct(oh, type_func, size_func, name)\n\nGiven a Type, (such as ELFSection64), unpack() it from the given object and return it, throwing errors as appropriate, and skipping over any excess padding bytes as determined by type_func and size_func. Example invocation:\n\nreadstruct(oh, symtabentrytype, symtabentry_size, \"Symbol Entry\")\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.readmeta-Tuple{Function, AbstractString}","page":"Home","title":"ObjectFile.readmeta","text":"readmeta(f::Function, file::AbstractString)\n\nDo-block variant of readmeta(). Use via something like:\n\nreadmeta(\"libfoo.so\") do f\n ...\nend\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.readmeta-Tuple{IO}","page":"Home","title":"ObjectFile.readmeta","text":"readmeta(io::IO)\n\nRead an Object File out from an IOStream, guessing at the type of object within the stream by calling readmeta(io, T) for each T within ObjTypes, and returning the first that does not throw a MagicMismatch.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.readmeta-Union{Tuple{T}, Tuple{IO, Type{T}}} where T<:ObjectHandle","page":"Home","title":"ObjectFile.readmeta","text":"readmeta(io::IO, ::ObjectHandle)\n\nRead an Object File out from an IOStream. This is the first method you should call in order to manipulate object files.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.rpaths-Tuple{RPath}","page":"Home","title":"ObjectFile.rpaths","text":"rpaths(rpath::RPath)\n\nReturn the list of paths that will be searched for shared libraries.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_address-Tuple{Section}","page":"Home","title":"ObjectFile.section_address","text":"section_address(section::Section)\n\nThe address of the section in virtual memory.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_header_offset-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.section_header_offset","text":"section_header_offset(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the offset (in bytes) at which the sections start within the containing object file.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_header_size-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.section_header_size","text":"section_header_size(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the size of a section header (used for reading in the sections header when trying to load a Section object or iterating over a Sections object)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_header_type-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.section_header_type","text":"section_header_type(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the type of a section header (used for reading in the sections header when trying to load a Section object or iterating over a Sections object). For instance, for a 64-bit ELF file, this would return the type ELFSection64\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_name-Tuple{Section}","page":"Home","title":"ObjectFile.section_name","text":"section_name(section::Section)\n\nReturn the name of the given section as a string. In order to return a true name, it is necessary to perform a lookup within the object's string table, which cannot be done using just a Section object; use a SectionRef object instead if you need that. For sanity sake, this method will return a string, but the contents of the string may be something like the offset within the string table pointing to this Section's name, e.g. \"@strtab.123\"\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_number-Tuple{SectionRef}","page":"Home","title":"ObjectFile.section_number","text":"section_number(section::SectionRef)\n\nThe index of the given section within the section header table.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_offset-Tuple{Section}","page":"Home","title":"ObjectFile.section_offset","text":"section_offset(section::Section)\n\nThe offset of the section in the file, in bytes\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.section_size-Tuple{Section}","page":"Home","title":"ObjectFile.section_size","text":"section_size(section::Section)\n\nThe size of the actual data contained in the section. This should exclude any padding mandated by the file format e.g. due to alignment rules\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_header_offset-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.segment_header_offset","text":"segment_header_offset(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the offset (in bytes) at which the segments start within the containing object file.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_header_size-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.segment_header_size","text":"segment_header_size(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the size of a segment header (used for reading in the segments header when trying to load a Segment object or iterating over a Segments object)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_header_type-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.segment_header_type","text":"segment_header_type(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the type of a segment header (used for reading in the segments header when trying to load a Segment object or iterating over a Segments object). For instance, for a 64-bit ELF file, this would return the type ELFSegment64\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_name-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.segment_name","text":"segment_name(seg::SegmentRef)\n\nThe name of the given Segment, returned as a string. This method often performs some kind of lookup within the string table of the object to get the full name of the segment.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.segment_number-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.segment_number","text":"segment_number(seg::SegmentRef)\n\nReturn the index of the referred segment.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.strtab_lookup-Tuple{StrTab, Any}","page":"Home","title":"ObjectFile.strtab_lookup","text":"strtab_lookup(s::StrTab, index)\n\nReads a string from the given StrTab at index.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symbol_name-Tuple{SymbolRef}","page":"Home","title":"ObjectFile.symbol_name","text":"symbol_name(sym::SymbolRef)\n\nReturn the name of the given symbol as a string. This method often performs some kind of lookup within the string table of the object to get the full name of the symbol.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symbol_name-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.symbol_name","text":"symbol_name(sym::SymtabEntry)\n\nReturn the name of the given section as a string. In order to return a true name, it is necessary to perform a lookup within the object's string table, which cannot be done using just a SymtabEntry object; use a SymbolRef object instead if you need that. For sanity sake, this method will return a string, but the contents of the string may be something like the offset within the string table pointing to this SymtabEntry's name, e.g. \"@strtab.123\"\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symbol_number-Tuple{SymbolRef}","page":"Home","title":"ObjectFile.symbol_number","text":"symbol_number(sym::SymbolRef)\n\nReturn the number (index) of the given symbol.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symbol_value-Tuple{SymtabEntry}","page":"Home","title":"ObjectFile.symbol_value","text":"symbol_value(sym::SymtabEntry)\n\nReturn the value of the given symbol\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symtab_entry_offset-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.symtab_entry_offset","text":"symtab_entry_offset(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the offset (in bytes) at which the symbol table starts within the containing object file.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symtab_entry_size-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.symtab_entry_size","text":"symtab_entry_size(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the size of a symbol table entry (used for reading in the symbol table when trying to load a SymtabEntry object or iterating over a Symbols object).\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.symtab_entry_type-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.symtab_entry_type","text":"symtab_entry_type(oh::ObjectHandle)\n\nGiven an ObjectHandle, return the type of a symbol table entry (used for reading in the symbol table when trying to load a SymtabEntry object or iterating over a Symbols object). For instance, for a 64-bit ELF file, this would return the type ELFSymtabEntry64\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.DynamicLink","page":"Home","title":"ObjectFile.DynamicLink","text":"DynamicLink\n\nThis type encapsulates the linkage of one object file to another. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nDynamicLink()\n\nAccessors:\n\nDynamicLinks()\nhandle()\npath()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.DynamicLinks","page":"Home","title":"ObjectFile.DynamicLinks","text":"DynamicLinks\n\nThis type encapsulates the list of dynamic links within an object, holding a collection of DynamicLink objects. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nDynamicLinks()\n\nIteration\n\ngetindex()\nlastindex()\niterate()\nkeys()\neltype()\n\nMisc.\n\nhandle()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.MagicMismatch","page":"Home","title":"ObjectFile.MagicMismatch","text":"MagicMismatch\n\nThis is an error type used to denote that readmeta() was called on a file that does not contain the proper magic at the beginning for the type of object file that was attempting to be loaded.\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.ObjectHandle","page":"Home","title":"ObjectFile.ObjectHandle","text":"ObjectHandle\n\nThe basic type that provides access to object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note tha \"must implement\" is a bit of a misnomer, if an Object file does not have need of a certain piece of this API (e.g. COFF files have no concept of Segments), leaving that chunk of the API undefined will simply cause errors if a user attempts to use methods that use that part of the API (in the example above, an error will be thrown if the user calls Segments(oh) where oh <: COFFHandle).\n\nCreation\n\nreadmeta()\n\nIOStream-like operations:\n\nseek()\nseekstart()\nskip()\nstartaddr()\niostream()\nposition()\nread()\nreaduntil()\neof()\nunpack()\n\nFormat-specific properties\n\nendianness()\nis64bit()\nisrelocatable()\nisexecutable()\nislibrary()\nisdynamic()\nmanglesectionname()\nmanglesymbolname()\nhandle()\nheader()\nformat_string()\n\nSection properties\n\nsectionheaderoffset()\nsectionheadersize()\nsectionheadertype()\n\nSegment properties\n\nsegmentheaderoffset()\nsegmentheadersize()\nsegmentheadertype()\n\nSymbol properties\n\nsymtabentryoffset()\nsymtabentrysize()\nsymtabentrytype()\n\nMisc\n\npath()\nshow()\nfind_library()\nfind_libraries()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.RPath","page":"Home","title":"ObjectFile.RPath","text":"RPath\n\nThis type encapsulates the search path used by an object file when looking for a shared library. This class enables not only looking at the path, but querying the path for matches for given library names. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nRPath()\n\nUtility\n\nhandle()\n\nRPath operations\n\nrpaths()\ncanonical_rpaths()\nfind_library()\nlastindex()\niterate()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.RPath-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.RPath","text":"RPath(oh::ObjectHandle)\n\nConstruct an RPath object from the given ObjectHandle.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.Section","page":"Home","title":"ObjectFile.Section","text":"Section\n\nAn abstraction over the concept of a Section within an object file. Because many operations upon sections require global operations (access to the string table, knowledge of position within the file, etc...) some operations are defined only upon the SectionRef datatype. As a user, the SectionRef type should be the primary method of interacting with sections, as a developer adding new object file formats, some methods must support Sections, others must support only SectionRefs. Note that any method that works on a Section must also work with a SectionRef, see the @derefmethod macro for a convenient helper macro to generate SectionRef -> Section wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nread()\n\nUtility:\n\nderef()\n\nIO-like operations:\n\nread()\n\nFormat-specific properties:\n\nsection_name()\nsection_size()\nsection_offset()\nsection_address()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SectionRef","page":"Home","title":"ObjectFile.SectionRef","text":"SectionRef\n\nProvides a reference to a Section, along with a reference to the ObjectHandle this Section comes from. This should be the primary method by which users interact with sections inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the Section object API, this is by design as many of the methods are simply passthroughs to the underlying Section API calls for ease of use.\n\nCreation:\n\nSectionRef()\n\nUtility\n\nderef()\nhandle()\nSections()\n\nIO-like operations:\n\nread()\nseekstart()\nseek()\neof()\n\nFormat-specific properties:\n\nsection_name()\nsection_number()\nsection_type()\nsection_size()\nsection_offset()\nsection_address()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SectionRef-Tuple{Sections, Section, Any}","page":"Home","title":"ObjectFile.SectionRef","text":"SectionRef(sections::Sections, section::Section, idx)\n\nConstruct a SectionRef object pointing to the given Section, which itself represents the idx'th section within the given Sections.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.Sections","page":"Home","title":"ObjectFile.Sections","text":"Sections\n\nAn abstraction over the concept of a collection of Section types within an object file. One can think of the Sections object containing the table of section headers within the object file, whereas the Section/SectionRef objects contain the actual section data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nSections()\n\nIteration\n\ngetindex()\nlastindex()\nlength()\niterate()\nkeys()\neltype()\n\nSearch\n\nfindall()\nfindfirst()\n\nMisc.\n\nhandle()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.Sections-Tuple{SectionRef}","page":"Home","title":"ObjectFile.Sections","text":"Sections(section::SectionRef)\n\nReturn the Sections collection this section belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.Segment","page":"Home","title":"ObjectFile.Segment","text":"Segment\n\nAn abstraction over the concept of a Segment within an object file. A Segment is a portion of an object file that is given instruction on its layout in virtual memory; this is in contrast to a Section, which delineates different portions of an object file on disk. ELF files have the strictest separation here, with a single executable file containing multiple Segment and Section objects, with Sections being assigned to one or more Segments for virtual memory placement. Mach-O files typically have two Segments, one called __TEXT, one called __DATA. COFF files do not have Segment.\n\nJust like with Section objects, many operations upon segments require global operations (access to the string table, knowledge of position within the file, etc...) which causes some operations to be defined only upon the SegmentRef datatype. As a user, the SegmentRef type should be the primary method of interacting with segments, as a developer adding new object file formats, some methods must support Segments, others must support only SegmentRefs. Note that any method that works on a Segment must also work with a SegmentRef, see the @derefmethod macro for a convenient helper macro to generate SegmentRef -> Section wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nread()\n\nUtility:\n\nderef()\n\nFormat-specific properties:\n\nsegment_name()\nsegment_offset()\nsegmentfilesize()\nsegmentmemorysize()\nsegment_address()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SegmentRef","page":"Home","title":"ObjectFile.SegmentRef","text":"SegmentRef\n\nProvides a reference to a Segment, along with a reference to the ObjectHandle this Segment comes from. This should be the primary method by which users interact with segments inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the Segment object API, this is by design as many of the methods are simply passthroughs to the underlying Segment API calls for ease of use.\n\nCreation:\n\nSegmentRef()\n\nUtility\n\nderef()\nSegments()\nhandle()\n\nFormat-specific properties:\n\nsegment_name()\nsegment_number()\nsegment_offset()\nsegmentfilesize()\nsegmentmemorysize()\nsegment_address()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.Segments","page":"Home","title":"ObjectFile.Segments","text":"Segments\n\nAn abstraction over the concept of a collection of Segment types within an object file. One can think of the Segments object containing the table of segment headers within the object file, whereas the Segment/SegmentRef objects contain the actual segment data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nSegments()\n\nIteration\n\ngetindex()\nlastindex()\nlength()\niterate()\nkeys()\neltype()\n\nSearch\n\nfindall()\nfindfirst()\n\nMisc.\n\nhandle()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.Segments-Tuple{SegmentRef}","page":"Home","title":"ObjectFile.Segments","text":"Segments(seg::SegmentRef)\n\nReturn the Segments collection this Segment belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.StrTab","page":"Home","title":"ObjectFile.StrTab","text":"StrTab\n\nThis type encapsulates a string table within an object file, enabling queries against the string table for symbol names, section names, etc... The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nStrTab()\n\nAccessors\n\nhandle()\nstrtab_lookup()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SymbolRef","page":"Home","title":"ObjectFile.SymbolRef","text":"SymbolRef\n\nProvides a reference to a SymtabEntry, along with a reference to the ObjectHandle this SymtabEntry comes from. This should be the primary method by which users interact with symbols inside object files. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis. Note that this overlaps heavily with the SymtabEntry object API, this is by design as many of the methods are simply passthroughs to the underlying SymtabEntry API calls for ease of use.\n\nCreation:\n\nSymbolRef()\n\nUtil:\n\nderef()\nSymbols()\nhandle()\n\nProperties:\n\nsymbol_number()\nsymbol_name()\nsymbol_value()\nisundef()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.SymbolRef-Tuple{Symbols, SymtabEntry, Any}","page":"Home","title":"ObjectFile.SymbolRef","text":"SymbolRef(symbols::Symbols, sym::SymtabEntry, idx::UInt32)\n\nConstruct a SymbolRef object pointing to the given SymtabEntry, which itself represents the idx'th symbol within the given Symbols collection.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.Symbols","page":"Home","title":"ObjectFile.Symbols","text":"Symbols\n\nAn abstraction over the concept of a collection of symbol (SymtabEntry) types within an object file. One can think of the Symbols object containing the table of symbols within the object file, whereas the SymtabEntry/SymbolRef objects contain the actual symbol data itself. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation\n\nSymbols()\n\nIteration\n\ngetindex()\nlastindex()\nlength()\niterate()\neltype()\n\nMisc.\n\nhandle()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.Symbols-Tuple{SymbolRef}","page":"Home","title":"ObjectFile.Symbols","text":"Symbols(sym::SymbolRef)\n\nReturn the Symbols object that this SymbolRef belongs to.\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.SymtabEntry","page":"Home","title":"ObjectFile.SymtabEntry","text":"SymtabEntry\n\nAn abstraction over the concept of a symbol within an object file. This type does not use the Symbol name as this would conflict with the builtin Julia Symbol type, so the name SymtabEntry is used instead. As a user, the SymbolRef type should be the primary method of interacting with symbols, as a developer adding new object file formats, some methods must support SymtabEntrys, others must support only SymbolRefs. Note that any method that works on a SymtabEntry must also work with a SymbolRef, see the @derefmethod macro for a convenient helper macro to generate SymbolRef -> SymtabEntry wrapper methods. The list of available API operations is given below, with methods that subclasses must implement marked in emphasis:\n\nCreation:\n\nSymtabEntry()\n\nUtil:\n\nderef()\n\nProperties:\n\nsymbol_name()\nsymbol_value()\nisundef()\nisglobal()\nislocal()\nisweak()\n\n\n\n\n\n","category":"type"},{"location":"#ObjectFile.fixed_string","page":"Home","title":"ObjectFile.fixed_string","text":"fixed_string{T}\n\nA fixed-byte string, stored as an integer type (e.g. T = UInt128, or T = UInt64) but displayed and treated as a string.\n\n\n\n\n\n","category":"type"},{"location":"#Base.unsafe_string-Union{Tuple{T}, Tuple{Any, T}} where T<:Integer","page":"Home","title":"Base.unsafe_string","text":"unsafe_string(io, max_len::Integer)\n\nRead in a null-terminated string, stopping with a maximum length of max_len.\n\n\n\n\n\n","category":"method"},{"location":"#Base.unsafe_string-Union{Tuple{fixed_string{T}}, Tuple{T}} where T<:Integer","page":"Home","title":"Base.unsafe_string","text":"unsafe_string(x::fixed_string)\n\nConvert a fixed_string object to a native-Julia String\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.show_collection-Union{Tuple{ST}, Tuple{H}, Tuple{IO, ST, Type{H}}} where {H<:ObjectHandle, ST}","page":"Home","title":"ObjectFile.show_collection","text":"show_collection(io, collection, ::Type{H<:ObjectHandle})\n\nGiven a collection-like object, (Symbols, DynamicLinks, ``)\n\n\n\n\n\n","category":"method"},{"location":"#ObjectFile.startaddr-Tuple{ObjectHandle}","page":"Home","title":"ObjectFile.startaddr","text":"startaddr(oh::ObjectHandle)\n\nReturns the offset within the underlying IOStream at which this ObjectHandle is located.\n\n\n\n\n\n","category":"method"}]
+}
diff --git a/v0.3.7/siteinfo.js b/v0.3.7/siteinfo.js
new file mode 100644
index 0000000..74e3ea5
--- /dev/null
+++ b/v0.3.7/siteinfo.js
@@ -0,0 +1 @@
+var DOCUMENTER_CURRENT_VERSION = "v0.3.7";
diff --git a/versions.js b/versions.js
index 0314857..f90aa9d 100644
--- a/versions.js
+++ b/versions.js
@@ -1,3 +1,5 @@
var DOC_VERSIONS = [
+ "stable",
+ "v0.3",
"dev",
];