diff mbox series

riscv: align .preinit_array (bug 32228)

Message ID mvmed4y4zkr.fsf@suse.de
State New
Headers show
Series riscv: align .preinit_array (bug 32228) | expand

Commit Message

Andreas Schwab Oct. 2, 2024, 9:35 a.m. UTC
The section contains an array of pointers, so it should be aligned to
pointer size.
---
 sysdeps/riscv/start.S | 1 +
 1 file changed, 1 insertion(+)

Comments

Florian Weimer Oct. 2, 2024, 10:43 a.m. UTC | #1
* Andreas Schwab:

> The section contains an array of pointers, so it should be aligned to
> pointer size.
> ---
>  sysdeps/riscv/start.S | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/sysdeps/riscv/start.S b/sysdeps/riscv/start.S
> index ede186ef23..fd6f1ca038 100644
> --- a/sysdeps/riscv/start.S
> +++ b/sysdeps/riscv/start.S
> @@ -87,6 +87,7 @@ load_gp:
>  	ret
>  
>  	.section .preinit_array,"aw"
> +	.align PTRLOG
>  	.dc.a load_gp
>  
>  /* Define a symbol for the first piece of initialized data.  */
> -- 

Looks okay to me, thanks.

Florian
diff mbox series

Patch

diff --git a/sysdeps/riscv/start.S b/sysdeps/riscv/start.S
index ede186ef23..fd6f1ca038 100644
--- a/sysdeps/riscv/start.S
+++ b/sysdeps/riscv/start.S
@@ -87,6 +87,7 @@  load_gp:
 	ret
 
 	.section .preinit_array,"aw"
+	.align PTRLOG
 	.dc.a load_gp
 
 /* Define a symbol for the first piece of initialized data.  */