mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zipl/boot: discard .eh_frame and .interp input sections
The ELF section `.eh_frame` is used for frame unwinding during, for example, exception handling and the section `.interp` is used by the program interpreter. [1] Since no frame unwinding nor a program interpreter is used for the bootloaders we can discard these input section. The content of the (exec|bin) files don't change after this change. [1] https://refspecs.linuxfoundation.org/LSB_1.2.0/gLSB/specialsections.html 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
4aa5534f1d
commit
746a703079
@@ -88,6 +88,11 @@ SECTIONS
|
||||
}
|
||||
__stack_end = .;
|
||||
|
||||
.eh_frame : { *(.eh_frame) }
|
||||
.note.gnu.build-id : { *(.note.gnu.build-id) }
|
||||
|
||||
/* Sections to be discarded */
|
||||
/DISCARD/ : {
|
||||
*(.eh_frame)
|
||||
*(.interp)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,6 @@ SECTIONS
|
||||
__ex_table_start = .;
|
||||
.ex_table : { *(.ex_table) }
|
||||
__ex_table_stop = .;
|
||||
.eh_frame : { *(.eh_frame) }
|
||||
|
||||
__bss_start = .;
|
||||
.bss : { *(.bss) }
|
||||
@@ -75,4 +74,10 @@ SECTIONS
|
||||
.notes : {
|
||||
*(.note.*)
|
||||
}
|
||||
|
||||
/* Sections to be discarded */
|
||||
/DISCARD/ : {
|
||||
*(.eh_frame)
|
||||
*(.interp)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user