gecko-dev/taskcluster
Mike Hommey dc8ae8410c Bug 1485503 - Avoid ld64 merging static and non-static data with the same name during ThinLTO. r=dmajor
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.
2018-08-24 08:39:31 +09:00
..