Using Function Pointers with Position Independent Code.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Using Function Pointers with Position Independent Code.

933 次查看
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 项奖励
回复
2 回复数

901 次查看
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 项奖励
回复

909 次查看
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 项奖励
回复