mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
lib_stackchk.c: a duplicate implementation error reported during compilation
Mark __stack_chk_guard and __stack_chk_fail as weak symbols to prevent linker conflicts when multiple definitions of these stack protection symbols exist across different compilation units. Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
parent
7801c46a0d
commit
2ec1bff4e3
1 changed files with 2 additions and 2 deletions
|
|
@ -30,7 +30,7 @@
|
|||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
FAR const void *const __stack_chk_guard = &__stack_chk_guard;
|
||||
weak_data FAR const void *const __stack_chk_guard = &__stack_chk_guard;
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
|
|
@ -52,7 +52,7 @@ FAR const void *const __stack_chk_guard = &__stack_chk_guard;
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
void __stack_chk_fail(void)
|
||||
void weak_function __stack_chk_fail(void)
|
||||
{
|
||||
PANIC();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue