Closed Bug 1485503 Opened Last year Closed Last year
[LTO][mac] ld64 thin-lto wrongfully merges static data with non-static data
When different translation units contain the same symbol name, all static, but one of them non-static, ld64 wrongfully link the references to the static data with the non-static data, or vice versa. With libaom and libvpx sharing data structures with the same name but different contents, that leads to interesting failures/crashes at runtime. This was apparently fixed in Apple ld64 from Xcode 9, but the last open sourced version is the one from Xcode 8, so I ended up digging in the ld64 source code and fixed the issue. This work was merged to cctools-port upstream in https://github.com/tpoechtrager/cctools-port/pull/59. For the same reason as invoked in bug 1478917, though, updating to cctools-port master is more involved than just changing a commit sha1 (as it requires building apple-libtapi, which in turn builds parts of LLVM, which should probably be avoided), so just cherry-pick the fix.
Attachment #9003305 - Flags: review?(core-build-config-reviews)
Attachment #9003305 - Flags: review?(core-build-config-reviews) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/4017bcbb799d Avoid ld64 merging static and non-static data with the same name during ThinLTO. r=dmajor
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/4c27db2b3d66 Avoid ld64 merging static and non-static data with the same name during ThinLTO. r=dmajor
You need to log in before you can comment on or make changes to this bug.