3 We have to make the visiblity of StgRun and StgReturn to "hidden" not
4 to trigger a bug in old binutils which results in:
6 ld: rts/dist/build/RtsStartup.dyn_o: relocation R_X86_64_PC32
7 against `StgRun' can not be used when making a shared object;
10 With this workaround we can no longer override those two symbols using
11 LD_PRELOAD, but I think there is no reason to do so anyway.
13 --- rts/StgCRun.c.orig 2012-03-21 03:41:49.000000000 +0000
15 @@ -238,6 +238,7 @@ StgRunIsImplementedInAssembler(void)
16 * save callee-saves registers on behalf of the STG code.
18 ".globl " STG_RUN "\n"
19 + ".hidden " STG_RUN "\n"
22 "movq %%rsp, %%rax\n\t"
23 @@ -259,6 +260,7 @@ StgRunIsImplementedInAssembler(void)
26 ".globl " STG_RETURN "\n"
27 + ".hidden " STG_RETURN "\n"
30 "movq %%rbx, %%rax\n\t" /* Return value in R1 */