[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#461125: ocaml-nox: linking into a shared library fails due to R_X86_64_32 relocations



Hello,

I also ran into this issue and found the following workaround:

1) recompile libasmrun.a with -fPIC

2) link my library with -Wl,-Bsymbolic

Then I am able to run a C binary that calls ocaml where ocaml lives in the 
created .so.

2) is not very nice. I tried solving it by sprinkling @PLT symbol tags in 
asmrun/amd64.S instead. This makes everything compile and link without -
Bsymbolic but segfaults with an uncomprehensive error.

It would be very nice if you could adapt the ocaml build to build libasmrun.a 
with -fPIC on the x86_64(amd64) architecture by default.

Greetings, Joost Damad



Reply to: