- Add Borland and Watcom test files (from object-testfiles)
- Add objdump snapshot outputs for all OMF test files
- Verify LIDATA expansion content and COMDAT sections/symbols in tests
The goal is to reduce the amount of casts required by API users, and
make it easier to correctly handle overflow later (not implemented by
this commit).
usize is still used in many places for counts.
Breaking changes:
- WritableBuffer trait method signatures
- various low level writer APIs
This is the struct writing component of `Writer`, without any state management.
`Encoder` also includes size methods, replacing the need for `Class`.
`build::elf::Builder` already does a lot of its own state management, so
change it to use `Encoder`.
Breaking change: the structs for writing need more information computed
by the caller (string offsets and version string hashes).
Added `Writer` methods to return string offsets.
Change syntax from:
consts et: FileType = NAMES_ET;
to:
consts et = NAMES_ET: FileType;
This better matches the syntax of constant_names! and flag_names!.
Also allow both name and definition to be specified; this is possible
now (but not used yet):
consts et = NAMES_ET: FileType(u16) = {
/// No file type.
ET_NONE = 0,
};
Also allow meta attributes and visibility on statics.
* Fix R_ABS type
* Add macho::CpuType and CpuSubtype
Fixes a subtype check in MachOFile::sub_architecture().
readobj no longer displays subtypes for non-modern architectures.
* Add macho::VmProt
* Add macho::FileType and macho::FileFlags
Also fixes flag printing in readobj example.
* Add macho::LoadCommandType
* Add macho::DyldCacheMappingFlags
* Add macho::SegmentFlags, SectionFlags, and SectionType
* Add macho::DylibUseFlags
* Add macho build version newtypes
* Add macho::SymbolFlags
* Add macho::SymbolDesc
Also avoid returning an error in MachOFile::imports for
DYNAMIC_LOOKUP_ORDINAL and EXECUTABLE_ORDINAL.
* Add macho::DiceKind
* Add macho::ExportSymbolFlags
Includes slightly better validation of the flags value.
* Add macho::IndirectSymbol
The goal of these enums is to provide access to fields
that are not unambiguously provided by the unified API.
Some of these already provided type fields for some formats.
SectionKind is format independent, and the Elf variant never belonged
there. Fixing this now because adding a newtype for sh_type will also
be a breaking change.
This module contains macros to create data structures containing
constant names at the same time as the constants are defined.
The data structures support inheriting sets of constants, which
is useful for processor and OS specific constants.
Use these macros to define elf/macho/pe constants, and replace most
of the architecture-specific constant names in the readobj example.