uniffi-rs
ac3c9a7d - Fix for Mach-O symbol extraction

Commit
1 year ago
Fix for Mach-O symbol extraction The `n_sect` field is 1-based with `0` meaning `NO_SECT` meaning the symbol is not present in any section in the library. This change fixes the index mismatch. Reference: https://github.com/aidansteele/osx-abi-macho-file-format-reference#nlist_64, The code was mostly working before because of the way we calculate the offset (https://github.com/mozilla/uniffi-rs/blob/2e3b59cf6dbcb46983028b08afc6e0ee51183f2e/uniffi_bindgen/src/macro_metadata/extract.rs#L106). Because of this, even if we were off by one when picking the section, things would still work as long as the two sections involved lined up correctly. Thanks to 0c0w3 for pointing this out and sending me the patch.
Author
Committer
Parents
Loading