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.
14 --- rts/StgCRun.c.orig 2013-01-27 13:21:52.000000000 +0000
16 @@ -246,6 +246,7 @@ StgRunIsImplementedInAssembler(void)
17 * save callee-saves registers on behalf of the STG code.
19 ".globl " STG_RUN "\n"
20 + ".hidden " STG_RUN "\n"
23 "movq %%rsp, %%rax\n\t"
24 @@ -280,6 +281,7 @@ StgRunIsImplementedInAssembler(void)
27 ".globl " STG_RETURN "\n"
28 + ".hidden " STG_RETURN "\n"
31 "movq %%rbx, %%rax\n\t" /* Return value in R1 */