Home
Support

Knowledge Base

BSPs and drivers
Community resources
Product documentation
Questions?
Contact us

How to compile and link a program to a specific .text address
 
________________________________________________________________________

Applicable Environment
________________________________________________________________________
  • Topic: How to compile/link a program to specific .text address
  • SDP: 6.3.2
  • Host: Any supported host
________________________________________________________________________

Recommendation
________________________________________________________________________

I think the best bet is likely to override the linker script. You can either dump the built in one by doing:

qcc -Vgcc_ntoppcbe -o<bin> bin.c -Wl,--verbose=5

Then save the output of the linker script with the modified address you wish (I've attached an example).

Alternatively, it appears you might be able to create a smaller linker script that enhances the built in one using the INSERT rule to augment the overall linker script with the different base address.

________________________________________________________________________
NOTE: This entry has been validated against the SDP version listed above. Use caution when considering this advice for any other SDP version. For supported releases, please reach out to QNX Technical Support if you have any questions/concerns.
________________________________________________________________________


Related Attachments
 None Found





Please contact us with your questions or concerns.