[PATCH u-boot-marvell v2 2/3] arm: Do not compile vector table when SYS_NO_VECTOR_TABLE is enabled

Stefan Roese sr at denx.de
Thu Apr 21 16:09:14 CEST 2022


On 4/6/22 16:20, Pali Rohár wrote:
> Vector table is not used when SYS_NO_VECTOR_TABLE is enabled.
> So do not compile it and reduce image size.
> 
> Signed-off-by: Pali Rohár <pali at kernel.org>

Applied to u-boot-marvell/master

Thanks,
Stefan

> ---
>   arch/arm/lib/vectors.S | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/arch/arm/lib/vectors.S b/arch/arm/lib/vectors.S
> index 56f36815582b..a54c84b062b1 100644
> --- a/arch/arm/lib/vectors.S
> +++ b/arch/arm/lib/vectors.S
> @@ -24,6 +24,7 @@
>   #else
>   	b	reset
>   #endif
> +#if !CONFIG_IS_ENABLED(SYS_NO_VECTOR_TABLE)
>   	ldr	pc, _undefined_instruction
>   	ldr	pc, _software_interrupt
>   	ldr	pc, _prefetch_abort
> @@ -31,6 +32,7 @@
>   	ldr	pc, _not_used
>   	ldr	pc, _irq
>   	ldr	pc, _fiq
> +#endif
>   	.endm
>   
>   
> @@ -87,6 +89,7 @@ _start:
>   	ARM_VECTORS
>   #endif /* !defined(CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK) */
>   
> +#if !CONFIG_IS_ENABLED(SYS_NO_VECTOR_TABLE)
>   /*
>    *************************************************************************
>    *
> @@ -118,6 +121,7 @@ _irq:			.word irq
>   _fiq:			.word fiq
>   
>   	.balignl 16,0xdeadbeef
> +#endif
>   
>   /*
>    *************************************************************************
> @@ -131,6 +135,7 @@ _fiq:			.word fiq
>   
>   #ifdef CONFIG_SPL_BUILD
>   
> +#if !CONFIG_IS_ENABLED(SYS_NO_VECTOR_TABLE)
>   	.align	5
>   undefined_instruction:
>   software_interrupt:
> @@ -141,6 +146,7 @@ irq:
>   fiq:
>   1:
>   	b	1b			/* hang and never return */
> +#endif
>   
>   #else	/* !CONFIG_SPL_BUILD */
>   

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de


More information about the U-Boot mailing list