Can't link a shared library from an x86-64 object from assembly because of PIC

前端 未结 1 972
感动是毒
感动是毒 2021-01-13 15:24

I\'m porting a shared library from 32-bit to 64-bit. It\'s composed of some assembly (written for NASM) that exports several procedures and a little bit of higher-level C gl

相关标签:
1条回答
  • 2021-01-13 15:43

    I've solved it! In my case the relocations resulted from:

    1) libc calls, which I solved by appending wrt ..plt to libc calls, e.g. call rand wrt ..plt,

    2) references to constants placed within the code, which needed to change from e.g. push MASK_RGB to push ptr [rel MASK_RGB] (where ptr is my own type that aliases to the native word type for the given platform).

    0 讨论(0)
提交回复
热议问题