summaryrefslogtreecommitdiff
path: root/core/syslinux
diff options
context:
space:
mode:
Diffstat (limited to 'core/syslinux')
-rw-r--r--core/syslinux/PKGBUILD12
-rw-r--r--core/syslinux/syslinux-strip-gnu-property.patch18
2 files changed, 30 insertions, 0 deletions
diff --git a/core/syslinux/PKGBUILD b/core/syslinux/PKGBUILD
index 410b180a..16d4f937 100644
--- a/core/syslinux/PKGBUILD
+++ b/core/syslinux/PKGBUILD
@@ -11,3 +11,15 @@ eval "$(
'
)"
+# binutils adds a nore.gnu.proprerty ELF section, this makes the MBR slightly
+# too big to fit on disk (see also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906414)
+
+source+=(syslinux-strip-gnu-property.patch)
+sha1sums+=('fb8e96b559516038e628ad55e0331e4c668205a8')
+
+eval "$(
+ declare -f prepare | \
+ sed '
+ /patch.*efi_no_kbd/a patch -p1 < ../syslinux-strip-gnu-property.patch
+ '
+)"
diff --git a/core/syslinux/syslinux-strip-gnu-property.patch b/core/syslinux/syslinux-strip-gnu-property.patch
new file mode 100644
index 00000000..363a1ee2
--- /dev/null
+++ b/core/syslinux/syslinux-strip-gnu-property.patch
@@ -0,0 +1,18 @@
+diff -rauN syslinux/mbr/i386/mbr.ld syslinux-strip-gnu-property-patch/mbr/i386/mbr.ld
+--- syslinux/mbr/i386/mbr.ld 2018-10-14 13:54:59.532050409 +0200
++++ syslinux-strip-gnu-property-patch/mbr/i386/mbr.ld 2018-10-14 14:06:48.788976484 +0200
+@@ -70,4 +70,5 @@
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+ /DISCARD/ : { *(.note.GNU-stack) }
++ /DISCARD/ : { *(.note.gnu.property) }
+ }
+diff -rauN syslinux/mbr/x86_64/mbr.ld syslinux-strip-gnu-property-patch/mbr/x86_64/mbr.ld
+--- syslinux/mbr/x86_64/mbr.ld 2018-10-14 13:54:59.533050375 +0200
++++ syslinux-strip-gnu-property-patch/mbr/x86_64/mbr.ld 2018-10-14 14:06:40.133269711 +0200
+@@ -69,4 +69,5 @@
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+ /DISCARD/ : { *(.note.GNU-stack) }
++ /DISCARD/ : { *(.note.gnu.property) }
+ }