Backed out 5 changesets (bug 1890092, bug 1888683) for causing build bustages & crash...
[gecko.git] / third_party / rust / goblin / CHANGELOG.md
blob393105f351496dc3a7aed6333810a6780facaec9
1 # Changelog
2 All notable changes to this project will be documented in this file.
4 Before 1.0, this project does not adhere to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6 Goblin is now 0.7, which means we will try our best to ease breaking changes. Tracking issue is here: https://github.com/m4b/goblin/issues/97
8 ## [0.7.0] - unreleased
9 ### Breaking
10 mach: Implement `LC_NOTE`, (breakage=load commands are marked non-exhaustive), thanks @messense: https://github.com/m4b/goblin/pull/342
11 ### Fixed
12 elf: fix is_lib detection, thanks @m-hilgendorf: https://github.com/m4b/goblin/pull/366
13 pe: fix out of bounds access while parsing AttributeCertificate, thanks @anfedotoff: https://github.com/m4b/goblin/pull/368
14 ### Added
15 pe: support basic certificates enumeration, thanks @RaitoBezarius: https://github.com/m4b/goblin/pull/354
16 pe: fix certificate tables parsing, thanks @baloo: https://github.com/m4b/goblin/pull/359
17 pe: add pe authenticode support, thanks @baloo: https://github.com/m4b/goblin/pull/362
18 mach: implement `LC_FILESET_ENTRY`, thanks @mmaekr: https://github.com/m4b/goblin/pull/369
19 build: add afl fuzzing support, thanks @anfedotoff: https://github.com/m4b/goblin/pull/351
21 ## [0.6.1] - 2023-2-26
22 ### Fixed
23 elf.section_header: additional workaround for 0-length sections, thanks @Jhynjhiruu: https://github.com/m4b/goblin/pull/347
24 pe.utils: file alignment check, thanks @anfedotoff: https://github.com/m4b/goblin/pull/340
25 ### Added
26 elf: Add basic GNU PROPERTY note support, thanks @x64k: https://github.com/m4b/goblin/pull/352
27 mach: Implement `LC_BUILD_VERSION`, thanks @messense: https://github.com/m4b/goblin/pull/341
29 ## [0.6.0] - 2022-10-23
30 ### Breaking
31 macho: add support for archives in multi-arch binaries, big thanks to @nick96: https://github.com/m4b/goblin/pull/322
32 ### Changed
33 elf: only consider loadable segments for VM translation (this may semantically break someone, if they depended on older behavior), thanks @lumag: https://github.com/m4b/goblin/pull/329
34 ### Fixed
35 archive: fix potential panic in bsd filenames, thanks @nathaniel-daniel:  https://github.com/m4b/goblin/pull/335
36 archive: fix subtract with overflow, thanks @anfedotoff: https://github.com/m4b/goblin/pull/333
37 pe: fix oob access, thanks @anfedetoff: https://github.com/m4b/goblin/pull/330
38 archive: fix oob access, thanks @anfedetoff: https://github.com/m4b/goblin/pull/329
39 ### Added
40 pe: add machine_to_str utility function, thanks @cgzones: https://github.com/m4b/goblin/pull/338
41 fuzz: add debug info for line numbers, thanks @SweetVishnya: https://github.com/m4b/goblin/pull/336
43 ## [0.5.4] - 2022-8-14
44 ### Fixed
45 pe: fix regression in PE binary parsing, thanks @SquareMan: https://github.com/m4b/goblin/pull/321
47 ## [0.5.3] - 2022-7-16
48 ### Fixed
49 elf: fix elf strtab parsing, thanks @tux3: https://github.com/m4b/goblin/pull/316
50 ### Added
51 elf: implement plain for note headers, thanks @mkroening: https://github.com/m4b/goblin/pull/317
53 ## [0.5.2] - 2022-6-5
54 ### Fixed
55 elf: fix arithmetic overflows in `file_range()` and `vm_range()`, thanks @alessandron: https://github.com/m4b/goblin/pull/306
56 pe: fix string table containing empty strings, thanks @track-5: https://github.com/m4b/goblin/pull/310
57 pe: remove check on debug directory size, thanks @lzybkr: https://github.com/m4b/goblin/pull/313
58 ### Added
59 elf: expose more of programheader impl regardless of alloc feature flag, thanks @dancrossnyc: https://github.com/m4b/goblin/pull/308
60 mach.parse: Handle DyldExportsTrie, thanks @apalm: https://github.com/m4b/goblin/pull/303
62 ## [0.5.1] - 2022-2-13
63 ### BREAKING
64 goblin: guard all capacity allocations with bounds checks, this is breaking because we introduced a new error enum, which is now marked as non_exhaustive, thanks @Swatinem: https://github.com/m4b/goblin/pull/298
65 pe: support exports without an offset, thanks @dureuill: https://github.com/m4b/goblin/pull/293
66 ### Fixed
67 mach: fix overflow panics, thanks @Swatinem: https://github.com/m4b/goblin/pull/302
68 pe: add signature header check, thanks @skdltmxn: https://github.com/m4b/goblin/pull/286
69 elf: improve parsing `SHT_SYMTAB` complexity from O(N^2) to O(N), thanks @Lichsto: https://github.com/m4b/goblin/pull/297
70 ### Added
71 elf: clarify documentation on strtab behavior better, and add nice doc example, thanks @n01e0: https://github.com/m4b/goblin/pull/301
72 elf: add rpaths and runpath to elf, thanks @messense: https://github.com/m4b/goblin/pull/294
73 elf: complete elf OSABI constants, thanks @messense: https://github.com/m4b/goblin/pull/295
74 elf: fill out more elf constants, thanks @n01e0: https://github.com/m4b/goblin/pull/296
76 ## [0.5.0] - 2022-2-13
77 YANKED, see 0.5.1
79 ## [0.4.3] - 2021-9-18
80 ### Added
81 - elf: add initial versioned symbols support, thanks @johannst: https://github.com/m4b/goblin/pull/280
82 - elf: add some missing constants, `PF_MASKOS` and `PF_MASKPROC`, thanks @npmccallum: https://github.com/m4b/goblin/pull/281
84 ## [0.4.2] - 2021-7-4
85 ### Added
86 - strtab: preparses the string table to prevent certain class of DoS attacks, thanks @Lichtsto: https://github.com/m4b/goblin/pull/275
88 ## [0.4.1] - 2021-5-30
89 ### Fixed
90 - elf: fix error when alloc, but not endian, thanks @dancrossnyc: https://github.com/m4b/goblin/pull/273
92 ## [0.4.0] - 2021-4-11
93 ### BREAKING
94 - elf: fix returning invalid ranges for SH_NOBIT sections,
95   method changed to return optional range instead, thanks @Tiwalun: https://github.com/m4b/goblin/pull/253
96 ### Fixed
97   pe: pass parse opts correctly in pe parser in lookup table, fixes some issues loading and parsing pe libraries: https://github.com/m4b/goblin/pull/268
98   elf: remove unnecessary unsafe blocks, thanks @nico-abram: https://github.com/m4b/goblin/pull/261
99   elf: replace pub type with pub use, thanks @sollyucko: https://github.com/m4b/goblin/pull/259
100 ### Added
101   elf: add a lazy parse example, thanks @jesseui: https://github.com/m4b/goblin/pull/258
102   elf: add a new fuzzing harness + fix overflows in hash functions and note data iterator construction, thanks @Mrmaxmeier: https://github.com/m4b/goblin/pull/260
104 ## [0.3.4] - 2021-1-31
105 ### Added
106 - elf: introduce "lazy" parsing of elf structure with new lazy_parse function, which allows user to fill in parts of the ELF struct they need later on; new example provided, as well as some tests, thanks @jessehui: https://github.com/m4b/goblin/pull/254
107 - elf: also add new `Elf::parse_header` convenience function, which allows to parse elf header from bytes without e.g., explicitly depending on scroll, etc.
109 ## [0.3.3] - 2021-1-31
110 ### Fixed
111 - mach: fix debug print panic, thanks @messense: https://github.com/m4b/goblin/pull/251
112 ### Added
113 - pe: allow pe virtual memory resolve to be optional, allowing memory/process dump parsing, thanks @ko1n (as well as patience for very long time to merge PR!): https://github.com/m4b/goblin/pull/188
115 ## [0.3.2] - 2021-1-29
116 ### Fixed
117 - elf: overflow panic when note name is 0, thanks @glandium: https://github.com/m4b/goblin/pull/256
119 ## [0.3.1] - 2021-1-18
120 ### Added
121 - mach: add rpaths, thanks @keith: https://github.com/m4b/goblin/pull/248
122 ### Fixed
123 - elf: fix regression parsing binaries like busybox (https://github.com/m4b/bingrep/issues/28), thanks @jan-auer: https://github.com/m4b/goblin/pull/249
125 ## [0.3.0] - 2020-11-26
126 ### BREAKING
127 - mach: add missing load commands, and fixup minversion enum and api, thanks @woodruffw !: https://github.com/m4b/goblin/pull/240
128 ### Fixed
129 - elf: prevent overflow in bad section sizes, thanks @jackcmay: https://github.com/m4b/goblin/pull/243
130 - `Object::parse` no longer needs `std`! thanks @Evian-Zhang: https://github.com/m4b/goblin/pull/235
131 -  test: remove hardcoded CommandLineTools path in macos test, thanks @quake: https://github.com/m4b/goblin/pull/238
132 - build: Resolve clippy lints, thanks @connorkuehl: https://github.com/m4b/goblin/pull/225
133 ### Added
134 - elf: add the x86-64 unwind processor specific section header type https://github.com/m4b/goblin/pull/224
135 - elf: Add ability to get archive members by index https://github.com/m4b/goblin/pull/225
137 ## [0.2.3] - 2020-5-10
138 ### Fixed
139 - pe: remove unwrap on coffheader strtab parsing, thanks @ExPixel: https://github.com/m4b/goblin/pull/222
140 ### Added
141 - pe: add more machine constants, thanks @ExPixel: https://github.com/m4b/goblin/pull/223
143 ## [0.2.2] - 2020-5-08
144 ### Fixed
145 - elf: protect against out of memory when parsing, thanks @jackcmay: https://github.com/m4b/goblin/pull/219
146 - pe: fix panic when parsing unwind info, thanks @jan-auer: https://github.com/m4b/goblin/pull/218
148 ## [0.2.1] - 2020-3-14
149 ### Added
150 - elf: add more robust debug printing to various elf data structures, thanks @connorkuehl, e.g.: https://github.com/m4b/goblin/pull/211
151 - elf: derive PartialEq for DynamicInfo, thanks @connorkuehl: https://github.com/m4b/goblin/pull/209
153 ## [0.2.0] - 2020-1-20
154 ### Changed
155 - BREAKING: Changes in `elf::gnu_hash::GnuHash`:
156   + `new(*const u32, usize, &[sym::Sym]) -> Self`
157     to `from_raw_table(&[u8], &[Sym]) -> Result<Self, &str>`
158   + `find(&self, &str, u32, &Strtab) -> Option<&Sym>`
159     to `find(&self, &str, &Strtab) -> Option<&Sym>`.
160 - BREAKING: mach: fix generic relocation constants, @philipc: https://github.com/m4b/goblin/pull/204/files
161 ### Added
162 - elf: add more elf note values, thanks @xcoldhandsx: https://github.com/m4b/goblin/pull/201
163 - Finally rustfmt'd entire repo :D
165 ## [0.1.3] - 2019-12-28
166 ### Removed
167 - alloc feature, stabilized in 1.36 @philipc https://github.com/m4b/goblin/pull/196
168 ### Added
169 elf: support empty PT_DYNAMIC references, @jan-auer https://github.com/m4b/goblin/pull/193
170 elf: move various elf::Sym impls out of alloc gate, @lzutao https://github.com/m4b/goblin/pull/198
171 ### Fixed
172 elf: parsing 0 section header had regression introduced in 779d0ce, fixed by @philipc https://github.com/m4b/goblin/pull/200
174 ## [0.1.2] - 2019-12-02
175 ### Fixed
176 mach: don't return data for zerofill sections, @philipc https://github.com/m4b/goblin/pull/195
178 ## [0.1.1] - 2019-11-10
179 ### Fixed
180 elf: Don't fail entire elf parse when interpreter is malformed string, @jsgf https://github.com/m4b/goblin/pull/192
182 ## [0.1.0] - 2019-11-3
183 ### Added
184 - update to scroll 0.10 api
186 ### Changed
187 - BREAKING: rename export to lib in Reexport::DLLOrdinal from @lzybkr
188 - pe: only parse ExceptionData for machine X86_64, thanks @wyxloading
190 ### Fixed
191 pe: Fix resolution of redirect unwind info, thanks @jan-auer https://github.com/m4b/goblin/pull/183
192 pe: fix reexport dll and ordinal, thanks @lzybkr: d62889f469846af0cceb789b415f1e14f5f9e402
194 ## [0.0.24] - 2019-7-13
195 ### Added
196 - archive: new public enum type to determine which kind of archive was parsed
197 ### Fixed
198 - archive: thanks @raindev
199     * fix parsing of windows style archives: https://github.com/m4b/goblin/pull/174
200     * stricter parsing of archives with multiple indexes: https://github.com/m4b/goblin/pull/175
202 ## [0.0.23] - 2019-6-30
203 ### Added
204 - pe: add write support for COFF object files!!! This is huge; we now support at a basic level writing out all major binary object formats, thanks @philipc: https://github.com/m4b/goblin/pull/159
205 - elf: add more e_ident constants
206 - mach: add segment protection constants
207 - elf: add risc-v relocation constants
208 - elf: add constants for arm64_32 (ILP32 ABI on 64-bit arm)
209 - pe: coff relocations and other auxiliary symbol records
211 ### Fixed
212 - mach: fix 0 length data sections in mach-o segments, seen in some object files, thanks @raindev: https://github.com/m4b/goblin/pull/172
213 - build: alloc build was fixed: https://github.com/m4b/goblin/pull/170
214 - pe: fix `set_name_offset` compilation for 32-bit: https://github.com/m4b/goblin/pull/163
216 ## [0.0.22] - 2019-4-13
217 ### Added
218 - Beautify debugging by using `debug_struct` in `Debug` implementation of many structs.
219 - PE: fix rva mask, thanks @wickawacka: https://github.com/m4b/goblin/pull/152
220 - PE: add PE exception tables, thanks @jan-auer: https://github.com/m4b/goblin/pull/136
222 ### Changed
223 - Bump lowest Rust version to 1.31.1 and transition project to Rust 2018 edition.
224 - BREAKING: Rename module `goblin::elf::dyn` to `goblin::elf::dynamic` due to `dyn`
225   become a keyword in Rust 2018 edition.
226 - BREAKING: Rename `mach::exports::SymbolKind::to_str(kind: SymbolKind)` -> `to_str(&self)`.
227 - BREAKING: Rename `strtab::Strtab::to_vec(self)` -> `to_vec(&self).`
229 ### Removed
230 - BREAKING: `goblin::error::Error::description` would be removed. Use `to_string()` method instead.
232 ### Fixed
233 - elf: handle some invalid sizes, thanks @philipc: https://github.com/m4b/goblin/pull/121
235 ## [0.0.21] - 2019-2-21
236 ### Added
237 - elf: add symbol visibility. thanks @pchickey: https://github.com/m4b/goblin/pull/119
239 ## [0.0.20] - 2019-2-10
240 ### Added
241 - elf: parse section header relocs even when not an object file. thanks @Techno-Coder: https://github.com/m4b/goblin/pull/118
242 - pe: make utils public, add better examples for data directory usage. thanks @Pzixel: https://github.com/m4b/goblin/pull/116
244 ## [0.0.19] - 2018-10-23
245 ### Added
246 - elf: fix regression when parsing dynamic symbols from some binaries, thanks @philipc: https://github.com/m4b/goblin/issues/111
248 ## [0.0.18] - 2018-10-14
249 ### Changed
250  - BREAKING: updated required compiler to 1.20 (due to scroll 1.20 requirement)
251  - BREAKING: elf: removed bias field, as it was misleading/useless/incorrect
252  - BREAKING: elf: add lazy relocation iterators: Thanks @ibabushkin https://github.com/m4b/goblin/pull/102
253  - BREAKING: mach: remove repr(packed) from dylib and fvmlib (this should not affect anyone): https://github.com/m4b/goblin/issues/105
254 ### Added
255  - elf: use gnu/sysv hash table to compute sizeof dynsyms more accurately: again _huge_ thanks to @philipc https://github.com/m4b/goblin/pull/109
256  - elf: handle multiple load biases: _huge_ thanks @philipc: https://github.com/m4b/goblin/pull/107
257  - mach: add arm64e constants: Thanks @mitsuhiko https://github.com/m4b/goblin/pull/103
258  - PE: calculate read bytes using alignment: Thanks @tathanhdinh https://github.com/m4b/goblin/pull/101
259  - PE: get proper names for PE sections: Thanks @roblabla https://github.com/m4b/goblin/pull/100
261 ## [0.0.17] - 2018-7-16
262 ### Changed
263  - BREAKING: updated required compiler to 1.19 (technically only required for tests, but assume this is required for building as well)
264  - fixed nightly alloc api issues: https://github.com/m4b/goblin/issues/94
266 ## [0.0.16] - 2018-7-14
267 ### Changed
268  - BREAKING: pe.export: name is now optional to reflect realities of PE parsing, and add more robustness to parser. many thanks to @tathanhdinh! https://github.com/m4b/goblin/pull/88
269  - elf.note: treat alignment similar to other tools, e.g., readelf. Thanks @xcoldhandsx: https://github.com/m4b/goblin/pull/91
270 ### Added
271  - elf: more inline annotations on various methods, thanks@amanieu: https://github.com/m4b/goblin/pull/87
273 ## [0.0.15] - 2018-4-22
274 ### Changed
275  - BREAKING: elf.reloc: u64/i64 used for r_offset/r_addend, and addend is now proper optional, thanks @amanieu! https://github.com/m4b/goblin/pull/86/
276  - update to scroll 0.9
277  - pe32+: parse better, thanks @kjempelodott, https://github.com/m4b/goblin/pull/82
278 ### Added
279  - mach: add constants for `n_types` when `N_STAB` field is being used, thanks @jrmuizel! https://github.com/m4b/goblin/pull/85
280  - elf: implement support for compressed headers, thanks @rocallahan! https://github.com/m4b/goblin/pull/83
281  - new nightly "alloc" feature: allows compiling the goblin parser on nightly with extern crate + no_std, thanks @philipc! https://github.com/m4b/goblin/pull/77
282  - mach.segments: do not panic on bad internal data bounds: https://github.com/m4b/goblin/issues/74
283  - mach: correctly add weak dylibs to import libs: https://github.com/m4b/goblin/issues/73
285 ## [0.0.14] - 2018-1-15
286 ### Changed
287 - BREAKING: elf: `iter_notes` renamed to `iter_note_headers`
288 - BREAKING: mach: remove `is_little_endian()`, `ctx()`, and `container()` methods from header, as they were completely invalid for big-endian architectures since the header was parsed according to the endianness of the binary correctly into memory, and hence would always report `MH_MAGIC` or `MH_MAGIC64` as the magic value.
289 - elf: courtesy of @jan-auer, note iterator now properly iterates over multiple PH_NOTEs
290 ### Added
291 - mach: added hotly requested feature - goblin now has new functionality to parse big-endian, powerpc 32-bit mach-o binaries correctly
292 - mach: new function to correctly extract the parsing context for a mach-o binary, `parse_magic_and_ctx`
293 - elf: note iterator has new `iter_note_sections` method
295 ## [0.0.13] - 2017-12-10
296 ### Changed
297 - BREAKING: remove deprecated goblin::parse method
298 - BREAKING: ELF `to_range` removed on program and section headers; use `vm_range` and `file_range` for respective ranges
299 - Technically BREAKING: @philipc added Symtab and symbol iterator to ELF, but is basically the same, unless you were explicitly relying on the backing vector
300 - use scroll 0.8.0 and us scroll_derive via scroll
301 - fix notes including \0 terminator (causes breakage because tools like grep treat resulting output as a binary output...)
302 ### Added
303 - pe: add PE characteristics constants courtesy @philipc
304 - mach: SizeWith for RelocationInfo
305 - mach: IOWrite and Pwrite impls for Nlist
307 ## [0.0.12] - 2017-10-29
308 ### Changed
309 - fix proper std feature flag to log; this was an oversight in last version
310 - proper cputype and cpusubtype constants to mach, along with mappings, courtesy of @mitsuhiko
311 - new osx and ios version constants
312 - all mach load commands now implement IOread and IOwrite from scroll
313 - add new elf::note module and associated structs + constants, and `iter_notes` method to Elf object
314 - remove all unused muts; this will make nightly and future stables no longer warn
316 ### Added
317 - fix macho nstab treatment, thanks @philipc !
318 - mach header cpusubtype bug fixed, thanks @mitsuhiko !
320 ## [0.0.11] - 2017-08-24
321 ### Added
322 - goblin::Object::parse; add deprecation to goblin::parse
323 - MAJOR archive now parses bsd style archives AND is zero-copy by @willglynn
324 - MAJOR macho import parser bug fixed by @willglynn
325 - added writer impls for Section and Segment
326 - add get_unsafe to strtab for Option<&str> returns
327 - relocations method on mach
328 - more elf relocations
329 - mach relocations
330 - convenience functions for many elf structures that elf writer will appreciate
331 - mach relocation iteration
332 - update to scroll 0.7
333 - add cread/ioread impls for various structs
335 ### Changed
336 - BREAKING: sections() and section iterator now return (Section, &[u8])
337 - Segment, Section, RelocationIterator are now in segment module
338 - removed lifetime from section, removed data and raw data, and embedded ctx
339 - all scroll::Error have been removed from public API ref #33
340 - better mach symbol iteration
341 - better mach section iteration
342 - remove wow_so_meta_doge due to linker issues
343 - Strtab.get now returns a Option<Result>, when index is bad
344 - elf.soname is &str
345 - elf.libraries is now Vec<&str>
347 ## [0.0.10] - 2017-05-09
348 ### Added
349 - New goblin::Object for enum containing the parsed binary container, or convenience goblin::parse(&[u8) for parsing bytes into respective container format
350 ### Changed
351 - All binaries formats now have lifetimes
352 - Elf has a lifetime
353 - Strtab.new now requires a &'a[u8]
354 - Strtab.get now returns a scroll::Result<&'a str> (use strtab[index] if you want old behavior and don't care about panics); returning scroll::Error is a bug, fixed in next release
356 ## [0.0.9] - 2017-04-05
357 ### Changed
358 - Archive has a lifetime
359 - Mach has a lifetime