[arch-commits] Commit in syslinux/trunk (2 files)
Thomas Bächler
thomas at archlinux.org
Thu Aug 9 17:49:55 UTC 2012
Date: Thursday, August 9, 2012 @ 13:49:54
Author: thomas
Revision: 165047
Fix FS#31065
Added:
syslinux/trunk/handle-ctors-dtors-via-init_array-and-fini_array.patch
Modified:
syslinux/trunk/PKGBUILD
--------------------------------------------------------+
PKGBUILD | 10 +-
handle-ctors-dtors-via-init_array-and-fini_array.patch | 67 +++++++++++++++
2 files changed, 74 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2012-08-09 16:35:44 UTC (rev 165046)
+++ PKGBUILD 2012-08-09 17:49:54 UTC (rev 165047)
@@ -4,7 +4,7 @@
pkgname=syslinux
pkgver=4.05
-pkgrel=5
+pkgrel=6
arch=('i686' 'x86_64')
pkgdesc="Collection of boot loaders that boot from FAT, ext2/3/4 and btrfs filesystems, from CDs and via PXE"
url="http://syslinux.zytor.com/"
@@ -21,7 +21,8 @@
syslinux-dont-build-dos-windows-targets.patch
syslinux.cfg
syslinux-install_update
- avoid-using-ext2_fs.patch)
+ avoid-using-ext2_fs.patch
+ handle-ctors-dtors-via-init_array-and-fini_array.patch)
build() {
# Do not try to build syslinux with our default LDFLAGS, it will fail
@@ -31,6 +32,8 @@
patch -p1 -i "$srcdir"/syslinux-dont-build-dos-windows-targets.patch
# fix #30084
patch -Np1 -i "$srcdir"/avoid-using-ext2_fs.patch
+ # fix #31065 (booting breaks with gcc 4.7)
+ patch -Np1 -i "$srcdir"/handle-ctors-dtors-via-init_array-and-fini_array.patch
# Fix FHS manpage path
sed 's|/usr/man|/usr/share/man|g' -i mk/syslinux.mk
make
@@ -52,4 +55,5 @@
'1528c376e43f0eaccaa80d8ad1bc13b4'
'832595501944fbcabcdc1207f4724fe7'
'680750f73dc2e587ac567d057d485813'
- '2e2c674a71c0c0bf265d96cfc19ce985')
+ '2e2c674a71c0c0bf265d96cfc19ce985'
+ 'd016d03f15177b1bb534ce3753b2aa9b')
Added: handle-ctors-dtors-via-init_array-and-fini_array.patch
===================================================================
--- handle-ctors-dtors-via-init_array-and-fini_array.patch (rev 0)
+++ handle-ctors-dtors-via-init_array-and-fini_array.patch 2012-08-09 17:49:54 UTC (rev 165047)
@@ -0,0 +1,67 @@
+From b6be466444740a34bacd140dccbe57f6629b15bc Mon Sep 17 00:00:00 2001
+From: "H. Peter Anvin" <hpa at zytor.com>
+Date: Mon, 28 May 2012 21:28:52 -0700
+Subject: [PATCH 1/1] com32.ld: handle .init_array and .fini_array
+
+Handle constructors/destructors via .init_array and .fini_array, as
+generated by newer gccs.
+
+Signed-off-by: H. Peter Anvin <hpa at zytor.com>
+---
+ com32/lib/com32.ld | 33 ++++++++++-----------------------
+ 1 files changed, 10 insertions(+), 23 deletions(-)
+
+diff --git a/com32/lib/com32.ld b/com32/lib/com32.ld
+index 37ee46c..008e4ce 100644
+--- a/com32/lib/com32.ld
++++ b/com32/lib/com32.ld
+@@ -36,36 +36,23 @@ SECTIONS
+ .rodata1 : { *(.rodata1) }
+ __rodata_end = .;
+
+- /* Ensure the __preinit_array_start label is properly aligned. We
+- could instead move the label definition inside the section, but
+- the linker would then create the section even if it turns out to
+- be empty, which isn't pretty. */
++ /*
++ * The difference betwee .ctors/.dtors and .init_array/.fini_array
++ * is the ordering, but we don't use prioritization for libcom32, so
++ * just lump them all together and hope that's okay.
++ */
+ . = ALIGN(4);
+- .preinit_array : {
+- PROVIDE (__preinit_array_start = .);
+- *(.preinit_array)
+- PROVIDE (__preinit_array_end = .);
+- }
+- .init_array : {
+- PROVIDE (__init_array_start = .);
+- *(.init_array)
+- PROVIDE (__init_array_end = .);
+- }
+- .fini_array : {
+- PROVIDE (__fini_array_start = .);
+- *(.fini_array)
+- PROVIDE (__fini_array_end = .);
+- }
+ .ctors : {
+ PROVIDE (__ctors_start = .);
+- KEEP (*(SORT(.ctors.*)))
+- KEEP (*(.ctors))
++ KEEP (*(SORT(.preinit_array*)))
++ KEEP (*(SORT(.init_array*)))
++ KEEP (*(SORT(.ctors*)))
+ PROVIDE (__ctors_end = .);
+ }
+ .dtors : {
+ PROVIDE (__dtors_start = .);
+- KEEP (*(SORT(.dtors.*)))
+- KEEP (*(.dtors))
++ KEEP (*(SORT(.fini_array*)))
++ KEEP (*(SORT(.dtors*)))
+ PROVIDE (__dtors_end = .);
+ }
+
+--
+1.7.6.5
+
More information about the arch-commits
mailing list