From: Michael Brown <mcb30@ipxe.org>
Date: Sun, 14 Jan 2024 11:51:16 +0000
Subject: [build] Remove unnecessary ".text" directives (bsc#1219733,
 bsc#1219722)

The .text directive is entirely redundant when followed by a .section
directive giving an explicit section name and attributes.

Remove these unnecessary directives to simplify the code.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
(cherry picked from commit e66552eeede19a91b1a52468a550b58fd031777b)
References: bsc#1219733
References: bsc#1219722
Signed-off-by: Dario Faggioli <dfaggioli@suse.com>
---
 src/arch/arm32/libgcc/lldivmod.S            | 1 -
 src/arch/arm32/libgcc/llshift.S             | 1 -
 src/arch/x86/core/patch_cf.S                | 1 -
 src/arch/x86/drivers/net/undiisr.S          | 1 -
 src/arch/x86/interface/pcbios/e820mangler.S | 1 -
 src/arch/x86/prefix/bootpart.S              | 1 -
 src/arch/x86/prefix/dskprefix.S             | 1 -
 src/arch/x86/prefix/exeprefix.S             | 1 -
 src/arch/x86/prefix/hdprefix.S              | 1 -
 src/arch/x86/prefix/lkrnprefix.S            | 1 -
 src/arch/x86/prefix/mbr.S                   | 1 -
 src/arch/x86/prefix/mromprefix.S            | 1 -
 src/arch/x86/prefix/nbiprefix.S             | 1 -
 src/arch/x86/prefix/nullprefix.S            | 1 -
 src/arch/x86/prefix/pxeprefix.S             | 1 -
 src/arch/x86/prefix/rawprefix.S             | 1 -
 src/arch/x86/prefix/romprefix.S             | 1 -
 src/arch/x86/prefix/undiloader.S            | 1 -
 src/arch/x86/prefix/unlzma.S                | 1 -
 src/arch/x86/prefix/usbdisk.S               | 1 -
 src/arch/x86/transitions/libkir.S           | 1 -
 21 files changed, 21 deletions(-)

diff --git a/roms/ipxe/src/arch/arm32/libgcc/lldivmod.S b/roms/ipxe/src/arch/arm32/libgcc/lldivmod.S
index 746fa8fde18f0818bde7072af97c..c9c224506201f71616ad8ea2d4c5 100644
--- a/roms/ipxe/src/arch/arm32/libgcc/lldivmod.S
+++ b/roms/ipxe/src/arch/arm32/libgcc/lldivmod.S
@@ -1,7 +1,6 @@
 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
 
 	.section ".note.GNU-stack", "", %progbits
-	.text
 	.thumb
 
 /**
diff --git a/roms/ipxe/src/arch/arm32/libgcc/llshift.S b/roms/ipxe/src/arch/arm32/libgcc/llshift.S
index c1b51e77827248ca33f707ecf0a2..592e28e65d9bce486947a804df07 100644
--- a/roms/ipxe/src/arch/arm32/libgcc/llshift.S
+++ b/roms/ipxe/src/arch/arm32/libgcc/llshift.S
@@ -1,7 +1,6 @@
 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
 
 	.section ".note.GNU-stack", "", %progbits
-	.text
 	.arm
 
 /**
diff --git a/roms/ipxe/src/arch/x86/core/patch_cf.S b/roms/ipxe/src/arch/x86/core/patch_cf.S
index 63730c3fd6156f734a8c08fcd9d1..ebf62876902c7b2abc5e96f967fa 100644
--- a/roms/ipxe/src/arch/x86/core/patch_cf.S
+++ b/roms/ipxe/src/arch/x86/core/patch_cf.S
@@ -23,7 +23,6 @@
 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
 
 	.section ".note.GNU-stack", "", @progbits
-	.text
 	.arch i386
 	.code16
 
diff --git a/roms/ipxe/src/arch/x86/drivers/net/undiisr.S b/roms/ipxe/src/arch/x86/drivers/net/undiisr.S
index a1098b8396e130de1ac3d16a10d8..aa8991d77bc492a5aced68e0af1a 100644
--- a/roms/ipxe/src/arch/x86/drivers/net/undiisr.S
+++ b/roms/ipxe/src/arch/x86/drivers/net/undiisr.S
@@ -11,7 +11,6 @@ FILE_LICENCE ( GPL2_OR_LATER )
 #define PIC2_ICR 0xa0
 	
 	.section ".note.GNU-stack", "", @progbits
-	.text
 	.arch i386
 	.code16
 
diff --git a/roms/ipxe/src/arch/x86/interface/pcbios/e820mangler.S b/roms/ipxe/src/arch/x86/interface/pcbios/e820mangler.S
index 22dd3b15d4607c3c7213288a6b40..8d782dc4ba0652dd94bad2d3275b 100644
--- a/roms/ipxe/src/arch/x86/interface/pcbios/e820mangler.S
+++ b/roms/ipxe/src/arch/x86/interface/pcbios/e820mangler.S
@@ -24,7 +24,6 @@
 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
 
 	.section ".note.GNU-stack", "", @progbits
-	.text
 	.arch i386
 	.code16
 
diff --git a/roms/ipxe/src/arch/x86/prefix/bootpart.S b/roms/ipxe/src/arch/x86/prefix/bootpart.S
index 575cb1c07182ec690baca8d754eb..cf75ff79359cd6ee8f0b03abe49b 100644
--- a/roms/ipxe/src/arch/x86/prefix/bootpart.S
+++ b/roms/ipxe/src/arch/x86/prefix/bootpart.S
@@ -6,7 +6,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
 #define STACK_SIZE	0x2000
 	
 	.section ".note.GNU-stack", "", @progbits
-	.text
 	.arch i386
 	.section ".prefix", "awx", @progbits
 	.code16
diff --git a/roms/ipxe/src/arch/x86/prefix/dskprefix.S b/roms/ipxe/src/arch/x86/prefix/dskprefix.S
index bc19488798674d1be687bac1108b..f9d301956ae2d6abb664a2adc9f8 100644
--- a/roms/ipxe/src/arch/x86/prefix/dskprefix.S
+++ b/roms/ipxe/src/arch/x86/prefix/dskprefix.S
@@ -27,7 +27,6 @@ FILE_LICENCE ( GPL2_ONLY )
 	.section ".note.GNU-stack", "", @progbits
 	.org	0
 	.arch i386
-	.text
 	.section ".prefix", "ax", @progbits
 	.code16
 	.globl	_dsk_start
diff --git a/roms/ipxe/src/arch/x86/prefix/exeprefix.S b/roms/ipxe/src/arch/x86/prefix/exeprefix.S
index e257ed1b5ccf849a208f61f7f5a5..773cccf3a982fa2ccbca5846072b 100644
--- a/roms/ipxe/src/arch/x86/prefix/exeprefix.S
+++ b/roms/ipxe/src/arch/x86/prefix/exeprefix.S
@@ -37,7 +37,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
 #define PSP_CMDLINE_START 0x81
 
 	.section ".note.GNU-stack", "", @progbits
-	.text
 	.arch i386
 	.org 0
 	.code16
diff --git a/roms/ipxe/src/arch/x86/prefix/hdprefix.S b/roms/ipxe/src/arch/x86/prefix/hdprefix.S
index fbf8d2e47d855baf1b8d1827371c..1bbf72dd283c4926feb21154f234 100644
--- a/roms/ipxe/src/arch/x86/prefix/hdprefix.S
+++ b/roms/ipxe/src/arch/x86/prefix/hdprefix.S
@@ -3,7 +3,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
 #include <librm.h>
 
 	.section ".note.GNU-stack", "", @progbits
-	.text
 	.arch i386
 	.section ".prefix", "awx", @progbits
 	.code16
diff --git a/roms/ipxe/src/arch/x86/prefix/lkrnprefix.S b/roms/ipxe/src/arch/x86/prefix/lkrnprefix.S
index 2c17f79df755b99d4e87422048b9..9f1a2f09bf147834160297a46f87 100644
--- a/roms/ipxe/src/arch/x86/prefix/lkrnprefix.S
+++ b/roms/ipxe/src/arch/x86/prefix/lkrnprefix.S
@@ -5,7 +5,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
 #define BZI_LOAD_HIGH_ADDR 0x100000
 
 	.section ".note.GNU-stack", "", @progbits
-	.text
 	.arch i386
 	.code16
 	.section ".prefix", "ax", @progbits
diff --git a/roms/ipxe/src/arch/x86/prefix/mbr.S b/roms/ipxe/src/arch/x86/prefix/mbr.S
index 928bb338bcbbc6d84428941bb5b4..b37eed714bfb38d8f0408c9218da 100644
--- a/roms/ipxe/src/arch/x86/prefix/mbr.S
+++ b/roms/ipxe/src/arch/x86/prefix/mbr.S
@@ -1,7 +1,6 @@
 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
 
 	.section ".note.GNU-stack", "", @progbits
-	.text
 	.arch i386
 	.section ".prefix", "awx", @progbits
 	.code16
diff --git a/roms/ipxe/src/arch/x86/prefix/mromprefix.S b/roms/ipxe/src/arch/x86/prefix/mromprefix.S
index a3e0d69a05915dde9caa3ef00969..0b2a0d2a64073477f60f32877023 100644
--- a/roms/ipxe/src/arch/x86/prefix/mromprefix.S
+++ b/roms/ipxe/src/arch/x86/prefix/mromprefix.S
@@ -42,7 +42,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
 #include "pciromprefix.S"
 
 	.section ".note.GNU-stack", "", @progbits
-	.text
 	.arch i386
 	.code16
 
diff --git a/roms/ipxe/src/arch/x86/prefix/nbiprefix.S b/roms/ipxe/src/arch/x86/prefix/nbiprefix.S
index cae1009b3e37e76a063ad3d04386..0a74ca718e2a8a546558cfb96d5d 100644
--- a/roms/ipxe/src/arch/x86/prefix/nbiprefix.S
+++ b/roms/ipxe/src/arch/x86/prefix/nbiprefix.S
@@ -3,7 +3,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
 #include <librm.h>
 
 	.section ".note.GNU-stack", "", @progbits
-	.text
 	.arch i386
 	.code16
 	.section ".prefix", "ax", @progbits
diff --git a/roms/ipxe/src/arch/x86/prefix/nullprefix.S b/roms/ipxe/src/arch/x86/prefix/nullprefix.S
index 1568188d0753bd070e892947f16d..bbc697fd292f0427fb4d8bd7e93b 100644
--- a/roms/ipxe/src/arch/x86/prefix/nullprefix.S
+++ b/roms/ipxe/src/arch/x86/prefix/nullprefix.S
@@ -2,7 +2,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
 
 	.section ".note.GNU-stack", "", @progbits
 	.org	0
-	.text
 	.arch i386
 
 	.section ".prefix", "ax", @progbits
diff --git a/roms/ipxe/src/arch/x86/prefix/pxeprefix.S b/roms/ipxe/src/arch/x86/prefix/pxeprefix.S
index 494fbc138e970e1cecc902596b70..c62a5011755ce6b4f8a790474ae0 100644
--- a/roms/ipxe/src/arch/x86/prefix/pxeprefix.S
+++ b/roms/ipxe/src/arch/x86/prefix/pxeprefix.S
@@ -12,7 +12,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
 #define PXE_HACK_EB54			0x0001
 
 	.section ".note.GNU-stack", "", @progbits
-	.text
 	.arch i386
 	.org 0
 	.code16
diff --git a/roms/ipxe/src/arch/x86/prefix/rawprefix.S b/roms/ipxe/src/arch/x86/prefix/rawprefix.S
index 4a3d350423120f0301cb72401f65..d97b3b512bc743506a05a470ec64 100644
--- a/roms/ipxe/src/arch/x86/prefix/rawprefix.S
+++ b/roms/ipxe/src/arch/x86/prefix/rawprefix.S
@@ -9,7 +9,6 @@
 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
 
 	.section ".note.GNU-stack", "", @progbits
-	.text
 	.arch i386
 	.org 0
 	.code16
diff --git a/roms/ipxe/src/arch/x86/prefix/romprefix.S b/roms/ipxe/src/arch/x86/prefix/romprefix.S
index 48f417a5f11321231c51d41d1e4c..1f0259812336ed8a6367273837cf 100644
--- a/roms/ipxe/src/arch/x86/prefix/romprefix.S
+++ b/roms/ipxe/src/arch/x86/prefix/romprefix.S
@@ -55,7 +55,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
 #endif
 
 	.section ".note.GNU-stack", "", @progbits
-	.text
 	.code16
 	.arch i386
 	.section ".prefix", "ax", @progbits
diff --git a/roms/ipxe/src/arch/x86/prefix/undiloader.S b/roms/ipxe/src/arch/x86/prefix/undiloader.S
index e544d5048fd3abd8d498cb3f87ea..33573230bfca464d1e0ba37a39de 100644
--- a/roms/ipxe/src/arch/x86/prefix/undiloader.S
+++ b/roms/ipxe/src/arch/x86/prefix/undiloader.S
@@ -3,7 +3,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
 #include <librm.h>
 
 	.section ".note.GNU-stack", "", @progbits
-	.text
 	.code16
 	.arch i386
 	.section ".prefix", "ax", @progbits
diff --git a/roms/ipxe/src/arch/x86/prefix/unlzma.S b/roms/ipxe/src/arch/x86/prefix/unlzma.S
index 2a7cde130260562fdfdb77f44843..9b3ecf8a64461ce074e43caef971 100644
--- a/roms/ipxe/src/arch/x86/prefix/unlzma.S
+++ b/roms/ipxe/src/arch/x86/prefix/unlzma.S
@@ -44,7 +44,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
  */
 
 	.section ".note.GNU-stack", "", @progbits
-	.text
 	.arch i486
 	.section ".prefix.lib", "ax", @progbits
 
diff --git a/roms/ipxe/src/arch/x86/prefix/usbdisk.S b/roms/ipxe/src/arch/x86/prefix/usbdisk.S
index 7400e41a78665e17506afb89617c..43f7632d54731edd7e84bccb6a3b 100644
--- a/roms/ipxe/src/arch/x86/prefix/usbdisk.S
+++ b/roms/ipxe/src/arch/x86/prefix/usbdisk.S
@@ -1,7 +1,6 @@
 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
 
 	.section ".note.GNU-stack", "", @progbits
-	.text
 	.arch i386
 	.section ".prefix", "awx", @progbits
 	.code16
diff --git a/roms/ipxe/src/arch/x86/transitions/libkir.S b/roms/ipxe/src/arch/x86/transitions/libkir.S
index af090b266083ad5b79819f9a5852..5909654c2fa07c0ff20fafe00b6a 100644
--- a/roms/ipxe/src/arch/x86/transitions/libkir.S
+++ b/roms/ipxe/src/arch/x86/transitions/libkir.S
@@ -32,7 +32,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
 #define BOCHSBP xchgw %bx, %bx
 
 	.section ".note.GNU-stack", "", @progbits
-	.text
 	.arch i386
 	.section ".text16", "awx", @progbits
 	.code16
