FreeRTOS_Plus_TCP_Echo_Qemu_mps2: fix compile with "gcc -flto" (#1343)

FreeRTOS_Plus_TCP_Echo_Qemu_mps2: fix compile with "gcc -flto"
by adding "__attribute__( used )" to isr_vector and _fstat().

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
This commit is contained in:
Florian La Roche
2025-04-28 22:52:16 +02:00
committed by GitHub
parent 0cbfaab47d
commit 0d2a5ae534
2 changed files with 2 additions and 2 deletions

View File

@ -167,7 +167,7 @@ static void Default_Handler6( void )
}
}
const uint32_t * const isr_vector[] __attribute__( ( section( ".isr_vector" ) ) ) =
const uint32_t * const isr_vector[] __attribute__( ( section( ".isr_vector" ), used ) ) =
{
( uint32_t * ) &_estack,
( uint32_t * ) &Reset_Handler, /* Reset -15 */

View File

@ -30,7 +30,7 @@ extern "C" {
#include <sys/types.h>
void uart_init( void );
int _fstat( int file );
__attribute__( ( used ) ) int _fstat( int file );
int _read( int file,
char * buf,
int len );