package object
All checked builds pass sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
A unified interface for reading and writing object file formats
Install
dune-project
Dependency
Authors
Maintainers
Sources
object-0.2.tbz
sha256=9c5c1294abd9075f25639ec2a10f7673b7aa6f5fd8915d24d39e17195a05bd5c
sha512=569061b63b8c537a5fc2bc900b6c9cf2b8e0fd01937980eb5fa94cf48479847b5f732d6f0d125ac1d5bffdaa9555417905ff271bea12d4ce9b24d2e1ef28fcd1
doc/CHANGES.html
Unreleased
- #12: Read symbol names without moving the symbol table cursor
- #15: Bounds-check every
Buffer.Readfunction, raisingInvalid_formatinstead ofInvalid_argument. Also reject negative positions, LEB128 values that don't fit in anint, and readu32beas big-endian - #16: Reject
uleb128values of 2^62 and above, which were returned as negativeints. Add hedgehog property tests for LEB128 decoding - #17: Check table counts against the remaining data before allocating. A corrupt Mach-O, ELF or PE count raises
Invalid_formatinstead of trying to allocate gigabytes.Macho.validate_fatchecks overlaps between neighbouring architectures only, avoiding a quadratic error list - #18: Reject Mach-O load commands whose
cmdsizeis smaller than the command's fixed-size structure, raisingInvalid_formatfromMacho.read - #19: Check section and fat architecture extents against the buffer, raising
Invalid_formatinstead ofInvalid_argument. ELFSHT_NOBITSsections, Mach-O zero-fill sections and Mach-O sections at offset 0 (as in a dSYM) now have no file contents (file_size0, empty body) instead of reading unrelated bytes. AddElf.has_file_dataandMacho.has_file_data - #20: Read ELF files without a section header table or section name string table (
e_shstrndxofSHN_UNDEF), and resolve extended section numbering (SHN_XINDEX). An out-of-rangee_shstrndx, ane_shentsizeother than 64 or a section count past the end of the file raisesInvalid_format - #21: Raise
Invalid_formatinstead ofFailurefor unsupported ELF classes and data encodings and for unrecognised formats inObject_format.detect_format. Reject big-endian ELF explicitly instead of misreading it.Object_format.Invalid_formatis now the same exception asBuffer.Invalid_format.Object_formatdetects bare COFF objects asPE - #22: Fix Mach-O load command offsets. Dylib, dylinker, sub-framework and prebound dylib names lost their first 8 bytes,
LC_RPATHpaths were read from the start of the file, andLC_TWOLEVEL_HINTSread its table from the command instead of the file.LC_PREBOUND_DYLIBreads(n + 7) / 8bytes of module bit vector - #23:
Macho.readandObject_format.readraise anInvalid_formatnaming the functions that select an architecture when given a FAT binary, instead of failing with "magic" - #24: Fix Mach-O bit-field decoding. Relocation symbol numbers, pc-relative, length and extern fields, scattered relocations and two-level hints were misread. Symbol reference flags now decode
REFERENCED_DYNAMICALLY,SYM_WEAK_REFandSYM_WEAK_DEFfrom the right bits, and two-level images give undefined symbols their library ordinal from bits 8-15. 64-bit images never treat a relocation as scattered
0.1
Initial release supporting ELF/MACH-O/PE/COFF object files
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>