Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/arch/arc/v2/linker.ld
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ SECTIONS {

} GROUP_LINK_IN(ROMABLE_REGION)

#include <linker/cplusplus-rom.ld>

_image_rodata_end = .;
MPU_ALIGN(_image_rodata_end - _image_rom_start);
_image_rom_end = .;
Expand Down Expand Up @@ -227,6 +229,7 @@ SECTIONS {

#include <linker/common-ram.ld>
#include <linker/kobject.ld>
#include <linker/cplusplus-ram.ld>

__data_ram_end = .;

Expand Down
3 changes: 3 additions & 0 deletions include/arch/arm/cortex_m/scripts/linker.ld
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ SECTIONS
. = ALIGN(4);
} GROUP_LINK_IN(ROMABLE_REGION)

#include <linker/cplusplus-rom.ld>

_image_rodata_end = .;
MPU_ALIGN(_image_rodata_end -_image_rom_start);
_image_rom_end = .;
Expand Down Expand Up @@ -411,6 +413,7 @@ SECTIONS
#include <linker/kobject.ld>

#include <linker/priv_stacks-noinit.ld>
#include <linker/cplusplus-ram.ld>

__data_ram_end = .;

Expand Down
4 changes: 4 additions & 0 deletions include/arch/arm/cortex_r/scripts/linker.ld
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ SECTIONS
. = ALIGN(4);
} GROUP_LINK_IN(ROMABLE_REGION)

#include <linker/cplusplus-rom.ld>

_image_rodata_end = .;
MPU_ALIGN(_image_rodata_end -_image_rom_start);
_image_rom_end = .;
Expand Down Expand Up @@ -412,6 +414,8 @@ SECTIONS

#include <linker/priv_stacks-noinit.ld>

#include <linker/cplusplus-ram.ld>

__data_ram_end = .;


Expand Down
4 changes: 4 additions & 0 deletions include/arch/nios2/linker.ld
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ SECTIONS
. = ALIGN(4);
} GROUP_LINK_IN(ROMABLE_REGION)

#include <linker/cplusplus-rom.ld>

_image_rom_end = .;
__data_rom_start = ALIGN(4); /* XIP imaged DATA ROM start addr */

Expand Down Expand Up @@ -280,6 +282,8 @@ SECTIONS

} GROUP_LINK_IN(RAMABLE_REGION)

#include <linker/cplusplus-ram.ld>

/* Define linker symbols */
_image_ram_end = .;
_end = .; /* end of image */
Expand Down
4 changes: 4 additions & 0 deletions include/arch/riscv/common/linker.ld
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ SECTIONS

} GROUP_LINK_IN(ROMABLE_REGION)

#include <linker/cplusplus-rom.ld>

_image_rom_end = .;
__data_rom_start = .;

Expand Down Expand Up @@ -196,6 +198,8 @@ SECTIONS

} GROUP_LINK_IN(RAMABLE_REGION)

#include <linker/cplusplus-ram.ld>

_image_ram_end = .;
_end = .; /* end of image */

Expand Down
3 changes: 3 additions & 0 deletions include/arch/x86/ia32/linker.ld
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ SECTIONS
#include <linker/kobject-rom.ld>
} GROUP_LINK_IN(ROMABLE_REGION)

#include <linker/cplusplus-rom.ld>

MMU_PAGE_ALIGN
/* ROM ends here, position counter will now be in RAM areas */
_image_rom_end = .;
Expand Down Expand Up @@ -348,6 +350,7 @@ SECTIONS
#include <linker/common-ram.ld>

#include <linker/kobject.ld>
#include <linker/cplusplus-ram.ld>

MMU_PAGE_ALIGN
__data_ram_end = .;
Expand Down
6 changes: 5 additions & 1 deletion include/arch/x86/intel64/linker.ld
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,12 @@ SECTIONS
#include <custom-rodata.ld>
#endif /* CONFIG_CUSTOM_RODATA_LD */

} GROUP_LINK_IN(ROMABLE_REGION)

#include <linker/cplusplus-rom.ld>

_image_rodata_end = .;
_image_rodata_size = _image_rodata_end - _image_rodata_start;
} GROUP_LINK_IN(ROMABLE_REGION)

SECTION_PROLOGUE(_DATA_SECTION_NAME,,ALIGN(16))
{
Expand All @@ -70,6 +73,7 @@ SECTIONS

#include <snippets-ram-sections.ld>
#include <linker/common-ram.ld>
#include <linker/cplusplus-ram.ld>

SECTION_PROLOGUE(_BSS_SECTION_NAME, (NOLOAD), ALIGN(16))
{
Expand Down
12 changes: 12 additions & 0 deletions include/linker/cplusplus-ram.ld
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Copyright (c) 2019 Jan Van Winkel <[email protected]>
*
* SPDX-License-Identifier: Apache-2.0
*/

#if defined (CONFIG_CPLUSPLUS)
SECTION_PROLOGUE(.gcc_except_table,,ONLY_IF_RW)
{
*(.gcc_except_table .gcc_except_table.*)
} GROUP_LINK_IN(RAMABLE_REGION)
#endif
12 changes: 12 additions & 0 deletions include/linker/cplusplus-rom.ld
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Copyright (c) 2019 Jan Van Winkel <[email protected]>
*
* SPDX-License-Identifier: Apache-2.0
*/

#if defined (CONFIG_CPLUSPLUS)
SECTION_PROLOGUE(.gcc_except_table,,ONLY_IF_RO)
{
*(.gcc_except_table .gcc_except_table.*)
} GROUP_LINK_IN(ROMABLE_REGION)
#endif
3 changes: 3 additions & 0 deletions soc/riscv/openisa_rv32m1/linker.ld
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ SECTIONS

} GROUP_LINK_IN(ROMABLE_REGION)

#include <linker/cplusplus-rom.ld>

_image_rodata_end = .;
_image_rom_end = .;

Expand Down Expand Up @@ -202,6 +204,7 @@ SECTIONS
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)

#include <linker/common-ram.ld>
#include <linker/cplusplus-ram.ld>

__data_ram_end = .;
__data_rom_start = LOADADDR(_DATA_SECTION_NAME);
Expand Down
2 changes: 1 addition & 1 deletion soc/xtensa/esp32/linker.ld
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ SECTIONS
*(.rodata1)
__XT_EXCEPTION_TABLE__ = ABSOLUTE(.);
KEEP (*(.xt_except_table))
KEEP (*(.gcc_except_table))
KEEP (*(.gcc_except_table .gcc_except_table.*))
*(.gnu.linkonce.e.*)
*(.gnu.version_r)
KEEP (*(.eh_frame))
Expand Down
2 changes: 1 addition & 1 deletion soc/xtensa/intel_s1000/linker.ld
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ SECTIONS
*(.rodata1)
__XT_EXCEPTION_TABLE__ = ABSOLUTE(.);
KEEP (*(.xt_except_table))
KEEP (*(.gcc_except_table))
KEEP (*(.gcc_except_table .gcc_except_table.*))
*(.gnu.linkonce.e.*)
*(.gnu.version_r)
KEEP (*(.eh_frame))
Expand Down
2 changes: 1 addition & 1 deletion soc/xtensa/sample_controller/linker.ld
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ SECTIONS
*(.rodata1)
__XT_EXCEPTION_TABLE__ = ABSOLUTE(.);
KEEP (*(.xt_except_table))
KEEP (*(.gcc_except_table))
KEEP (*(.gcc_except_table .gcc_except_table.*))
*(.gnu.linkonce.e.*)
*(.gnu.version_r)
KEEP (*(.eh_frame))
Expand Down
7 changes: 7 additions & 0 deletions tests/application_development/libcxx/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,10 @@ tests:
arch_exclude: posix
platform_exclude: qemu_x86_coverage qemu_x86_64
tags: cpp
misc.app_dev.libcxx.exceptions:
arch_exclude: posix
platform_exclude: qemu_x86_coverage qemu_x86_64 96b_meerkat96
colibri_imx7d_m4 warp7_m4 pico_pi_m4 qemu_x86_long
tags: cpp
extra_configs:
- CONFIG_EXCEPTIONS=y