There are a number of data sections that are repeated across all the linker scripts for various architecture. In practice these don't always get updated and we have had problems with bit-rot. Consolidate these to make maintenance easier. x86 linker scripts now follow the same naming convention and we get rid of a linker-epilog.h that wasn't necessary and whose purpose has been lost to the mists of time. If applications want to define their own sections they should be allowed to. Linker scripts for x86 do not end with .h any more, they are not C header files even though we use C's preprocessor. Issue: ZEP-688 Change-Id: I893eb4619969695c1f980efd7c2ec9fa5dad136d Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
35 lines
919 B
Text
35 lines
919 B
Text
#ifdef CONFIG_CPLUSPLUS
|
|
SECTION_PROLOGUE(_CTOR_SECTION_NAME,,)
|
|
{
|
|
/*
|
|
* The compiler fills the constructor pointers table below,
|
|
* hence symbol __CTOR_LIST__ must be aligned on 4 byte
|
|
* boundary. To align with the C++ standard, the first elment
|
|
* of the array contains the number of actual constructors. The
|
|
* last element is NULL.
|
|
*/
|
|
. = ALIGN(4);
|
|
__CTOR_LIST__ = .;
|
|
LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
|
|
KEEP(*(SORT_BY_NAME(".ctors*")))
|
|
LONG(0)
|
|
__CTOR_END__ = .;
|
|
} GROUP_LINK_IN(ROMABLE_REGION)
|
|
|
|
SECTION_PROLOGUE(init_array, (OPTIONAL),)
|
|
{
|
|
. = ALIGN(4);
|
|
__init_array_start = .;
|
|
KEEP(*(SORT_BY_NAME(".init_array*")))
|
|
__init_array_end = .;
|
|
} GROUP_LINK_IN(ROMABLE_REGION)
|
|
#endif
|
|
|
|
SECTION_PROLOGUE (devconfig, (OPTIONAL),)
|
|
{
|
|
__devconfig_start = .;
|
|
*(".devconfig.*")
|
|
KEEP(*(SORT_BY_NAME(".devconfig*")))
|
|
__devconfig_end = .;
|
|
} GROUP_LINK_IN(ROMABLE_REGION)
|
|
|