firmware: Fix placement of .align directives

Move the .align directives after switching the section.  We want to align
the start of the current section, not the end of the previous section.
This also obsoletes the misguided workaround of disabling relaxation.

Signed-off-by: Andreas Schwab <schwab@suse.de>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
This commit is contained in:
Andreas Schwab
2020-01-09 12:49:38 +01:00
committed by Anup Patel
parent f95dd39ab6
commit 6ffe1bed09
5 changed files with 34 additions and 44 deletions

View File

@@ -11,14 +11,14 @@
#include "fw_base.S"
.align 3
.section .entry, "ax", %progbits
.align 3
_bad_dynamic_info:
wfi
j _bad_dynamic_info
.align 3
.section .entry, "ax", %progbits
.align 3
.global fw_boot_hart
/*
* This function is called very early even before
@@ -43,8 +43,8 @@ fw_boot_hart:
2: li a0, -1
ret
.align 3
.section .entry, "ax", %progbits
.align 3
.global fw_save_info
/*
* We can only use a0, a1, a2, a3, and a4 registers here.
@@ -86,8 +86,8 @@ fw_save_info:
2:
ret
.align 3
.section .entry, "ax", %progbits
.align 3
.global fw_prev_arg1
/*
* We can only use a0, a1, and a2 registers here.
@@ -99,8 +99,8 @@ fw_prev_arg1:
add a0, zero, zero
ret
.align 3
.section .entry, "ax", %progbits
.align 3
.global fw_next_arg1
/*
* We can only use a0, a1, and a2 registers here.
@@ -113,8 +113,8 @@ fw_next_arg1:
REG_L a0, (a0)
ret
.align 3
.section .entry, "ax", %progbits
.align 3
.global fw_next_addr
/*
* We can only use a0, a1, and a2 registers here.
@@ -125,8 +125,8 @@ fw_next_addr:
REG_L a0, (a0)
ret
.align 3
.section .entry, "ax", %progbits
.align 3
.global fw_next_mode
/*
* We can only use a0, a1, and a2 registers here.
@@ -137,8 +137,8 @@ fw_next_mode:
REG_L a0, (a0)
ret
.align 3
.section .entry, "ax", %progbits
.align 3
.global fw_options
/*
* We can only use a0, a1, and a2 registers here.
@@ -150,8 +150,8 @@ fw_options:
REG_L a0, (a0)
ret
.align 3
.section .entry, "ax", %progbits
.align 3
_dynamic_next_arg1:
RISCV_PTR 0x0
_dynamic_next_addr: