Using Function Pointers with Position Independent Code.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using Function Pointers with Position Independent Code.

928 Views
rnicolls
Contributor IV

Hi, 

We're currently trying to implement two separate slots to store the our application in. The application is supposed to be position independent, so that it can run from either slot. 

We've encountered an issue where function pointers that are initialized before runtime point to the incorrect address, as they do not have the added offset for slot two. 

Can we configure the compiler so that function pointers will use the GOT table to call the function? That way we can add the correct offset to the address in the startup code?

Thanks

0 Kudos
Reply
2 Replies

896 Views
rnicolls
Contributor IV

Hi Hector,

I'm using this board from Embedded Artists: https://www.embeddedartists.com/products/imx-rt1176-developers-kit/

Thank you. 

0 Kudos
Reply

904 Views
hector_delgado
NXP TechSupport
NXP TechSupport

Hi @rnicolls ,

I hope you're having a great day. Could you let us know the board you're using to review in more detail your case?

Thank you in advance.

Best regards,
Hector.

0 Kudos
Reply