linker-tool-mwdt: compliant adjustment of linker macros

New macro GROUP_ROM_LINK_IN for text/rodata sections
New macro GROUP_NOLOAD_LINK_IN for bss/noinit sections

GROUP_FOLLOWS_AT is unused anywhere in the kernel for
years now and has been removed.

Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
This commit is contained in:
Watson Zeng 2021-03-19 11:25:42 +08:00 committed by Kumar Gala
commit f39c02c16c

View file

@ -46,6 +46,14 @@
*/ */
#define GROUP_LINK_IN(where) > where #define GROUP_LINK_IN(where) > where
/**
* The GROUP_ROM_LINK_IN() macro is located at the end of the section
* description and tells the linker that this a read-only section
* that is physically placed at the 'lregion` argument.
*
*/
#define GROUP_ROM_LINK_IN(vregion, lregion) > lregion
/* /*
* As GROUP_LINK_IN(), but takes a second argument indicating the * As GROUP_LINK_IN(), but takes a second argument indicating the
* memory region (e.g. "ROM") for the load address. Used for * memory region (e.g. "ROM") for the load address. Used for
@ -63,13 +71,15 @@
#define GROUP_DATA_LINK_IN(vregion, lregion) > vregion #define GROUP_DATA_LINK_IN(vregion, lregion) > vregion
#endif #endif
/* /**
* The GROUP_FOLLOWS_AT() macro is located at the end of the section * Route memory for read-write sections that are NOT loaded; typically this
* and indicates that the section does not specify an address at which * is only used for 'BSS' and 'noinit'.
* it is to be loaded, but that it follows a section which did specify
* such an address
*/ */
#define GROUP_FOLLOWS_AT(where) AT > where #ifdef CONFIG_XIP
#define GROUP_NOLOAD_LINK_IN(vregion, lregion) > vregion AT > vregion
#else
#define GROUP_NOLOAD_LINK_IN(vregion, lregion) > vregion
#endif
/* /*
* The SECTION_PROLOGUE() macro is used to define the beginning of a section. * The SECTION_PROLOGUE() macro is used to define the beginning of a section.