From: zhangleizheng@eswincomputing.com Date: Mon, 21 Nov 2022 16:26:22 +0800 Subject: [PATCH v2] firmware: payloads: Optimize usage of "ALIGN" Message-ID: <20221121082622.1495-1-zhangleizheng@eswincomputing.com> List-Id: To: opensbi@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit From: Leizheng Zhang Delete the redundant "ALIGN" and adjust the position of "ALIGN" Signed-off-by: Leizheng Zhang --- firmware/fw_base.ldS | 10 ++++------ firmware/payloads/test.elf.ldS | 12 +++++------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/firmware/fw_base.ldS b/firmware/fw_base.ldS index 220c043..5ea549f 100644 --- a/firmware/fw_base.ldS +++ b/firmware/fw_base.ldS @@ -24,13 +24,11 @@ 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 */ - . = ALIGN(0x1000); /* Ensure next section is page aligned */ + /* Beginning of the read-only data sections */ .rodata : { @@ -42,10 +40,10 @@ /* 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 = .); diff --git a/firmware/payloads/test.elf.ldS b/firmware/payloads/test.elf.ldS index f3f3242..8d18a9c 100644 --- a/firmware/payloads/test.elf.ldS +++ b/firmware/payloads/test.elf.ldS @@ -33,13 +33,11 @@ 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 */ - . = ALIGN(0x1000); /* Ensure next section is page aligned */ + /* Beginning of the read-only data sections */ .rodata : { @@ -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 */ + . = ALIGN(0x1000); /* Ensure next section is page aligned */ + /* Beginning of the read-write data sections */ + .data : { PROVIDE(_data_start = .); -- 2.17.1