From 21b10441c36957d19cd9efef54a900e9ee164b0d Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 10 Jun 2022 16:38:57 -0700 Subject: core/cortex-m[0]: Remove C++ exception unwind stubs These symbols should only be needed for unwinding C++ exceptions: https://sourceware.org/binutils/docs/as/ARM-Unwinding-Tutorial.html It's unclear why these are here since we're not compiling with C++ at this point. The code was introduced in commit e24fa592d2a215d8ae67917c1d89e68cdf847a03, which doesn't provide any details. Once we start compiling C++, these definitions cause problems since they conflict with the real symbols in libunwind. BRANCH=none BUG=b:234181908 TEST=make buildall Signed-off-by: Tom Hughes Change-Id: I085ba56a822cae4b02991a9e5395aba60ec8bad7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3701131 Reviewed-by: Denis Brockus --- core/cortex-m/init.S | 9 --------- core/cortex-m0/init.S | 9 --------- 2 files changed, 18 deletions(-) diff --git a/core/cortex-m/init.S b/core/cortex-m/init.S index bc650c4c64..70f6df1edd 100644 --- a/core/cortex-m/init.S +++ b/core/cortex-m/init.S @@ -117,15 +117,6 @@ _data_end: _data_lma_start: .long __data_lma_start -/* Mock functions to avoid linker complaints */ -.global __aeabi_unwind_cpp_pr0 -.global __aeabi_unwind_cpp_pr1 -.global __aeabi_unwind_cpp_pr2 -__aeabi_unwind_cpp_pr0: -__aeabi_unwind_cpp_pr1: -__aeabi_unwind_cpp_pr2: - bx lr - /* Reserve space for system stack */ .section .bss.system_stack stack_start: diff --git a/core/cortex-m0/init.S b/core/cortex-m0/init.S index 5047d18380..15446552bd 100644 --- a/core/cortex-m0/init.S +++ b/core/cortex-m0/init.S @@ -111,15 +111,6 @@ _data_end: _data_lma_start: .long __data_lma_start -/* Mock functions to avoid linker complaints */ -.global __aeabi_unwind_cpp_pr0 -.global __aeabi_unwind_cpp_pr1 -.global __aeabi_unwind_cpp_pr2 -__aeabi_unwind_cpp_pr0: -__aeabi_unwind_cpp_pr1: -__aeabi_unwind_cpp_pr2: - bx lr - /* Reserve space for system stack */ .section .bss.system_stack stack_start: -- cgit v1.2.1