Force files into specific linker section

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

Force files into specific linker section

跳至解决方案
935 次查看
ignisuti
Contributor IV

I'm trying force standard c files, like float.c, into the protected section of my bootloader as follows:

.GROUP__BOOT__stuff:

            { 

            __LINK_SYM__BOOT__stuff = .;

            Core\Standard_Libraries\float.c (.text)                  

            Core\Standard_Libraries\float.c (.data)

            . = ALIGN(0x8);              

            } > SEG__BOOT__stuff


However, my compiler is complaining about "Linker command file error at line 97 Unexpected Symbol"

Line 97 is the line with (.text).


Any thoughts?

0 项奖励
回复
1 解答
779 次查看
ignisuti
Contributor IV

FYI: I found that I need to list the object (not file) with .obj to make this work.

.GROUP__BOOT__body:

                                { 

                                BOOT__DEBUG.obj (.text)

                                BOOT__DEBUG.obj (.rodata)

在原帖中查看解决方案

0 项奖励
回复
1 回复
780 次查看
ignisuti
Contributor IV

FYI: I found that I need to list the object (not file) with .obj to make this work.

.GROUP__BOOT__body:

                                { 

                                BOOT__DEBUG.obj (.text)

                                BOOT__DEBUG.obj (.rodata)

0 项奖励
回复