firmware: payloads: Optimize usage of "ALIGN"
authorLeizheng Zhang <zhangleizheng@eswincomputing.com>
Mon, 21 Nov 2022 08:26:22 +0000 (16:26 +0800)
committerAnup Patel <anup@brainfault.org>
Tue, 22 Nov 2022 05:50:11 +0000 (11:20 +0530)
Delete the redundant "ALIGN" and adjust the position of "ALIGN"

Signed-off-by: Leizheng Zhang <zhangleizheng@eswincomputing.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Reviewed-by: Bin Meng <bmeng@tinylab.org>
firmware/fw_base.ldS
firmware/payloads/test.elf.ldS

index 220c043e9d3d7d7daa682f3485cf86b8ad9be663..563ae252a3d3335e76da32fdb0159da4ead75609 100644 (file)
                PROVIDE(_text_end = .);
        }
 
-       . = ALIGN(0x1000); /* Ensure next section is page aligned */
-
        /* End of the code sections */
 
-       /* Beginning of the read-only data sections */
-
        . = ALIGN(0x1000); /* Ensure next section is page aligned */
 
+       /* Beginning of the read-only data sections */
+
        .rodata :
        {
                PROVIDE(_rodata_start = .);
 
        /* End of the read-only data sections */
 
-       /* Beginning of the read-write data sections */
-
        . = ALIGN(0x1000); /* Ensure next section is page aligned */
 
+       /* Beginning of the read-write data sections */
+
        .data :
        {
                PROVIDE(_data_start = .);
index f3f3242abc840cc02a314a61fba05b51dac70ed1..2328a1b782dae068f5f0a5f1233c52338ea41538 100644 (file)
@@ -33,14 +33,12 @@ SECTIONS
                PROVIDE(_text_end = .);
        }
 
-       . = ALIGN(0x1000); /* Ensure next section is page aligned */
-
        /* End of the code sections */
 
-       /* Beginning of the read-only data sections */
-
        . = ALIGN(0x1000); /* Ensure next section is page aligned */
 
+       /* Beginning of the read-only data sections */
+
        .rodata :
        {
                PROVIDE(_rodata_start = .);
@@ -51,10 +49,10 @@ SECTIONS
 
        /* End of the read-only data sections */
 
-       /* Beginning of the read-write data sections */
-
        . = ALIGN(0x1000); /* Ensure next section is page aligned */
 
+       /* Beginning of the read-write data sections */
+
        .data :
        {
                PROVIDE(_data_start = .);