Bug 1059602 - Make libxul -> libmozsandbox dependency not a weak symbol. r=glandium

MFBT_API is not the right macro for this; it changes the affected
definition/usage to a weak symbol, for reasons explained in the comments
on its definition.

This was causing the linker to drop the dependency from libmozglue
to libmozsandbox, in some cases (--as-needed, with a linker that
doesn't consider weak symbols "needed"), and thus load libxul with
gSandboxCrashFunc relocated to address 0 (the expected behavior of an
unresolved weak symbol), which caused crashes when writing to it on
startup.

--HG--
extra : amend_source : b99fded391ae90b1311f4cabaf40f15e6414f245
This commit is contained in:
Jed Davis 2014-08-28 23:23:13 -07:00
parent d902bcf7f8
commit 1ea7e357ca

View File

@ -17,7 +17,7 @@
namespace mozilla {
typedef void (*SandboxCrashFunc)(int, siginfo_t*, void*);
extern MFBT_API SandboxCrashFunc gSandboxCrashFunc;
extern MOZ_EXPORT SandboxCrashFunc gSandboxCrashFunc;
} // namespace mozilla