Fix LLVM libunwnwind _Unwind_Backtrace symbol version for ARM.

In original  GNU libgcc, _Unwind_Backtrace is published with GCC_3.3 version
for all architectures but ARM. For ARM should be publishes with GCC_4.3.0
version. This was originally omitted in r255095, fixed in r318024 and omitted
aging in LLVM libunwind implementation in r354347.

For ARM _Unwind_Backtrace should be published as default with GCC_4.3.0
version , (because this is right original version) and again as
normal(not-default) with GCC_3.3 version (to maintain ABI compatibility
compiled/linked with wrong pre r318024 libgcc)

PR:	233664
This commit is contained in:
Michal Meloun 2019-12-16 14:08:49 +00:00
parent c400abe5df
commit 1fa29c42bb
5 changed files with 15 additions and 3 deletions

View File

@ -182,8 +182,8 @@ _Unwind_Backtrace(_Unwind_Trace_Fn callback, void *ref) {
}
}
#ifdef __arm__
/* Preserve legacy libgcc ARM ABI mistake. */
__sym_compat(_Unwind_Backtrace, _Unwind_Backtrace, GCC_4.3.0);
/* Preserve legacy libgcc (pre r318024) ARM ABI mistake */
__sym_compat(_Unwind_Backtrace, _Unwind_Backtrace, GCC_3.3);
#endif

View File

@ -18,6 +18,8 @@ SYMBOL_MAPS= ${.CURDIR}/Symbol.map
# Export ARM AEABI unwind routines needed by libc and libthr.
.if exists(${.CURDIR}/${MACHINE_CPUARCH}/Symbol.map)
SYMBOL_MAPS+= ${.CURDIR}/${MACHINE_CPUARCH}/Symbol.map
.else
SYMBOL_MAPS+= ${.CURDIR}/SymbolDefault.map
.endif
.endif

View File

@ -86,7 +86,6 @@ GCC_3.0 {
};
GCC_3.3 {
_Unwind_Backtrace;
_Unwind_FindEnclosingFunction;
_Unwind_GetCFA;
_Unwind_Resume_or_Rethrow;

View File

@ -0,0 +1,7 @@
/*
* $FreeBSD$
*/
/* _Unwind_Backtrace should be exported with different version on ARM */
GCC_3.3 {
_Unwind_Backtrace;
};

View File

@ -10,3 +10,7 @@ GCC_3.5 {
__aeabi_unwind_cpp_pr2;
__gnu_unwind_frame;
};
GCC_4.3.0 {
_Unwind_Backtrace;
};