Skip to content

Commit 0d2a5ae

Browse files
authored
FreeRTOS_Plus_TCP_Echo_Qemu_mps2: fix compile with "gcc -flto" (FreeRTOS#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 <[email protected]>
1 parent 0cbfaab commit 0d2a5ae

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/startup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ static void Default_Handler6( void )
167167
}
168168
}
169169

170-
const uint32_t * const isr_vector[] __attribute__( ( section( ".isr_vector" ) ) ) =
170+
const uint32_t * const isr_vector[] __attribute__( ( section( ".isr_vector" ), used ) ) =
171171
{
172172
( uint32_t * ) &_estack,
173173
( uint32_t * ) &Reset_Handler, /* Reset -15 */

FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/syscalls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ extern "C" {
3030
#include <sys/types.h>
3131

3232
void uart_init( void );
33-
int _fstat( int file );
33+
__attribute__( ( used ) ) int _fstat( int file );
3434
int _read( int file,
3535
char * buf,
3636
int len );

0 commit comments

Comments
 (0)