mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
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:
committed by
Jan Höppner
parent
746a703079
commit
3d168fac14
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -94,5 +94,6 @@ SECTIONS
|
||||
/DISCARD/ : {
|
||||
*(.eh_frame)
|
||||
*(.interp)
|
||||
*(.note.GNU-stack)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,5 +79,6 @@ SECTIONS
|
||||
/DISCARD/ : {
|
||||
*(.eh_frame)
|
||||
*(.interp)
|
||||
*(.note.GNU-stack)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user