From 8e5d4b046610f173e7e2e8b26f60606f13a2cb1d8a55fd7844fba2eb272f7c93 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Tue, 1 Mar 2016 08:42:59 +0000 Subject: [PATCH 1/2] Accepting request 363311 from home:pluskalm:branches:devel:tools:compiler - Update to 2.12 - Changes for 2.11.09 * Fix potential stack overwrite in macho32 backend. * Fix relocation records in macho64 backend. * Fix symbol lookup computation in macho64 backend. * Adjust .symtab and .rela.text sections alignments to 8 bytes in elf64 backed. OBS-URL: https://build.opensuse.org/request/show/363311 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/nasm?expand=0&rev=24 --- nasm-2.11.08.tar.xz | 3 --- nasm-2.12.tar.xz | 3 +++ nasm.changes | 37 +++++++++++++++++++++++++++++++++++++ nasm.spec | 42 ++++++++++++++++++++++++++++++++---------- 4 files changed, 72 insertions(+), 13 deletions(-) delete mode 100644 nasm-2.11.08.tar.xz create mode 100644 nasm-2.12.tar.xz diff --git a/nasm-2.11.08.tar.xz b/nasm-2.11.08.tar.xz deleted file mode 100644 index f5e9884..0000000 --- a/nasm-2.11.08.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c99467c7072211c550d147640d8a1a0aa4d636d4d8cf849f3bf4317d900a1f7f -size 764872 diff --git a/nasm-2.12.tar.xz b/nasm-2.12.tar.xz new file mode 100644 index 0000000..e3e5e42 --- /dev/null +++ b/nasm-2.12.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f34cc1e984ed619b8f9e96cea632e3c6fdea5e039069dbcb63397b7bd004f5a8 +size 774808 diff --git a/nasm.changes b/nasm.changes index 5fd5f6f..af8b2be 100644 --- a/nasm.changes +++ b/nasm.changes @@ -1,3 +1,40 @@ +------------------------------------------------------------------- +Tue Mar 1 07:48:37 UTC 2016 - mpluskal@suse.com + +- Update to 2.12 + * Major fixes to the macho backend (section 7.8); earlier + versions would produce invalid symbols and relocations on a + regular basis. + * Support for thread-local storage in Mach-O. + * Support for arbitrary sections in Mach-O. + * Fix wrong negative size treated as a big positive value passed + into backend causing NASM to crash. + * Fix handling of zero-extending unsigned relocations, we have + been printing wrong message and forgot to assign segment with + predefined value before passing it into output format. + * Fix potential write of oversized (with size greater than + allowed in output format) relative relocations. + * Portability fixes for building NASM with LLVM compiler. + * Add support of Codeview version 8 (cv8) debug format for win32 + and win64 formats in the COFF backend, see section 7.5.3. + * Allow 64-bit outputs in 16/32-bit only backends. Unsigned + 64-bit relocations are zero-extended from 32-bits with a + warning (suppressible via -w-zext-reloc); signed 64-bit + relocations are an arror. + * Line numbers in list files now correspond to the lines in the + source files, instead of simply being sequential. + * There is now an official 64-bit (x64 a.k.a. x86-64) build for + Windows. +- Changes for 2.11.09 + * Fix potential stack overwrite in macho32 backend. + * Fix relocation records in macho64 backend. + * Fix symbol lookup computation in macho64 backend. + * Adjust .symtab and .rela.text sections alignments to 8 bytes + in elf64 backed. + * Fix section length computation in bin backend which leaded in + incorrect relocation records. +- Update build dependencies + ------------------------------------------------------------------- Tue Feb 24 08:36:37 UTC 2015 - mpluskal@suse.com diff --git a/nasm.spec b/nasm.spec index 7a5ab00..535a754 100644 --- a/nasm.spec +++ b/nasm.spec @@ -1,7 +1,7 @@ # # spec file for package nasm # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,15 +17,18 @@ Name: nasm -Version: 2.11.08 +Version: 2.12 Release: 0 Summary: Netwide Assembler (An x86 Assembler) License: BSD-2-Clause Group: Development/Languages/Other Url: http://www.nasm.us/ Source: http://www.nasm.us/pub/nasm/releasebuilds/%{version}/nasm-%{version}.tar.xz +BuildRequires: asciidoc BuildRequires: fdupes +BuildRequires: groff BuildRequires: makeinfo +BuildRequires: xmlto BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -41,7 +44,7 @@ Read the licence agreement in %{_docdir}/nasm/Licence. Summary: Documentation for Nasm License: LGPL-2.1+ Group: Development/Languages/Other -Requires(post): info +Requires(post): info Requires(preun): info Provides: nasm:%{_docdir}/nasm/nasmdoc.pdf BuildArch: noarch @@ -56,8 +59,7 @@ sed -i "s/__DATE__/\"$TS\"/g" ver.c touch -r ./ver.c.stamp ./ver.c %configure make %{?_smp_mflags} all - -make -C doc %{?_smp_mflags} html info nasmdoc.ps nasmdoc.txt +make %{?_smp_mflags} -C doc html info nasmdoc.ps nasmdoc.txt %install install -d -m 755 %{buildroot}%{_prefix}/bin @@ -75,22 +77,42 @@ install -m 644 rdoff/README rdoff/doc/* \ install -m 644 doc/html/* %{buildroot}%{_docdir}/nasm/html install -m 644 ndisasm.1 nasm.1 rdoff/*.1 %{buildroot}%{_mandir}/man1 install -m 644 doc/info/* %{buildroot}%{_infodir} -%fdupes -s %{buildroot}%/* +%fdupes -s %{buildroot}% %post doc %install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz -%postun doc +%preun doc %install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz %files %defattr(-,root,root) -%{_bindir}/* -%doc %{_mandir}/man1/*.1.gz +%{_bindir}/ldrdf +%{_bindir}/nasm +%{_bindir}/ndisasm +%{_bindir}/rdf2bin +%{_bindir}/rdf2com +%{_bindir}/rdf2ihx +%{_bindir}/rdf2ith +%{_bindir}/rdf2srec +%{_bindir}/rdfdump +%{_bindir}/rdflib +%{_bindir}/rdx +%{_mandir}/man1/ldrdf.1%{ext_man} +%{_mandir}/man1/nasm.1%{ext_man} +%{_mandir}/man1/ndisasm.1%{ext_man} +%{_mandir}/man1/rdf2bin.1%{ext_man} +%{_mandir}/man1/rdf2com.1%{ext_man} +%{_mandir}/man1/rdf2ihx.1%{ext_man} +%{_mandir}/man1/rdf2ith.1%{ext_man} +%{_mandir}/man1/rdf2srec.1%{ext_man} +%{_mandir}/man1/rdfdump.1%{ext_man} +%{_mandir}/man1/rdflib.1%{ext_man} +%{_mandir}/man1/rdx.1%{ext_man} %files doc %defattr(-,root,root) %doc %{_docdir}/nasm -%doc %{_infodir}/nasm* +%{_infodir}/nasm* %changelog From f2333f50ce112205fe3dfb9c1ef63f383edc05515c99282ffd705d411c7c2885 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Wed, 2 Mar 2016 12:39:59 +0000 Subject: [PATCH 2/2] Accepting request 364133 from home:michel_mno:branches:devel:tools:compiler - new nasm_change_unused.patch to avoid PowerPC build error OBS-URL: https://build.opensuse.org/request/show/364133 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/nasm?expand=0&rev=25 --- nasm.changes | 5 +++++ nasm.spec | 2 ++ nasm_change_unused.patch | 42 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 nasm_change_unused.patch diff --git a/nasm.changes b/nasm.changes index af8b2be..88f5051 100644 --- a/nasm.changes +++ b/nasm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Mar 2 11:36:33 UTC 2016 - normand@linux.vnet.ibm.com + +- new nasm_change_unused.patch to avoid PowerPC build error + ------------------------------------------------------------------- Tue Mar 1 07:48:37 UTC 2016 - mpluskal@suse.com diff --git a/nasm.spec b/nasm.spec index 535a754..d533573 100644 --- a/nasm.spec +++ b/nasm.spec @@ -24,6 +24,7 @@ License: BSD-2-Clause Group: Development/Languages/Other Url: http://www.nasm.us/ Source: http://www.nasm.us/pub/nasm/releasebuilds/%{version}/nasm-%{version}.tar.xz +Patch1: nasm_change_unused.patch BuildRequires: asciidoc BuildRequires: fdupes BuildRequires: groff @@ -39,6 +40,7 @@ Read the licence agreement in %{_docdir}/nasm/Licence. %prep %setup -q +%patch1 -p1 %package doc Summary: Documentation for Nasm diff --git a/nasm_change_unused.patch b/nasm_change_unused.patch new file mode 100644 index 0000000..cca65c2 --- /dev/null +++ b/nasm_change_unused.patch @@ -0,0 +1,42 @@ +From: Michel Normand +Subject: nasm change unused +Date: Wed, 02 Mar 2016 12:38:37 +0100 + +nasm change _unused to xunused to avoid conflict +when building on PowerPC + +Signed-off-by: Michel Normand +--- + compiler.h | 4 ++-- + output/outmacho.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +Index: nasm-2.12/compiler.h +=================================================================== +--- nasm-2.12.orig/compiler.h ++++ nasm-2.12/compiler.h +@@ -82,9 +82,9 @@ + #endif + + #ifdef __GNUC__ +-# define _unused __attribute__((unused)) ++# define xunused __attribute__((unused)) + #else +-# define _unused ++# define xunused + #endif + + /* Some versions of MSVC have these only with underscores in front */ +Index: nasm-2.12/output/outmacho.c +=================================================================== +--- nasm-2.12.orig/output/outmacho.c ++++ nasm-2.12/output/outmacho.c +@@ -301,7 +301,7 @@ static uint64_t rel_padcnt = 0; + ALIGN(x, fmt.ptrsize) /* align x to output format width */ + + static void debug_reloc (struct reloc *); +-static void debug_section_relocs (struct section *) _unused; ++static void debug_section_relocs (struct section *) xunused; + + static struct section *get_section_by_name(const char *segname, + const char *sectname)