Recently I've got a task to build a project under MACOS. Struggling many differences, I finaly got to an end, and everything seems to work, but one issue bothers me.
The project has assembly (NASM) code like this:
SECTION .rodata align=16
const_w05: times 8 dw 5
pmullw xmm1, [rel const_w05]
Now whe it comes to linking, I get the following error:
ld: absolute addressing (perhaps -mdynamic-no-pic) used in (_some_function_sse2) from ... not allowed in slidable image. Use '-read_only_relocs suppress' to enable text relocs
So reading lot of information on this, I had nothing bug put the suggested option -read_only_relocs suppress
. The project was built and worked.
But I'm afraid it isn't correct and may not work if the shared object loads in different memory location.
BTW: The project is a shared object (dynamic library).
PS2: Everything builds on LINUX with no such errors.