s390-tools/s390-tools-sles15sp5-13-genprotimg-boot-stage3b-add-size-check-to-the-linker.patch

16 lines
350 B
Diff
Raw Normal View History

---
genprotimg/boot/stage3b.lds.S | 2 ++
1 file changed, 2 insertions(+)
--- a/genprotimg/boot/stage3b.lds.S
+++ b/genprotimg/boot/stage3b.lds.S
@@ -72,6 +72,8 @@ SECTIONS
}
__stack_end = .;
+ ASSERT(. <= IMAGE_ENTRY, "stage3b size must be smaller than 0x10000 bytes")
+
/* Sections to be discarded */
/DISCARD/ : {
*(.eh_frame)