define linker section for entire file

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

define linker section for entire file

跳至解决方案
972 次查看
shanescott
Contributor III

Using "__attribute__"  I am able to locate a function in a particular linker section.  This is ok sometimes but for large files it becomes tedious.  Is there a way to specify a section for the entire file?

Thanks 

0 项奖励
1 解答
814 次查看
BlackNight
NXP Employee
NXP Employee

Not to specify a section for the file, but you can use the object file name in the linker file as shown in

Putting Code of Files into Special Section with the GNU Linker | MCU on Eclipse 

I hope this helps,

Erich

在原帖中查看解决方案

2 回复数
814 次查看
shanescott
Contributor III

Perfect! Thanks

0 项奖励
815 次查看
BlackNight
NXP Employee
NXP Employee

Not to specify a section for the file, but you can use the object file name in the linker file as shown in

Putting Code of Files into Special Section with the GNU Linker | MCU on Eclipse 

I hope this helps,

Erich