site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 We are adding some assembly optimizations to our code. We are running into a problem with text relocations. I'm looking for suggestions for articles or information on how to go about fixing this problem. The linker returns: ld: absolute addressing (perhaps -mdynamic_no_pic) used in (some function) from (path to some library) not allowed in slidable image. Use '--read_only_relocs suppress' to enable text relocs The function and file identified in the library are part of our assembly optimizations. This happens when linking a library built with the assembly code into a framework (aka dylib). Looking at the code, the problem stems from access to an external table. The table is compiled in a .c file. The assembler has no (automatic) way of constructing a relative address to that table. This apparently leaves the linker to work out what the address is, which leaves the assembly in a state where it wants an absolute address. (Yes, some of this is guessing, which is why I am asking. :-) I am also working towards using this same code in a kext which, I expect, will have similar issues. Can anyone recommend reading or suggestions for how to resolve this situation? Thank you for your suggestions, ...Duane -----BEGIN PGP SIGNATURE----- Version: PGP Desktop 9.10.0 (Build 500) Charset: US-ASCII wsBVAwUBS+R260rg9acQ4r2CAQi9TAgA3UvbWNdSYHjWNmPw7UE7gO1cizwUtx3L XxqTVvkLtlT+qbBUDdxpTCesiffKFyKv2QNrqkh68/nBZHRANsqbjh/JD5d0m4nl 0YyMIYAqZVj6QKEpBJWLEXdOvxHqjy0zHkWIIT9F3y1q2jIJCkk3mXdFNjYlwE1t LIHm1wTjxY84ewDrDxuScOoLuPIFsfbS3s0zsqNPkXLi8isTG3mWjXGkuZU6Khig hylw2Nxq2IIM1lyYZ2QV+1l8iK2g6RhQy5nP5c+kXWb6U7GZz6k7ozb+Et8/Uau3 FwqOcisY3hAPRqBjKgRJnoZKCadQP9fBGdQ/FMXZF+JeZWmF+MOj7Q== =+5yC -----END PGP SIGNATURE----- _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com