From 37c82f2f7aa6f4393951bf7b558c4d0b4c928f63 Mon Sep 17 00:00:00 2001 From: valeklubomir Date: Wed, 19 Oct 2022 14:51:59 +0200 Subject: [PATCH] Linker script fix for CPP Support --- b_full.sh | 5 +++-- b_rebuild.sh | 3 ++- platforms/bk7231n/bk7231n_os/beken378/build/bk7231_ota.ld | 6 ++++-- .../bk7231n/bk7231n_os/beken378/build/bk7231n_ota.ld | 8 +++++--- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/b_full.sh b/b_full.sh index ff87091e..2fdf2e47 100755 --- a/b_full.sh +++ b/b_full.sh @@ -1,4 +1,5 @@ #!/bin/bash -./build_app.sh apps/OpenBK7231N_App OpenBK7231N_App 1.0.2 clean -./build_app.sh apps/OpenBK7231N_App OpenBK7231N_App 1.0.2 +./build_app.sh apps/OpenBK7231N_App OpenBK7231N_App 1.0.3 clean +./build_app.sh apps/OpenBK7231N_App OpenBK7231N_App 1.0.3 +cp -f apps/OpenBK7231N_App/output/1.0.3/OpenBK7231N_App_1.0.3.rbl /var/www/OpenBK7231N_App_1.0.3.rbl diff --git a/b_rebuild.sh b/b_rebuild.sh index 88af6140..3dc49525 100755 --- a/b_rebuild.sh +++ b/b_rebuild.sh @@ -1,3 +1,4 @@ #!/bin/bash -./build_app.sh apps/OpenBK7231N_App OpenBK7231N_App 1.0.2 +./build_app.sh apps/OpenBK7231N_App OpenBK7231N_App 1.0.3 +cp -f apps/OpenBK7231N_App/output/1.0.3/OpenBK7231N_App_1.0.3.rbl /var/www/OpenBK7231N_App_1.0.3.rbl diff --git a/platforms/bk7231n/bk7231n_os/beken378/build/bk7231_ota.ld b/platforms/bk7231n/bk7231n_os/beken378/build/bk7231_ota.ld index 5213525e..852f3938 100755 --- a/platforms/bk7231n/bk7231n_os/beken378/build/bk7231_ota.ld +++ b/platforms/bk7231n/bk7231n_os/beken378/build/bk7231_ota.ld @@ -71,12 +71,14 @@ SECTIONS *(.rodata.*) *(.gnu.linkonce.r*) } > flash - + + __exidx_start = .; .ARM.exidx : { *(.ARM.exidx*) *(.gnu.linkonce.armexidx.*) } > flash + __exidx_end = .; /* globals.for example: int ram_data[3]={4,5,6}; */ /* VMA in RAM, but keep LMA in flash */ _begin_data = .; @@ -121,4 +123,4 @@ SECTIONS libc.a libm.a libnosys.a - ) \ No newline at end of file + ) diff --git a/platforms/bk7231n/bk7231n_os/beken378/build/bk7231n_ota.ld b/platforms/bk7231n/bk7231n_os/beken378/build/bk7231n_ota.ld index 3c41f7a8..a45e32d1 100755 --- a/platforms/bk7231n/bk7231n_os/beken378/build/bk7231n_ota.ld +++ b/platforms/bk7231n/bk7231n_os/beken378/build/bk7231n_ota.ld @@ -122,13 +122,15 @@ SECTIONS *(.rodata.*) *(.gnu.linkonce.r*) } > flash - + + __exidx_start = .; .ARM.exidx : { *(.ARM.exidx*) *(.gnu.linkonce.armexidx.*) } > flash - + __exidx_end = .; + . = ORIGIN(tcm); .tcm ALIGN(8) : { @@ -559,4 +561,4 @@ SECTIONS libc.a libm.a libnosys.a - ) \ No newline at end of file + )