# ROM location: address 0x0
# RAM location: address 0x800000
# For clarity, no alignment directives in this listing
TEXT (RX) : ORIGIN = 0x0, LENGTH = 0
DATA (RW) : ORIGIN = 0x800000, LENGTH = 0
} > TEXT
# Locate initialized data in ROM area at end of .main.
.main_data : AT( ADDR(.main) + SIZEOF(.main) )
} > DATA
} >> DATA
I want to put the file/function in the main_data section, but since it's already included in the TEXT section (with the *(.text) directive) the linker doesn't include it again. I don't want to explictly list out every file in the TEXT section becuase there are a lot and it's more difficult to maintain. Is there a way to exclude a file/function from that section?
I read something in the manual about creating a named file group, but couldn't see how this was done (there were no examples that I could find).
If anyone's had any luck with this in the past or can suggest a better way, I'd be grateful.