Linking symbols to fixed addresses on Linux

后端 未结 3 373
南笙
南笙 2020-12-10 04:45

How would one go about linking (some) symbols to specific fixed addresses using GNU ld so that the binary could still be executed as normal in Linux (x86)? There will not be

3条回答
  •  渐次进展
    2020-12-10 05:32

    I'll give you the hot tip... GNU LD can do this (assuming the system libs don't need the address you want). You just need to build your own linker script instead of using the compiler's autogenerated one. Read the man page for ld. Also, building a linker script for a complex piece of software is no easy task when you involve the GLIBC too.

提交回复
热议问题