Skip to content

Commit

Permalink
Bug 1858739 - update object crate to 0.32.0 r=glandium,mstange,supply…
Browse files Browse the repository at this point in the history
…-chain-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D190833
  • Loading branch information
selenography committed Oct 16, 2023
1 parent 2ac48ba commit 67f01bb
Show file tree
Hide file tree
Showing 69 changed files with 3,805 additions and 1,675 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions supply-chain/imports.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1050,6 +1050,18 @@ criteria = "safe-to-deploy"
delta = "0.8.6 -> 0.8.8"
notes = "Mostly OS portability updates along with some minor bugfixes."

[[audits.bytecode-alliance.audits.object]]
who = "Alex Crichton <[email protected]>"
criteria = "safe-to-deploy"
delta = "0.30.3 -> 0.31.1"
notes = "A large-ish update to the crate but nothing out of the ordering. Support for new formats like xcoff, new constants, minor refactorings, etc. Nothing out of the ordinary."

[[audits.bytecode-alliance.audits.object]]
who = "Alex Crichton <[email protected]>"
criteria = "safe-to-deploy"
delta = "0.31.1 -> 0.32.0"
notes = "Various new features and refactorings as one would expect from an object parsing crate, all looks good."

[[audits.bytecode-alliance.audits.peeking_take_while]]
who = "Nick Fitzgerald <[email protected]>"
criteria = "safe-to-deploy"
Expand Down
2 changes: 1 addition & 1 deletion third_party/rust/object/.cargo-checksum.json

Large diffs are not rendered by default.

168 changes: 167 additions & 1 deletion third_party/rust/object/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,172 @@

--------------------------------------------------------------------------------

## 0.32.0

Released 2023/08/12.

### Breaking changes

* Changed `read::elf::Note::name` to exclude all trailing null bytes.
[#549](https://github.com/gimli-rs/object/pull/549)

* Updated dependencies, and changed some optional dependencies to use the `dep:`
feature syntax.
[#558](https://github.com/gimli-rs/object/pull/558)
[#569](https://github.com/gimli-rs/object/pull/569)

### Changed

* The minimum supported rust version for the `read` feature and its dependencies
has changed to 1.60.0.

* The minimum supported rust version for other features has changed to 1.65.0.

* Changed many definitions from `static` to `const`.
[#549](https://github.com/gimli-rs/object/pull/549)

* Fixed Mach-O section alignment padding in `write::Object`.
[#553](https://github.com/gimli-rs/object/pull/553)

* Changed `read::File` to an enum.
[#564](https://github.com/gimli-rs/object/pull/564)

### Added

* Added `elf::ELF_NOTE_GO`, `elf::NT_GO_BUILD_ID`, and `read::elf::Note::name_bytes`.
[#549](https://github.com/gimli-rs/object/pull/549)

* Added `read::FileKind::CoffImport` and `read::coff::ImportFile`.
[#555](https://github.com/gimli-rs/object/pull/555)
[#556](https://github.com/gimli-rs/object/pull/556)

* Added `Architecture::Csky` and basic ELF support for C-SKY.
[#561](https://github.com/gimli-rs/object/pull/561)

* Added `read::elf::ElfSymbol::raw_symbol`.
[#562](https://github.com/gimli-rs/object/pull/562)

--------------------------------------------------------------------------------

## 0.30.4

Released 2023/06/05.

### Changed

* Fixed Mach-O section alignment padding in `write::Object`.
[#553](https://github.com/gimli-rs/object/pull/553)

--------------------------------------------------------------------------------

## 0.31.1

Released 2023/05/09.

### Changed

* Fixed address for global symbols in `read::wasm`.
[#539](https://github.com/gimli-rs/object/pull/539)

* Fixed writing of alignment for empty ELF sections.
[#540](https://github.com/gimli-rs/object/pull/540)

### Added

* Added more `elf::GNU_PROPERTY_*` definitions.
Added `read::elf::note::gnu_properties`, `write::StandardSection::GnuProperty`,
and `write::Object::add_elf_gnu_property_u32`.
[#537](https://github.com/gimli-rs/object/pull/537)
[#541](https://github.com/gimli-rs/object/pull/541)

* Added Mach-O support for `Architecture::Aarch64_Ilp32`.
[#542](https://github.com/gimli-rs/object/pull/542)
[#545](https://github.com/gimli-rs/object/pull/545)

* Added `Architecture::Wasm64`.
[#543](https://github.com/gimli-rs/object/pull/543)

--------------------------------------------------------------------------------

## 0.31.0

Released 2023/04/14.

### Breaking changes

* Added a type parameter on existing COFF types to support reading COFF `/bigobj` files.
[#502](https://github.com/gimli-rs/object/pull/502)

* Changed PE symbols to support COFF `/bigobj`.
Changed `pe::IMAGE_SYM_*` to `i32`.
Changed `pe::ImageSymbolEx::section_number` to `I32Bytes`.
Deleted a number of methods from `pe::ImageSymbol`.
Use the `read::pe::ImageSymbol` trait instead.
[#502](https://github.com/gimli-rs/object/pull/502)

* Changed `pe::Guid` to a single array, and added methods to read the individual fields.
[#502](https://github.com/gimli-rs/object/pull/502)

* Added `Symbol` type parameter to `SymbolFlags` to support `SymbolFlags::Xcoff`.
[#527](https://github.com/gimli-rs/object/pull/527)

### Changed

* Fix alignment when reserving zero length sections in `write::elf::Write::reserve`.
[#514](https://github.com/gimli-rs/object/pull/514)

* Validate command size in `read::macho::LoadCommandIterator`.
[#516](https://github.com/gimli-rs/object/pull/516)

* Handle invalid alignment in `read::macho::MachoSection::align`.
[#516](https://github.com/gimli-rs/object/pull/516)

* Accept `SymbolKind::Unknown` in `write::Object::macho_write`.
[#519](https://github.com/gimli-rs/object/pull/519)

* Updated `wasmparser` dependency.
[#528](https://github.com/gimli-rs/object/pull/528)

### Added

* Added more `elf::EF_RISCV_*` definitions.
[#507](https://github.com/gimli-rs/object/pull/507)

* Added `read::elf::SectionHeader::gnu_attributes` and associated types.
Added `.gnu.attributes` support to `write::elf::Writer`.
[#509](https://github.com/gimli-rs/object/pull/509)
[#525](https://github.com/gimli-rs/object/pull/525)

* Added `write::Object::set_macho_build_version`.
[#524](https://github.com/gimli-rs/object/pull/524)

* Added `read::FileKind::Xcoff32`, `read::FileKind::Xcoff64`, `read::XcoffFile`,
and associated types.
Added XCOFF support to `write::Object`.
[#469](https://github.com/gimli-rs/object/pull/469)
[#476](https://github.com/gimli-rs/object/pull/476)
[#477](https://github.com/gimli-rs/object/pull/477)
[#482](https://github.com/gimli-rs/object/pull/482)
[#484](https://github.com/gimli-rs/object/pull/484)
[#486](https://github.com/gimli-rs/object/pull/486)
[#527](https://github.com/gimli-rs/object/pull/527)

* Added `read::FileKind::CoffBig`, `read::pe::CoffHeader` and `read::pe::ImageSymbol`.
[#502](https://github.com/gimli-rs/object/pull/502)

* Added `elf::PT_GNU_PROPERTY`.
[#530](https://github.com/gimli-rs/object/pull/530)

* Added `elf::ELFCOMPRESS_ZSTD`, `read::CompressionFormat::Zstandard`,
and Zstandard decompression in `read::CompressedData::decompress` using
the `ruzstd` crate.
[#532](https://github.com/gimli-rs/object/pull/532)

* Added `read::elf::NoteIterator::new`.
[#533](https://github.com/gimli-rs/object/pull/533)

--------------------------------------------------------------------------------

## 0.30.3

Released 2023/01/23.
Expand Down Expand Up @@ -162,7 +328,7 @@ Released 2022/01/19.
### Changed

* For the Mach-O support in `write::Object`, accept `RelocationKind::MachO` for all
architecures, and accept `RelocationKind::Absolute` for ARM64.
architectures, and accept `RelocationKind::Absolute` for ARM64.
[#422](https://github.com/gimli-rs/object/pull/422)

### Added
Expand Down
33 changes: 21 additions & 12 deletions third_party/rust/object/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@

[package]
edition = "2018"
rust-version = "1.60"
name = "object"
version = "0.30.3"
version = "0.32.0"
exclude = [
"/.github",
"/testfiles",
Expand Down Expand Up @@ -57,21 +58,26 @@ version = "1"
optional = true

[dependencies.hashbrown]
version = "0.13.1"
version = "0.14.0"
features = ["ahash"]
optional = true
default-features = false

[dependencies.indexmap]
version = "1.6"
version = "2.0"
optional = true
default-features = false

[dependencies.memchr]
version = "2.4.1"
default-features = false

[dependencies.ruzstd]
version = "0.4.0"
optional = true

[dependencies.wasmparser]
version = "0.57"
version = "0.110.0"
optional = true

[features]
Expand All @@ -86,7 +92,8 @@ archive = []
cargo-all = []
coff = []
compression = [
"flate2",
"dep:flate2",
"dep:ruzstd",
"std",
]
default = [
Expand All @@ -104,6 +111,7 @@ doc = [
"macho",
"pe",
"wasm",
"xcoff",
]
elf = []
macho = []
Expand All @@ -115,6 +123,7 @@ read = [
"elf",
"macho",
"pe",
"xcoff",
"unaligned",
]
read_core = []
Expand All @@ -130,25 +139,25 @@ unstable = []
unstable-all = [
"all",
"unstable",
"xcoff",
]
wasm = ["wasmparser"]
wasm = ["dep:wasmparser"]
write = [
"write_std",
"coff",
"elf",
"macho",
"pe",
"xcoff",
]
write_core = [
"crc32fast",
"indexmap",
"hashbrown",
"dep:crc32fast",
"dep:indexmap",
"dep:hashbrown",
]
write_std = [
"write_core",
"std",
"indexmap/std",
"crc32fast/std",
"indexmap?/std",
"crc32fast?/std",
]
xcoff = []
10 changes: 5 additions & 5 deletions third_party/rust/object/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# `object`

The `object` crate provides a unified interface to working with object files
across platforms. It supports reading object files and executable files,
and writing COFF/ELF/Mach-O object files and ELF/PE executable files.
across platforms. It supports reading relocatable object files and executable files,
and writing COFF/ELF/Mach-O/XCOFF relocatable object files and ELF/PE executable files.

For reading files, it provides multiple levels of support:

Expand All @@ -11,7 +11,7 @@ For reading files, it provides multiple levels of support:
* a higher level unified API for accessing common features of object files, such
as sections and symbols ([example](crates/examples/src/objdump.rs))

Supported file formats: ELF, Mach-O, Windows PE/COFF, Wasm, and Unix archive.
Supported file formats: ELF, Mach-O, Windows PE/COFF, Wasm, XCOFF, and Unix archive.

## Example for unified read API
```rust
Expand Down Expand Up @@ -39,8 +39,8 @@ See [`crates/examples`](crates/examples) for more examples.
Changes to MSRV are considered breaking changes. We are conservative about changing the MSRV,
but sometimes are required to due to dependencies. The MSRV is:

* 1.52.0 for the `read` feature and its dependencies.
* 1.61.0 for the `write` feature and its dependencies.
* 1.60.0 for the `read` feature and its dependencies.
* 1.65.0 for other features.

## License

Expand Down
2 changes: 1 addition & 1 deletion third_party/rust/object/clippy.toml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
msrv = "1.42.0"
msrv = "1.60.0"
Loading

0 comments on commit 67f01bb

Please sign in to comment.