arch: arm: cortex-m: properly name ROM sections in the linker

This commit does the following:
- renames the 'text' ROM section to 'rom_start', to reflect
  that this section is the first section of the image.
- renames the 'TEXT_SECTION_NAME_2' section to 'text', since
  that section (whose start is pointed by _image_text_start)
  holds the entire image text section.

The commit removes the confusion by having multiple ROM sections
named as 'text' in ARM Cortex-M builds.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
This commit is contained in:
Ioannis Glaropoulos 2020-01-13 23:53:47 +01:00 committed by Andrew Boie
commit e94551e2b7

View file

@ -135,7 +135,7 @@ SECTIONS
_image_rom_start = ROM_ADDR;
SECTION_PROLOGUE(_TEXT_SECTION_NAME,,)
SECTION_PROLOGUE(rom_start,,)
{
/* Located in generated directory. This file is populated by the
@ -151,7 +151,7 @@ SECTIONS
#endif /* CONFIG_CODE_DATA_RELOCATION */
SECTION_PROLOGUE(_TEXT_SECTION_NAME_2,,)
SECTION_PROLOGUE(_TEXT_SECTION_NAME,,)
{
_image_text_start = .;