GCC Linker script sections
How to put all code from one file in one linker section?
I'm using Cubeide with gcc
The following functionality should work but it doesn't for some reason, can anyone help here?
It shall be possible to group functions in a section based on some filters. e.g. some pattern in the name, individually specifying each and every function, all functions from one file. etc..
In my case what i would like to do is to automatically put all functions from one file in a separate section apart from the rest (.text)
However trying several variations of this it doesn't work, i can't set up the filter properly so this is applied only to functions from specific_file.c
.specific_code : {
specific_file.c *(.text*)
} > FLASH
GCC complains that either the file is not found or the format is not recognized or there are multiple definitions.
(function name pattern matching, or specifying the attribute manually for each function works as expected)