From ae6bad77e8b2eac00d438066e82d16b9dade8af9afb9852416832193463929b6 Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Tue, 9 Feb 2010 09:29:56 +0000 Subject: [PATCH 1/4] OBS-URL: https://build.opensuse.org/package/show/Base:System/libhugetlbfs?expand=0&rev=9 --- libhugetlbfs.changes | 5 ++ libhugetlbfs.howto.patch | 27 -------- libhugetlbfs.install-header.patch | 16 ----- libhugetlbfs.linker-sections.patch | 102 ----------------------------- libhugetlbfs.linkerscript.patch | 61 ----------------- libhugetlbfs.small_bss.patch | 17 ----- libhugetlbfs.spec | 1 - 7 files changed, 5 insertions(+), 224 deletions(-) delete mode 100644 libhugetlbfs.howto.patch delete mode 100644 libhugetlbfs.install-header.patch delete mode 100644 libhugetlbfs.linker-sections.patch delete mode 100644 libhugetlbfs.linkerscript.patch delete mode 100644 libhugetlbfs.small_bss.patch diff --git a/libhugetlbfs.changes b/libhugetlbfs.changes index 8ddfbb8..11a08f8 100644 --- a/libhugetlbfs.changes +++ b/libhugetlbfs.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 9 09:29:27 UTC 2010 - trenn@novell.com + +- Removed unused files + ------------------------------------------------------------------- Mon Feb 1 11:35:48 UTC 2010 - jengelh@medozas.de diff --git a/libhugetlbfs.howto.patch b/libhugetlbfs.howto.patch deleted file mode 100644 index 9166731..0000000 --- a/libhugetlbfs.howto.patch +++ /dev/null @@ -1,27 +0,0 @@ -Update HOWTO with specific instructions on fixing segafaults when using xB linker script -with NX bit support. - -Signed-off-by: Eric B Munson - ---- - HOWTO | 9 +++++++++ - 1 file changed, 9 insertions(+) - ---- a/HOWTO -+++ b/HOWTO -@@ -594,6 +594,15 @@ If an application fails to run, set the - to 1. This causes additional diagnostics to be run. This information should - be included when sending bug reports to the libhugetlbfs team. - -+Specific Scenarios: -+------------------- -+ -+ISSUE: When using the xB linker script with a 32 bit binary on an x86 host with -+ NX support enabled, the binary segfaults. -+ -+TRY: Recompiling with the --hugetlbfs-align options and use the new relinking -+ method or booting your kernel with noexec32=off. -+ - Trademarks - ========== - diff --git a/libhugetlbfs.install-header.patch b/libhugetlbfs.install-header.patch deleted file mode 100644 index 4152dd7..0000000 --- a/libhugetlbfs.install-header.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- - Makefile | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - ---- a/Makefile -+++ b/Makefile -@@ -275,7 +275,8 @@ objscript.%: % - install: libs tools $(OBJDIRS:%=%/install) $(INSTALL_OBJSCRIPT:%=objscript.%) - @$(VECHO) INSTALL - $(INSTALL) -d $(DESTDIR)$(LDSCRIPTDIR) -- $(INSTALL) -m 644 $(INSTALL_HEADERS) $(HEADERDIR) -+ $(INSTALL) -d $(DESTDIR)$(HEADERDIR) -+ $(INSTALL) -m 644 $(INSTALL_HEADERS) $(DESTDIR)$(HEADERDIR) - $(INSTALL) -m 644 $(INSTALL_LDSCRIPTS:%=ldscripts/%) $(DESTDIR)$(LDSCRIPTDIR) - $(INSTALL) -d $(DESTDIR)$(BINDIR) - $(INSTALL) -d $(DESTDIR)$(EXEDIR) diff --git a/libhugetlbfs.linker-sections.patch b/libhugetlbfs.linker-sections.patch deleted file mode 100644 index 601dd21..0000000 --- a/libhugetlbfs.linker-sections.patch +++ /dev/null @@ -1,102 +0,0 @@ -Subject: [PATCH V2] Update SECTIONS from linker scripts for binutils 2.19 compatibility - -When building the linker script tests on SLES 11, the resulting executable -had an invalid size for the interp section. This is dues to a new section -that was not present in the old script. This patch adds this section to -all of the linker scripts. - -Credit goes to Alan Modra for identifying what change needed to be made - -Signed-off-by: Eric B Munson - ---- - ldscripts/elf32ppclinux.xB | 1 + - ldscripts/elf32ppclinux.xBDT | 1 + - ldscripts/elf64ppc.xB | 1 + - ldscripts/elf64ppc.xBDT | 1 + - ldscripts/elf_i386.xB | 1 + - ldscripts/elf_i386.xBDT | 1 + - ldscripts/elf_x86_64.xB | 1 + - ldscripts/elf_x86_64.xBDT | 1 + - 8 files changed, 8 insertions(+) - ---- a/ldscripts/elf32ppclinux.xB -+++ b/ldscripts/elf32ppclinux.xB -@@ -27,6 +27,7 @@ SECTIONS - .interp : { *(.interp) } :text :interp - .note.SuSE : { *(.note.SuSE) } :text :note - .note.ABI-tag : { *(.note.ABI-tag) } :text :note -+ .note.gnu.build-id : { *(.note.gnu.build-id) } :text :note - .hash : { *(.hash) } :text - .dynsym : { *(.dynsym) } :text - .dynstr : { *(.dynstr) } :text ---- a/ldscripts/elf32ppclinux.xBDT -+++ b/ldscripts/elf32ppclinux.xBDT -@@ -26,6 +26,7 @@ SECTIONS - .interp : { *(.interp) } :htext :interp - .note.SuSE : { *(.note.SuSE) } :htext :note - .note.ABI-tag : { *(.note.ABI-tag) } :htext :note -+ .note.gnu.build-id : { *(.note.gnu.build-id) } :htext :note - .hash : { *(.hash) } :htext - .dynsym : { *(.dynsym) } :htext - .dynstr : { *(.dynstr) } :htext ---- a/ldscripts/elf64ppc.xB -+++ b/ldscripts/elf64ppc.xB -@@ -26,6 +26,7 @@ SECTIONS - .interp : { *(.interp) } :text :interp - .note.SuSE : { *(.note.SuSE) } :text :note - .note.ABI-tag : { *(.note.ABI-tag) } :text :note -+ .note.gnu.build-id : { *(.note.gnu.build-id) } :text :note - .hash : { *(.hash) } :text - .dynsym : { *(.dynsym) } - .dynstr : { *(.dynstr) } ---- a/ldscripts/elf64ppc.xBDT -+++ b/ldscripts/elf64ppc.xBDT -@@ -25,6 +25,7 @@ SECTIONS - .interp : { *(.interp) } :interp :htext - .note.SuSE : { *(.note.SuSE) } :htext :note - .note.ABI-tag : { *(.note.ABI-tag) } :htext :note -+ .note.gnu.build-id : { *(.note.gnu.build-id) } :htext :note - .hash : { *(.hash) } :htext - .dynsym : { *(.dynsym) } :htext - .dynstr : { *(.dynstr) } :htext ---- a/ldscripts/elf_i386.xB -+++ b/ldscripts/elf_i386.xB -@@ -29,6 +29,7 @@ SECTIONS - .interp : { *(.interp) } :text :interp - .note.SuSE : { *(.note.SuSE) } :text :note - .note.ABI-tag : { *(.note.ABI-tag) } :text :note -+ .note.gnu.build-id : { *(.note.gnu.build-id) } :text :note - .hash : { *(.hash) } :text - .dynsym : { *(.dynsym) } - .dynstr : { *(.dynstr) } ---- a/ldscripts/elf_i386.xBDT -+++ b/ldscripts/elf_i386.xBDT -@@ -30,6 +30,7 @@ SECTIONS - .interp : { *(.interp) } :htext :interp - .note.SuSE : { *(.note.SuSE) } :htext :note - .note.ABI-tag : { *(.note.ABI-tag) } :htext :note -+ .note.gnu.build-id : { *(.note.gnu.build-id) } :htext :note - .hash : { *(.hash) } :htext - .dynsym : { *(.dynsym) } :htext - .dynstr : { *(.dynstr) } :htext ---- a/ldscripts/elf_x86_64.xB -+++ b/ldscripts/elf_x86_64.xB -@@ -29,6 +29,7 @@ SECTIONS - .interp : { *(.interp) } :text :interp - .note.SuSE : { *(.note.SuSE) } :text :note - .note.ABI-tag : { *(.note.ABI-tag) } :text :note -+ .note.gnu.build-id : { *(.note.gnu.build-id) } :text :note - .hash : { *(.hash) } :text - .dynsym : { *(.dynsym) } :text - .dynstr : { *(.dynstr) } :text ---- a/ldscripts/elf_x86_64.xBDT -+++ b/ldscripts/elf_x86_64.xBDT -@@ -31,6 +31,7 @@ SECTIONS - .hash : { *(.hash) } :htext - .note.SuSE : { *(.note.SuSE) } :htext :note - .note.ABI-tag : { *(.note.ABI-tag) } :htext :note -+ .note.gnu.build-id : { *(.note.gnu.build-id) } :htext :note - .dynsym : { *(.dynsym) } :htext - .dynstr : { *(.dynstr) } :htext - .gnu.version : { *(.gnu.version) } :htext diff --git a/libhugetlbfs.linkerscript.patch b/libhugetlbfs.linkerscript.patch deleted file mode 100644 index b7fa191..0000000 --- a/libhugetlbfs.linkerscript.patch +++ /dev/null @@ -1,61 +0,0 @@ -ADAM G. LITKE - -Libhugetlbfs ships a set of linker scripts which can be used to enable ELF -segment remapping into huge pages. These linker scripts -no longer work with the version of binutils shipped with SLES11. - -This has been a known problem. Linker scripts are essentially tied to specific -versions of binutils but libhugetlbfs only ships a single -set. To avoid maintaining and shipping an ever-growing number of linker -scripts, a new method of linking binaries for use with huge -pages was developed in libhugetlbfs-2.0. Unfortunately, some customers will -likely continue to use the old method of linking -binaries (with the shipped linker scripts) and will experience problems. The -solution to this problem is either to fix the linker scripts -for SLES11 by supplying a distro-specific patch, or strip out the deprecated -linker scripts so they cannot be used at all. I would prefer -to fix the linker scripts (if possible) to allow customers more time to switch -to the new linking method. - -Fix for ppc32 BDT script - -The only linker script that is known to have problems is the script used to -place text, data, and bss into huge pages on 32bit -PowerPC. The attached patch fixes the issue by adding the 'SPECIAL' notation -to the .plt and .got sections which is required for -correct functioning of the dynamic linker. - - ---- - ldscripts/elf32ppclinux.xBDT | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - ---- a/ldscripts/elf32ppclinux.xBDT -+++ b/ldscripts/elf32ppclinux.xBDT -@@ -163,8 +163,9 @@ SECTIONS - .got1 : { *(.got1) } :hdata - .got2 : { *(.got2) } :hdata - .dynamic : { *(.dynamic) } :dynamic :hdata -- .got : { *(.got.plt .got) } :hdata -+ .got : SPECIAL { *(.got) } :hdata - /* . = DATA_SEGMENT_RELRO_END (0, .); */ -+ .plt : SPECIAL { *(.plt) } :hdata - .data : - { - *(.data .data.* .gnu.linkonce.d.*) -@@ -172,6 +173,7 @@ SECTIONS - SORT(CONSTRUCTORS) - } :hdata - .data1 : { *(.data1) } :hdata -+ .got : SPECIAL { *(.got) } :hdata - /* We want the small data sections together, so single-instruction offsets - can access them all, and initialized data all before uninitialized, so - we can shorten the on-disk segment size. */ -@@ -190,7 +192,7 @@ SECTIONS - *(.scommon) - PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .); - } :hdata -- .plt : { *(.plt) } :hdata -+ .plt : SPECIAL { *(.plt) } :hdata - .bss : - { - *(.dynbss) diff --git a/libhugetlbfs.small_bss.patch b/libhugetlbfs.small_bss.patch deleted file mode 100644 index c0b9b63..0000000 --- a/libhugetlbfs.small_bss.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - elflink.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/elflink.c -+++ b/elflink.c -@@ -622,6 +622,10 @@ static int verify_segment_layout(struct - unsigned long prev_end = segs[i - 1].end; - unsigned long start = segs[i].start; - -+ /* Don't worry about consecutive normal page segments */ -+ if (!segs[i - 1].huge && !segs[i].huge) -+ continue; -+ - /* Make sure alignment hasn't caused segments to overlap */ - if (prev_end > start) { - WARNING("Layout problem with segments %i and %i:\n\t" diff --git a/libhugetlbfs.spec b/libhugetlbfs.spec index 195fd50..57fd037 100644 --- a/libhugetlbfs.spec +++ b/libhugetlbfs.spec @@ -40,7 +40,6 @@ Patch2: libhugetlbfs.s390.patch Patch3: libhugetlbfs.exchange_library_order.patch Patch4: libhugetlbfs.tests-malloc.patch Patch5: libhugetlbfs.run_test_fix.patch -#Patch7: libhugetlbfs.versioning.patch %description The libhugetlbfs package interacts with the Linux hugetlbfs to From 5916325607486cdcb41cfbf54487caff915d0d4471cfbb048d565d8595b607c8 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Thu, 11 Feb 2010 00:59:04 +0000 Subject: [PATCH 2/4] Accepting request 32052 from home:jengelh:sparc Copy from home:jengelh:sparc/libhugetlbfs via accept of submit request 32052 revision 3. Request was accepted with message: Reviewed ok OBS-URL: https://build.opensuse.org/request/show/32052 OBS-URL: https://build.opensuse.org/package/show/Base:System/libhugetlbfs?expand=0&rev=10 --- libhugetlbfs.changes | 5 +++++ libhugetlbfs.spec | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/libhugetlbfs.changes b/libhugetlbfs.changes index 11a08f8..5cfddb4 100644 --- a/libhugetlbfs.changes +++ b/libhugetlbfs.changes @@ -3,6 +3,11 @@ Tue Feb 9 09:29:27 UTC 2010 - trenn@novell.com - Removed unused files +------------------------------------------------------------------- +Mon Feb 8 22:48:44 UTC 2010 - jengelh@medozas.de + +- add workarounds for broken Makefile logic to detect arch + ------------------------------------------------------------------- Mon Feb 1 11:35:48 UTC 2010 - jengelh@medozas.de diff --git a/libhugetlbfs.spec b/libhugetlbfs.spec index 57fd037..4d2e21d 100644 --- a/libhugetlbfs.spec +++ b/libhugetlbfs.spec @@ -77,7 +77,11 @@ tests= %ifarch ppc ppc64 %ix86 x86_64 tests=install-tests %endif -make %{my_make_flags} install $tests +make \ +%ifarch sparc sparcv9 + CC32="gcc" CC64="" NATIVEONLY=1 \ +%endif + %{my_make_flags} install $tests mkdir -p $RPM_BUILD_ROOT/usr/include cp -avL hugetlbfs.h $RPM_BUILD_ROOT/usr/include chmod 644 $RPM_BUILD_ROOT%{_libdir}/*.a From 2489c362288cbd6350be92ba8d6200afc1ca9be771656245cb9d0aa086fdd5be Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Thu, 11 Feb 2010 20:12:55 +0000 Subject: [PATCH 3/4] checked in (request 32150) OBS-URL: https://build.opensuse.org/package/show/Base:System/libhugetlbfs?expand=0&rev=11 --- libhugetlbfs.changes | 10 --- libhugetlbfs.howto.patch | 27 ++++++++ libhugetlbfs.install-header.patch | 16 +++++ libhugetlbfs.linker-sections.patch | 102 +++++++++++++++++++++++++++++ libhugetlbfs.linkerscript.patch | 61 +++++++++++++++++ libhugetlbfs.small_bss.patch | 17 +++++ libhugetlbfs.spec | 7 +- 7 files changed, 225 insertions(+), 15 deletions(-) create mode 100644 libhugetlbfs.howto.patch create mode 100644 libhugetlbfs.install-header.patch create mode 100644 libhugetlbfs.linker-sections.patch create mode 100644 libhugetlbfs.linkerscript.patch create mode 100644 libhugetlbfs.small_bss.patch diff --git a/libhugetlbfs.changes b/libhugetlbfs.changes index 5cfddb4..8ddfbb8 100644 --- a/libhugetlbfs.changes +++ b/libhugetlbfs.changes @@ -1,13 +1,3 @@ -------------------------------------------------------------------- -Tue Feb 9 09:29:27 UTC 2010 - trenn@novell.com - -- Removed unused files - -------------------------------------------------------------------- -Mon Feb 8 22:48:44 UTC 2010 - jengelh@medozas.de - -- add workarounds for broken Makefile logic to detect arch - ------------------------------------------------------------------- Mon Feb 1 11:35:48 UTC 2010 - jengelh@medozas.de diff --git a/libhugetlbfs.howto.patch b/libhugetlbfs.howto.patch new file mode 100644 index 0000000..9166731 --- /dev/null +++ b/libhugetlbfs.howto.patch @@ -0,0 +1,27 @@ +Update HOWTO with specific instructions on fixing segafaults when using xB linker script +with NX bit support. + +Signed-off-by: Eric B Munson + +--- + HOWTO | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- a/HOWTO ++++ b/HOWTO +@@ -594,6 +594,15 @@ If an application fails to run, set the + to 1. This causes additional diagnostics to be run. This information should + be included when sending bug reports to the libhugetlbfs team. + ++Specific Scenarios: ++------------------- ++ ++ISSUE: When using the xB linker script with a 32 bit binary on an x86 host with ++ NX support enabled, the binary segfaults. ++ ++TRY: Recompiling with the --hugetlbfs-align options and use the new relinking ++ method or booting your kernel with noexec32=off. ++ + Trademarks + ========== + diff --git a/libhugetlbfs.install-header.patch b/libhugetlbfs.install-header.patch new file mode 100644 index 0000000..4152dd7 --- /dev/null +++ b/libhugetlbfs.install-header.patch @@ -0,0 +1,16 @@ +--- + Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/Makefile ++++ b/Makefile +@@ -275,7 +275,8 @@ objscript.%: % + install: libs tools $(OBJDIRS:%=%/install) $(INSTALL_OBJSCRIPT:%=objscript.%) + @$(VECHO) INSTALL + $(INSTALL) -d $(DESTDIR)$(LDSCRIPTDIR) +- $(INSTALL) -m 644 $(INSTALL_HEADERS) $(HEADERDIR) ++ $(INSTALL) -d $(DESTDIR)$(HEADERDIR) ++ $(INSTALL) -m 644 $(INSTALL_HEADERS) $(DESTDIR)$(HEADERDIR) + $(INSTALL) -m 644 $(INSTALL_LDSCRIPTS:%=ldscripts/%) $(DESTDIR)$(LDSCRIPTDIR) + $(INSTALL) -d $(DESTDIR)$(BINDIR) + $(INSTALL) -d $(DESTDIR)$(EXEDIR) diff --git a/libhugetlbfs.linker-sections.patch b/libhugetlbfs.linker-sections.patch new file mode 100644 index 0000000..601dd21 --- /dev/null +++ b/libhugetlbfs.linker-sections.patch @@ -0,0 +1,102 @@ +Subject: [PATCH V2] Update SECTIONS from linker scripts for binutils 2.19 compatibility + +When building the linker script tests on SLES 11, the resulting executable +had an invalid size for the interp section. This is dues to a new section +that was not present in the old script. This patch adds this section to +all of the linker scripts. + +Credit goes to Alan Modra for identifying what change needed to be made + +Signed-off-by: Eric B Munson + +--- + ldscripts/elf32ppclinux.xB | 1 + + ldscripts/elf32ppclinux.xBDT | 1 + + ldscripts/elf64ppc.xB | 1 + + ldscripts/elf64ppc.xBDT | 1 + + ldscripts/elf_i386.xB | 1 + + ldscripts/elf_i386.xBDT | 1 + + ldscripts/elf_x86_64.xB | 1 + + ldscripts/elf_x86_64.xBDT | 1 + + 8 files changed, 8 insertions(+) + +--- a/ldscripts/elf32ppclinux.xB ++++ b/ldscripts/elf32ppclinux.xB +@@ -27,6 +27,7 @@ SECTIONS + .interp : { *(.interp) } :text :interp + .note.SuSE : { *(.note.SuSE) } :text :note + .note.ABI-tag : { *(.note.ABI-tag) } :text :note ++ .note.gnu.build-id : { *(.note.gnu.build-id) } :text :note + .hash : { *(.hash) } :text + .dynsym : { *(.dynsym) } :text + .dynstr : { *(.dynstr) } :text +--- a/ldscripts/elf32ppclinux.xBDT ++++ b/ldscripts/elf32ppclinux.xBDT +@@ -26,6 +26,7 @@ SECTIONS + .interp : { *(.interp) } :htext :interp + .note.SuSE : { *(.note.SuSE) } :htext :note + .note.ABI-tag : { *(.note.ABI-tag) } :htext :note ++ .note.gnu.build-id : { *(.note.gnu.build-id) } :htext :note + .hash : { *(.hash) } :htext + .dynsym : { *(.dynsym) } :htext + .dynstr : { *(.dynstr) } :htext +--- a/ldscripts/elf64ppc.xB ++++ b/ldscripts/elf64ppc.xB +@@ -26,6 +26,7 @@ SECTIONS + .interp : { *(.interp) } :text :interp + .note.SuSE : { *(.note.SuSE) } :text :note + .note.ABI-tag : { *(.note.ABI-tag) } :text :note ++ .note.gnu.build-id : { *(.note.gnu.build-id) } :text :note + .hash : { *(.hash) } :text + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } +--- a/ldscripts/elf64ppc.xBDT ++++ b/ldscripts/elf64ppc.xBDT +@@ -25,6 +25,7 @@ SECTIONS + .interp : { *(.interp) } :interp :htext + .note.SuSE : { *(.note.SuSE) } :htext :note + .note.ABI-tag : { *(.note.ABI-tag) } :htext :note ++ .note.gnu.build-id : { *(.note.gnu.build-id) } :htext :note + .hash : { *(.hash) } :htext + .dynsym : { *(.dynsym) } :htext + .dynstr : { *(.dynstr) } :htext +--- a/ldscripts/elf_i386.xB ++++ b/ldscripts/elf_i386.xB +@@ -29,6 +29,7 @@ SECTIONS + .interp : { *(.interp) } :text :interp + .note.SuSE : { *(.note.SuSE) } :text :note + .note.ABI-tag : { *(.note.ABI-tag) } :text :note ++ .note.gnu.build-id : { *(.note.gnu.build-id) } :text :note + .hash : { *(.hash) } :text + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } +--- a/ldscripts/elf_i386.xBDT ++++ b/ldscripts/elf_i386.xBDT +@@ -30,6 +30,7 @@ SECTIONS + .interp : { *(.interp) } :htext :interp + .note.SuSE : { *(.note.SuSE) } :htext :note + .note.ABI-tag : { *(.note.ABI-tag) } :htext :note ++ .note.gnu.build-id : { *(.note.gnu.build-id) } :htext :note + .hash : { *(.hash) } :htext + .dynsym : { *(.dynsym) } :htext + .dynstr : { *(.dynstr) } :htext +--- a/ldscripts/elf_x86_64.xB ++++ b/ldscripts/elf_x86_64.xB +@@ -29,6 +29,7 @@ SECTIONS + .interp : { *(.interp) } :text :interp + .note.SuSE : { *(.note.SuSE) } :text :note + .note.ABI-tag : { *(.note.ABI-tag) } :text :note ++ .note.gnu.build-id : { *(.note.gnu.build-id) } :text :note + .hash : { *(.hash) } :text + .dynsym : { *(.dynsym) } :text + .dynstr : { *(.dynstr) } :text +--- a/ldscripts/elf_x86_64.xBDT ++++ b/ldscripts/elf_x86_64.xBDT +@@ -31,6 +31,7 @@ SECTIONS + .hash : { *(.hash) } :htext + .note.SuSE : { *(.note.SuSE) } :htext :note + .note.ABI-tag : { *(.note.ABI-tag) } :htext :note ++ .note.gnu.build-id : { *(.note.gnu.build-id) } :htext :note + .dynsym : { *(.dynsym) } :htext + .dynstr : { *(.dynstr) } :htext + .gnu.version : { *(.gnu.version) } :htext diff --git a/libhugetlbfs.linkerscript.patch b/libhugetlbfs.linkerscript.patch new file mode 100644 index 0000000..b7fa191 --- /dev/null +++ b/libhugetlbfs.linkerscript.patch @@ -0,0 +1,61 @@ +ADAM G. LITKE - +Libhugetlbfs ships a set of linker scripts which can be used to enable ELF +segment remapping into huge pages. These linker scripts +no longer work with the version of binutils shipped with SLES11. + +This has been a known problem. Linker scripts are essentially tied to specific +versions of binutils but libhugetlbfs only ships a single +set. To avoid maintaining and shipping an ever-growing number of linker +scripts, a new method of linking binaries for use with huge +pages was developed in libhugetlbfs-2.0. Unfortunately, some customers will +likely continue to use the old method of linking +binaries (with the shipped linker scripts) and will experience problems. The +solution to this problem is either to fix the linker scripts +for SLES11 by supplying a distro-specific patch, or strip out the deprecated +linker scripts so they cannot be used at all. I would prefer +to fix the linker scripts (if possible) to allow customers more time to switch +to the new linking method. + +Fix for ppc32 BDT script + +The only linker script that is known to have problems is the script used to +place text, data, and bss into huge pages on 32bit +PowerPC. The attached patch fixes the issue by adding the 'SPECIAL' notation +to the .plt and .got sections which is required for +correct functioning of the dynamic linker. + + +--- + ldscripts/elf32ppclinux.xBDT | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/ldscripts/elf32ppclinux.xBDT ++++ b/ldscripts/elf32ppclinux.xBDT +@@ -163,8 +163,9 @@ SECTIONS + .got1 : { *(.got1) } :hdata + .got2 : { *(.got2) } :hdata + .dynamic : { *(.dynamic) } :dynamic :hdata +- .got : { *(.got.plt .got) } :hdata ++ .got : SPECIAL { *(.got) } :hdata + /* . = DATA_SEGMENT_RELRO_END (0, .); */ ++ .plt : SPECIAL { *(.plt) } :hdata + .data : + { + *(.data .data.* .gnu.linkonce.d.*) +@@ -172,6 +173,7 @@ SECTIONS + SORT(CONSTRUCTORS) + } :hdata + .data1 : { *(.data1) } :hdata ++ .got : SPECIAL { *(.got) } :hdata + /* We want the small data sections together, so single-instruction offsets + can access them all, and initialized data all before uninitialized, so + we can shorten the on-disk segment size. */ +@@ -190,7 +192,7 @@ SECTIONS + *(.scommon) + PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .); + } :hdata +- .plt : { *(.plt) } :hdata ++ .plt : SPECIAL { *(.plt) } :hdata + .bss : + { + *(.dynbss) diff --git a/libhugetlbfs.small_bss.patch b/libhugetlbfs.small_bss.patch new file mode 100644 index 0000000..c0b9b63 --- /dev/null +++ b/libhugetlbfs.small_bss.patch @@ -0,0 +1,17 @@ +--- + elflink.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/elflink.c ++++ b/elflink.c +@@ -622,6 +622,10 @@ static int verify_segment_layout(struct + unsigned long prev_end = segs[i - 1].end; + unsigned long start = segs[i].start; + ++ /* Don't worry about consecutive normal page segments */ ++ if (!segs[i - 1].huge && !segs[i].huge) ++ continue; ++ + /* Make sure alignment hasn't caused segments to overlap */ + if (prev_end > start) { + WARNING("Layout problem with segments %i and %i:\n\t" diff --git a/libhugetlbfs.spec b/libhugetlbfs.spec index 4d2e21d..195fd50 100644 --- a/libhugetlbfs.spec +++ b/libhugetlbfs.spec @@ -40,6 +40,7 @@ Patch2: libhugetlbfs.s390.patch Patch3: libhugetlbfs.exchange_library_order.patch Patch4: libhugetlbfs.tests-malloc.patch Patch5: libhugetlbfs.run_test_fix.patch +#Patch7: libhugetlbfs.versioning.patch %description The libhugetlbfs package interacts with the Linux hugetlbfs to @@ -77,11 +78,7 @@ tests= %ifarch ppc ppc64 %ix86 x86_64 tests=install-tests %endif -make \ -%ifarch sparc sparcv9 - CC32="gcc" CC64="" NATIVEONLY=1 \ -%endif - %{my_make_flags} install $tests +make %{my_make_flags} install $tests mkdir -p $RPM_BUILD_ROOT/usr/include cp -avL hugetlbfs.h $RPM_BUILD_ROOT/usr/include chmod 644 $RPM_BUILD_ROOT%{_libdir}/*.a From 31e34c46b50655397ddf23df5011e72a91cb32331b05e07ef5ae9401a5d632eb Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Thu, 11 Feb 2010 20:12:56 +0000 Subject: [PATCH 4/4] Updating link to change in openSUSE:Factory/libhugetlbfs revision 15.0 OBS-URL: https://build.opensuse.org/package/show/Base:System/libhugetlbfs?expand=0&rev=c218039e7048cc63ba8dcdc283c1b779 --- libhugetlbfs.changes | 10 +++ libhugetlbfs.howto.patch | 27 -------- libhugetlbfs.install-header.patch | 16 ----- libhugetlbfs.linker-sections.patch | 102 ----------------------------- libhugetlbfs.linkerscript.patch | 61 ----------------- libhugetlbfs.small_bss.patch | 17 ----- libhugetlbfs.spec | 9 ++- 7 files changed, 16 insertions(+), 226 deletions(-) delete mode 100644 libhugetlbfs.howto.patch delete mode 100644 libhugetlbfs.install-header.patch delete mode 100644 libhugetlbfs.linker-sections.patch delete mode 100644 libhugetlbfs.linkerscript.patch delete mode 100644 libhugetlbfs.small_bss.patch diff --git a/libhugetlbfs.changes b/libhugetlbfs.changes index 8ddfbb8..5cfddb4 100644 --- a/libhugetlbfs.changes +++ b/libhugetlbfs.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Feb 9 09:29:27 UTC 2010 - trenn@novell.com + +- Removed unused files + +------------------------------------------------------------------- +Mon Feb 8 22:48:44 UTC 2010 - jengelh@medozas.de + +- add workarounds for broken Makefile logic to detect arch + ------------------------------------------------------------------- Mon Feb 1 11:35:48 UTC 2010 - jengelh@medozas.de diff --git a/libhugetlbfs.howto.patch b/libhugetlbfs.howto.patch deleted file mode 100644 index 9166731..0000000 --- a/libhugetlbfs.howto.patch +++ /dev/null @@ -1,27 +0,0 @@ -Update HOWTO with specific instructions on fixing segafaults when using xB linker script -with NX bit support. - -Signed-off-by: Eric B Munson - ---- - HOWTO | 9 +++++++++ - 1 file changed, 9 insertions(+) - ---- a/HOWTO -+++ b/HOWTO -@@ -594,6 +594,15 @@ If an application fails to run, set the - to 1. This causes additional diagnostics to be run. This information should - be included when sending bug reports to the libhugetlbfs team. - -+Specific Scenarios: -+------------------- -+ -+ISSUE: When using the xB linker script with a 32 bit binary on an x86 host with -+ NX support enabled, the binary segfaults. -+ -+TRY: Recompiling with the --hugetlbfs-align options and use the new relinking -+ method or booting your kernel with noexec32=off. -+ - Trademarks - ========== - diff --git a/libhugetlbfs.install-header.patch b/libhugetlbfs.install-header.patch deleted file mode 100644 index 4152dd7..0000000 --- a/libhugetlbfs.install-header.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- - Makefile | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - ---- a/Makefile -+++ b/Makefile -@@ -275,7 +275,8 @@ objscript.%: % - install: libs tools $(OBJDIRS:%=%/install) $(INSTALL_OBJSCRIPT:%=objscript.%) - @$(VECHO) INSTALL - $(INSTALL) -d $(DESTDIR)$(LDSCRIPTDIR) -- $(INSTALL) -m 644 $(INSTALL_HEADERS) $(HEADERDIR) -+ $(INSTALL) -d $(DESTDIR)$(HEADERDIR) -+ $(INSTALL) -m 644 $(INSTALL_HEADERS) $(DESTDIR)$(HEADERDIR) - $(INSTALL) -m 644 $(INSTALL_LDSCRIPTS:%=ldscripts/%) $(DESTDIR)$(LDSCRIPTDIR) - $(INSTALL) -d $(DESTDIR)$(BINDIR) - $(INSTALL) -d $(DESTDIR)$(EXEDIR) diff --git a/libhugetlbfs.linker-sections.patch b/libhugetlbfs.linker-sections.patch deleted file mode 100644 index 601dd21..0000000 --- a/libhugetlbfs.linker-sections.patch +++ /dev/null @@ -1,102 +0,0 @@ -Subject: [PATCH V2] Update SECTIONS from linker scripts for binutils 2.19 compatibility - -When building the linker script tests on SLES 11, the resulting executable -had an invalid size for the interp section. This is dues to a new section -that was not present in the old script. This patch adds this section to -all of the linker scripts. - -Credit goes to Alan Modra for identifying what change needed to be made - -Signed-off-by: Eric B Munson - ---- - ldscripts/elf32ppclinux.xB | 1 + - ldscripts/elf32ppclinux.xBDT | 1 + - ldscripts/elf64ppc.xB | 1 + - ldscripts/elf64ppc.xBDT | 1 + - ldscripts/elf_i386.xB | 1 + - ldscripts/elf_i386.xBDT | 1 + - ldscripts/elf_x86_64.xB | 1 + - ldscripts/elf_x86_64.xBDT | 1 + - 8 files changed, 8 insertions(+) - ---- a/ldscripts/elf32ppclinux.xB -+++ b/ldscripts/elf32ppclinux.xB -@@ -27,6 +27,7 @@ SECTIONS - .interp : { *(.interp) } :text :interp - .note.SuSE : { *(.note.SuSE) } :text :note - .note.ABI-tag : { *(.note.ABI-tag) } :text :note -+ .note.gnu.build-id : { *(.note.gnu.build-id) } :text :note - .hash : { *(.hash) } :text - .dynsym : { *(.dynsym) } :text - .dynstr : { *(.dynstr) } :text ---- a/ldscripts/elf32ppclinux.xBDT -+++ b/ldscripts/elf32ppclinux.xBDT -@@ -26,6 +26,7 @@ SECTIONS - .interp : { *(.interp) } :htext :interp - .note.SuSE : { *(.note.SuSE) } :htext :note - .note.ABI-tag : { *(.note.ABI-tag) } :htext :note -+ .note.gnu.build-id : { *(.note.gnu.build-id) } :htext :note - .hash : { *(.hash) } :htext - .dynsym : { *(.dynsym) } :htext - .dynstr : { *(.dynstr) } :htext ---- a/ldscripts/elf64ppc.xB -+++ b/ldscripts/elf64ppc.xB -@@ -26,6 +26,7 @@ SECTIONS - .interp : { *(.interp) } :text :interp - .note.SuSE : { *(.note.SuSE) } :text :note - .note.ABI-tag : { *(.note.ABI-tag) } :text :note -+ .note.gnu.build-id : { *(.note.gnu.build-id) } :text :note - .hash : { *(.hash) } :text - .dynsym : { *(.dynsym) } - .dynstr : { *(.dynstr) } ---- a/ldscripts/elf64ppc.xBDT -+++ b/ldscripts/elf64ppc.xBDT -@@ -25,6 +25,7 @@ SECTIONS - .interp : { *(.interp) } :interp :htext - .note.SuSE : { *(.note.SuSE) } :htext :note - .note.ABI-tag : { *(.note.ABI-tag) } :htext :note -+ .note.gnu.build-id : { *(.note.gnu.build-id) } :htext :note - .hash : { *(.hash) } :htext - .dynsym : { *(.dynsym) } :htext - .dynstr : { *(.dynstr) } :htext ---- a/ldscripts/elf_i386.xB -+++ b/ldscripts/elf_i386.xB -@@ -29,6 +29,7 @@ SECTIONS - .interp : { *(.interp) } :text :interp - .note.SuSE : { *(.note.SuSE) } :text :note - .note.ABI-tag : { *(.note.ABI-tag) } :text :note -+ .note.gnu.build-id : { *(.note.gnu.build-id) } :text :note - .hash : { *(.hash) } :text - .dynsym : { *(.dynsym) } - .dynstr : { *(.dynstr) } ---- a/ldscripts/elf_i386.xBDT -+++ b/ldscripts/elf_i386.xBDT -@@ -30,6 +30,7 @@ SECTIONS - .interp : { *(.interp) } :htext :interp - .note.SuSE : { *(.note.SuSE) } :htext :note - .note.ABI-tag : { *(.note.ABI-tag) } :htext :note -+ .note.gnu.build-id : { *(.note.gnu.build-id) } :htext :note - .hash : { *(.hash) } :htext - .dynsym : { *(.dynsym) } :htext - .dynstr : { *(.dynstr) } :htext ---- a/ldscripts/elf_x86_64.xB -+++ b/ldscripts/elf_x86_64.xB -@@ -29,6 +29,7 @@ SECTIONS - .interp : { *(.interp) } :text :interp - .note.SuSE : { *(.note.SuSE) } :text :note - .note.ABI-tag : { *(.note.ABI-tag) } :text :note -+ .note.gnu.build-id : { *(.note.gnu.build-id) } :text :note - .hash : { *(.hash) } :text - .dynsym : { *(.dynsym) } :text - .dynstr : { *(.dynstr) } :text ---- a/ldscripts/elf_x86_64.xBDT -+++ b/ldscripts/elf_x86_64.xBDT -@@ -31,6 +31,7 @@ SECTIONS - .hash : { *(.hash) } :htext - .note.SuSE : { *(.note.SuSE) } :htext :note - .note.ABI-tag : { *(.note.ABI-tag) } :htext :note -+ .note.gnu.build-id : { *(.note.gnu.build-id) } :htext :note - .dynsym : { *(.dynsym) } :htext - .dynstr : { *(.dynstr) } :htext - .gnu.version : { *(.gnu.version) } :htext diff --git a/libhugetlbfs.linkerscript.patch b/libhugetlbfs.linkerscript.patch deleted file mode 100644 index b7fa191..0000000 --- a/libhugetlbfs.linkerscript.patch +++ /dev/null @@ -1,61 +0,0 @@ -ADAM G. LITKE - -Libhugetlbfs ships a set of linker scripts which can be used to enable ELF -segment remapping into huge pages. These linker scripts -no longer work with the version of binutils shipped with SLES11. - -This has been a known problem. Linker scripts are essentially tied to specific -versions of binutils but libhugetlbfs only ships a single -set. To avoid maintaining and shipping an ever-growing number of linker -scripts, a new method of linking binaries for use with huge -pages was developed in libhugetlbfs-2.0. Unfortunately, some customers will -likely continue to use the old method of linking -binaries (with the shipped linker scripts) and will experience problems. The -solution to this problem is either to fix the linker scripts -for SLES11 by supplying a distro-specific patch, or strip out the deprecated -linker scripts so they cannot be used at all. I would prefer -to fix the linker scripts (if possible) to allow customers more time to switch -to the new linking method. - -Fix for ppc32 BDT script - -The only linker script that is known to have problems is the script used to -place text, data, and bss into huge pages on 32bit -PowerPC. The attached patch fixes the issue by adding the 'SPECIAL' notation -to the .plt and .got sections which is required for -correct functioning of the dynamic linker. - - ---- - ldscripts/elf32ppclinux.xBDT | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - ---- a/ldscripts/elf32ppclinux.xBDT -+++ b/ldscripts/elf32ppclinux.xBDT -@@ -163,8 +163,9 @@ SECTIONS - .got1 : { *(.got1) } :hdata - .got2 : { *(.got2) } :hdata - .dynamic : { *(.dynamic) } :dynamic :hdata -- .got : { *(.got.plt .got) } :hdata -+ .got : SPECIAL { *(.got) } :hdata - /* . = DATA_SEGMENT_RELRO_END (0, .); */ -+ .plt : SPECIAL { *(.plt) } :hdata - .data : - { - *(.data .data.* .gnu.linkonce.d.*) -@@ -172,6 +173,7 @@ SECTIONS - SORT(CONSTRUCTORS) - } :hdata - .data1 : { *(.data1) } :hdata -+ .got : SPECIAL { *(.got) } :hdata - /* We want the small data sections together, so single-instruction offsets - can access them all, and initialized data all before uninitialized, so - we can shorten the on-disk segment size. */ -@@ -190,7 +192,7 @@ SECTIONS - *(.scommon) - PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .); - } :hdata -- .plt : { *(.plt) } :hdata -+ .plt : SPECIAL { *(.plt) } :hdata - .bss : - { - *(.dynbss) diff --git a/libhugetlbfs.small_bss.patch b/libhugetlbfs.small_bss.patch deleted file mode 100644 index c0b9b63..0000000 --- a/libhugetlbfs.small_bss.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - elflink.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/elflink.c -+++ b/elflink.c -@@ -622,6 +622,10 @@ static int verify_segment_layout(struct - unsigned long prev_end = segs[i - 1].end; - unsigned long start = segs[i].start; - -+ /* Don't worry about consecutive normal page segments */ -+ if (!segs[i - 1].huge && !segs[i].huge) -+ continue; -+ - /* Make sure alignment hasn't caused segments to overlap */ - if (prev_end > start) { - WARNING("Layout problem with segments %i and %i:\n\t" diff --git a/libhugetlbfs.spec b/libhugetlbfs.spec index 195fd50..30e934a 100644 --- a/libhugetlbfs.spec +++ b/libhugetlbfs.spec @@ -29,7 +29,7 @@ Obsoletes: libhugetlbfs-64bit %endif # Version: 2.5 -Release: 2 +Release: 3 Url: http://libhugetlbfs.sourceforge.net/ BuildRoot: %{_tmppath}/%{name}-%{version}-build %define my_make_flags V=1 CFLAGS="$RPM_OPT_FLAGS -fPIC" BUILDTYPE=NATIVEONLY PREFIX=/usr LIBDIR32=%{_libdir} DESTDIR=$RPM_BUILD_ROOT @@ -40,7 +40,6 @@ Patch2: libhugetlbfs.s390.patch Patch3: libhugetlbfs.exchange_library_order.patch Patch4: libhugetlbfs.tests-malloc.patch Patch5: libhugetlbfs.run_test_fix.patch -#Patch7: libhugetlbfs.versioning.patch %description The libhugetlbfs package interacts with the Linux hugetlbfs to @@ -78,7 +77,11 @@ tests= %ifarch ppc ppc64 %ix86 x86_64 tests=install-tests %endif -make %{my_make_flags} install $tests +make \ +%ifarch sparc sparcv9 + CC32="gcc" CC64="" NATIVEONLY=1 \ +%endif + %{my_make_flags} install $tests mkdir -p $RPM_BUILD_ROOT/usr/include cp -avL hugetlbfs.h $RPM_BUILD_ROOT/usr/include chmod 644 $RPM_BUILD_ROOT%{_libdir}/*.a