(genprotimg|zipl)/boot: discard .note.package ELF section to save memory

The .note.package [1] section is not used by the zipl/genprotimg bootloaders,
therefore discard them via linker script.

This fix solves the error:
 /usr/bin/ld: Heap section doesn't conform to the described memory layout
 collect2: error: ld returned 1 exit status
 make[4]: *** [Makefile:77: stage3a.elf] Error 1
 make[4]: Leaving directory '/<>/genprotimg/boot'
 make[3]: *** [Makefile:20: all-recursive] Error 1
 make[3]: Leaving directory '/<>/genprotimg'
 make[2]: *** [Makefile:56: genprotimg] Error 2

[1] https://systemd.io/ELF_PACKAGE_METADATA/

Fixes: https://github.com/ibm-s390-linux/s390-tools/issues/174
Closes: https://github.com/ibm-s390-linux/s390-tools/pull/176
[seiden@linux.ibm.com: Add/edit fixes tags]
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Frank Heimes <frank.heimes@canonical.com>
Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Frank Heimes
2024-08-26 18:08:59 +02:00
committed by Jan Höppner
parent 6a55d0c2e5
commit 6fc450f696
9 changed files with 9 additions and 0 deletions

View File

@@ -93,5 +93,6 @@ SECTIONS
*(.eh_frame)
*(.interp)
*(.note.GNU-stack)
*(.note.package)
}
}

View File

@@ -79,5 +79,6 @@ SECTIONS
*(.eh_frame)
*(.interp)
*(.note.GNU-stack)
*(.note.package)
}
}

View File

@@ -15,5 +15,6 @@ SECTIONS
*(.eh_frame)
*(.interp)
*(.note.GNU-stack)
*(.note.package)
}
}

View File

@@ -72,5 +72,6 @@ SECTIONS
*(.eh_frame)
*(.interp)
*(.note.GNU-stack)
*(.note.package)
}
}

View File

@@ -14,5 +14,6 @@ SECTIONS
*(.eh_frame)
*(.interp)
*(.note.GNU-stack)
*(.note.package)
}
}

View File

@@ -14,5 +14,6 @@ SECTIONS
*(.eh_frame)
*(.interp)
*(.note.GNU-stack)
*(.note.package)
}
}

View File

@@ -14,5 +14,6 @@ SECTIONS
*(.eh_frame)
*(.interp)
*(.note.GNU-stack)
*(.note.package)
}
}

View File

@@ -93,5 +93,6 @@ SECTIONS
*(.eh_frame)
*(.interp)
*(.note.GNU-stack)
*(.note.package)
}
}

View File

@@ -74,5 +74,6 @@ SECTIONS
*(.eh_frame)
*(.interp)
*(.note.GNU-stack)
*(.note.package)
}
}