Force files into specific linker section

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

Force files into specific linker section

Jump to solution
730 Views
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 Kudos
1 Solution
574 Views
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)

View solution in original post

0 Kudos
1 Reply
575 Views
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 Kudos