[PATCH 10/17] x86/boot: Drop workaround for binutils 2.14 in linker script ASSERTs

From: Ard Biesheuvel
Date: Fri Aug 18 2023 - 09:46:25 EST


The minimum binutils version was bumped to 2.20 in 2017 so there is no
longer a need to work around quirks in older versions than that. So drop
some meaningless linker script assignments to '.' of ASSERT() return
values.

Signed-off-by: Ard Biesheuvel <ardb@xxxxxxxxxx>
---
arch/x86/boot/setup.ld | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/arch/x86/boot/setup.ld b/arch/x86/boot/setup.ld
index b11c45b9e51ed90e..a05dcaa4b74cd9f8 100644
--- a/arch/x86/boot/setup.ld
+++ b/arch/x86/boot/setup.ld
@@ -56,12 +56,8 @@ SECTIONS
*(.note*)
}

- /*
- * The ASSERT() sink to . is intentional, for binutils 2.14 compatibility:
- */
- . = ASSERT(_end <= 0x8000, "Setup too big!");
- . = ASSERT(hdr == 0x1f1, "The setup header has the wrong offset!");
+ ASSERT(_end <= 0x8000, "Setup too big!")
+ ASSERT(hdr == 0x1f1, "The setup header has the wrong offset!")
/* Necessary for the very-old-loader check to work... */
- . = ASSERT(__end_init <= 5*512, "init sections too big!");
-
+ ASSERT(__end_init <= 5*512, "init sections too big!")
}
--
2.39.2