]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[arm] Inhibit linker warnings about an implied executable stack
authorMichael Brown <mcb30@ipxe.org>
Mon, 23 Jan 2023 12:30:41 +0000 (12:30 +0000)
committerMichael Brown <mcb30@ipxe.org>
Mon, 23 Jan 2023 12:55:44 +0000 (12:55 +0000)
Some versions of the 32-bit ARM linker seem to treat the absence of a
.note.GNU-stack section as implying an executable stack, and will
print a warning that this is deprecated behaviour.

Silence the warning by adding a .note.GNU-stack section to each
assembly file and retaining the sections in the Linux linker script.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/arm32/core/setjmp.S
src/arch/arm32/libgcc/lldivmod.S
src/arch/arm32/libgcc/llshift.S
src/scripts/linux.lds

index 7e7b0fe583190919d4d20b249a589029ed3d323b..1e9e82029f8ed563943ff95dc103ccc4b5255495 100644 (file)
@@ -1,5 +1,6 @@
 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
 
+       .section ".note.GNU-stack", "", %progbits
        .text
        .arm
 
index 910be4b781314edda02a3c913c6c1027c98c55a5..746fa8fde18f0818bde7072af97c4417acd7f1f4 100644 (file)
@@ -1,5 +1,6 @@
 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
 
+       .section ".note.GNU-stack", "", %progbits
        .text
        .thumb
 
index cc16e261537453a2b2aac563d624395229569cfd..c1b51e77827248ca33f707ecf0a27df2bfeda98a 100644 (file)
@@ -1,5 +1,6 @@
 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
 
+       .section ".note.GNU-stack", "", %progbits
        .text
        .arm
 
index afc0128f8e4682218287346072b9a0ee29bef331..53e884ec56ab738c5239c70015bc6536a4ae6e02 100644 (file)
@@ -81,16 +81,13 @@ SECTIONS {
        _assert = ASSERT ( ( _weak == _eweak ), ".weak is non-zero length" );
 
        /*
-        * Dispose of the comment and note sections to make the link map
-        * easier to read
+        * Dispose of unwanted sections to make the link map easier to read
         *
         */
 
        /DISCARD/ : {
                *(.comment)
                *(.comment.*)
-               *(.note)
-               *(.note.*)
                *(.rel)
                *(.rel.*)
                *(.discard)