zipl/boot: declare that no executable stack is required

Normally, `gcc` takes care of adding the `GNU_STACK` marking except for
assembly code. Therefore, let's add the marking manually. Discard the
`.note.GNU-stack` section in the linker script since it's just a
"message" from the compiler to the linker. This fixes the linker
warning:

ld: warning: entry.o: missing .note.GNU-stack section implies executable stack

Acked-by: Eduard Shishkin <edward6@linux.ibm.com>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Marc Hartmayer
2023-01-10 12:26:49 +00:00
committed by Jan Höppner
parent 746a703079
commit 3d168fac14
4 changed files with 12 additions and 0 deletions

View File

@@ -18,3 +18,8 @@ pgm_check_handler:
basr %r14,%r14
lmg %r0,%r15,__LC_SAVE_AREA_SYNC
lpswe __LC_PGM_OLD_PSW(%r0)
/* The code doesn't require an executable stack */
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
#endif

View File

@@ -28,3 +28,8 @@ _start:
brasl %r14,initialize
.Lstack: .long 0x10000-160
.previous
/* The code doesn't require an executable stack */
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
#endif

View File

@@ -94,5 +94,6 @@ SECTIONS
/DISCARD/ : {
*(.eh_frame)
*(.interp)
*(.note.GNU-stack)
}
}

View File

@@ -79,5 +79,6 @@ SECTIONS
/DISCARD/ : {
*(.eh_frame)
*(.interp)
*(.note.GNU-stack)
}
}