diff options
53 files changed, 5268 insertions, 13386 deletions
diff --git a/debian/binutils-cross.overrides b/debian/binutils-cross.overrides index c053f0a..4724c18 100644 --- a/debian/binutils-cross.overrides +++ b/debian/binutils-cross.overrides @@ -3,3 +3,6 @@ # needed for kfreebsd and the hurd @PKG@ binary: file-in-unusual-dir + +# internal libs, with the target name encoded +@PKG@ binary: shlib-in-multi-arch-foreign-package diff --git a/debian/binutils-hppa64-linux-gnu.postinst b/debian/binutils-hppa64-linux-gnu.postinst deleted file mode 100644 index 9977c68..0000000 --- a/debian/binutils-hppa64-linux-gnu.postinst +++ /dev/null @@ -1,7 +0,0 @@ -#! /bin/sh - -set -e - -if [ "$1" = "configure" ]; then - ldconfig -fi diff --git a/debian/binutils-hppa64-linux-gnu.postrm b/debian/binutils-hppa64-linux-gnu.postrm deleted file mode 100644 index 33a236e..0000000 --- a/debian/binutils-hppa64-linux-gnu.postrm +++ /dev/null @@ -1,7 +0,0 @@ -#! /bin/sh - -set -e - -if [ "$1" = "remove" ]; then - ldconfig -fi diff --git a/debian/binutils-multiarch.postinst b/debian/binutils-multiarch.postinst.in index 0345fe6..a1a460e 100644 --- a/debian/binutils-multiarch.postinst +++ b/debian/binutils-multiarch.postinst.in @@ -6,6 +6,8 @@ # some other version of binutils-multiarch is installed. # So we remove the diversions in postinst, not preinst. set -e +ma=@DEB_MULTIARCH@ +triplet=@DEB_TRIPLET@ old_diversion() { local divertto file file=$1 @@ -47,6 +49,32 @@ old_diversion /usr/lib/ldscripts rm -f /usr/lib/libbfd-*-multiarch.so.0 rm -f /usr/lib/libopcodes-*-multiarch.so.0 -if [ "$1" = "configure" ]; then - ldconfig -fi +old_diversion /usr/bin/addr2line +old_diversion /usr/bin/ar +old_diversion /usr/bin/embedspu +old_diversion /usr/bin/gprof +old_diversion /usr/bin/nm +old_diversion /usr/bin/objcopy +old_diversion /usr/bin/objdump +old_diversion /usr/bin/ranlib +old_diversion /usr/bin/readelf +old_diversion /usr/bin/size +old_diversion /usr/bin/strings +old_diversion /usr/bin/strip + +case "$ma" in i386-*) + if test -n "$context" && dpkg --compare-versions "$2" lt "2.27-8"; then + old_diversion /usr/bin/$ma-addr2line + old_diversion /usr/bin/$ma-ar + old_diversion /usr/bin/$ma-embedspu + old_diversion /usr/bin/$ma-gprof + old_diversion /usr/bin/$ma-nm + old_diversion /usr/bin/$ma-objcopy + old_diversion /usr/bin/$ma-objdump + old_diversion /usr/bin/$ma-ranlib + old_diversion /usr/bin/$ma-readelf + old_diversion /usr/bin/$ma-size + old_diversion /usr/bin/$ma-strings + old_diversion /usr/bin/$ma-strip + fi +esac diff --git a/debian/binutils-multiarch.postrm.in b/debian/binutils-multiarch.postrm.in index 9c57ec2..7b94385 100644 --- a/debian/binutils-multiarch.postrm.in +++ b/debian/binutils-multiarch.postrm.in @@ -1,6 +1,8 @@ #! /bin/sh set -e this_ver=@DEB_VER@; # this version +ma=@DEB_MULTIARCH@ +triplet=@DEB_TRIPLET@ # action: upgrade, abort-upgrade, remove, abort-install, disappear, # purge, or failed-upgrade. context=$1 @@ -41,9 +43,5 @@ diversion() { for prog in nm objdump objcopy strings strip size \ ar ranlib addr2line gprof readelf do - diversion 2.9.5.0.16-1 "/usr/bin/$prog" + diversion 2.27-8 "/usr/bin/$triplet-$prog" done - -if [ "$1" = "remove" ]; then - ldconfig -fi diff --git a/debian/binutils-multiarch.preinst.in b/debian/binutils-multiarch.preinst.in index 2853a74..385f625 100644 --- a/debian/binutils-multiarch.preinst.in +++ b/debian/binutils-multiarch.preinst.in @@ -1,6 +1,8 @@ #! /bin/sh set -e new_ver=@DEB_VER@; # this version +ma=@DEB_MULTIARCH@ +triplet=@DEB_TRIPLET@ context=$1; # why to install (install, upgrade, or abort-upgrade) old_ver=$2; # version being replaced, if any @@ -23,5 +25,5 @@ diversion() { for prog in nm objdump objcopy strings strip size \ ar ranlib addr2line gprof readelf do - diversion 2.9.5.0.16-1 "/usr/bin/$prog" + diversion 2.27-8 "/usr/bin/$triplet-$prog" done diff --git a/debian/binutils-multiarch.prerm.in b/debian/binutils-multiarch.prerm.in index d2781a2..45e273b 100644 --- a/debian/binutils-multiarch.prerm.in +++ b/debian/binutils-multiarch.prerm.in @@ -14,6 +14,8 @@ # binutils-multiarch is installed. set -e this_ver=@DEB_VER@; # this version +ma=@DEB_MULTIARCH@ +triplet=@DEB_TRIPLET@ context=$1; # action: upgrade, remove, deconfigure, or failed-upgrade. if test "$context" = failed-upgrade && @@ -64,3 +66,33 @@ old_diversion /usr/lib/ldscripts rm -f /usr/lib/libbfd-*-multiarch.so.0 rm -f /usr/lib/libopcodes-*-multiarch.so.0 + +old_diversion /usr/bin/addr2line +old_diversion /usr/bin/ar +old_diversion /usr/bin/embedspu +old_diversion /usr/bin/gprof +old_diversion /usr/bin/nm +old_diversion /usr/bin/objcopy +old_diversion /usr/bin/objdump +old_diversion /usr/bin/ranlib +old_diversion /usr/bin/readelf +old_diversion /usr/bin/size +old_diversion /usr/bin/strings +old_diversion /usr/bin/strip + +case "$ma" in i386-*) + if test -n "$context" && dpkg --compare-versions "$2" lt "2.27-8"; then + old_diversion /usr/bin/$ma-addr2line + old_diversion /usr/bin/$ma-ar + old_diversion /usr/bin/$ma-embedspu + old_diversion /usr/bin/$ma-gprof + old_diversion /usr/bin/$ma-nm + old_diversion /usr/bin/$ma-objcopy + old_diversion /usr/bin/$ma-objdump + old_diversion /usr/bin/$ma-ranlib + old_diversion /usr/bin/$ma-readelf + old_diversion /usr/bin/$ma-size + old_diversion /usr/bin/$ma-strings + old_diversion /usr/bin/$ma-strip + fi +esac diff --git a/debian/binutils.postinst b/debian/binutils.postinst deleted file mode 100644 index 9977c68..0000000 --- a/debian/binutils.postinst +++ /dev/null @@ -1,7 +0,0 @@ -#! /bin/sh - -set -e - -if [ "$1" = "configure" ]; then - ldconfig -fi diff --git a/debian/binutils.postrm b/debian/binutils.postrm deleted file mode 100644 index 33a236e..0000000 --- a/debian/binutils.postrm +++ /dev/null @@ -1,7 +0,0 @@ -#! /bin/sh - -set -e - -if [ "$1" = "remove" ]; then - ldconfig -fi diff --git a/debian/binutils.triggers b/debian/binutils.triggers new file mode 100644 index 0000000..dd86603 --- /dev/null +++ b/debian/binutils.triggers @@ -0,0 +1 @@ +activate-noawait ldconfig diff --git a/debian/changelog b/debian/changelog index 10955c6..96a4f33 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,425 @@ +binutils (2.28-5) unstable; urgency=medium + + * Update, taken from the 2.28 branch 20170510. + - RISC-V updates. + - Fix PR ld/21334 (MIPS), + - VxWorks fix. + - Fix PR ld/16044 (CRIS). + * Fix PR binutils/21412, global-buffer-overflow in objcopy. CVE-2017-8393. + * Fix PR binutils/21414, segfault in objcopy. CVE-2017-8394. + * Fix PR binutils/21431, objcopy segfault - null pointer dereferencing. + CVE-2017-8395. + * Fix PR binutils/21432, heap buffer overflow in objdump. CVE-2017-8396. + * Fix PR binutils/21434, heap buffer overflow in objdump. CVE-2017-8397. + * Fix PR binutils/21438, heap buffer overflow in printf_common. + CVE-2017-8398. + * Fix PR binutils/21440, prevent memory exhaustion from a corrupt PE binary + with an overlarge number of relocs. CVE-2017-8421. + * gold (SPARC): Fix assertion failure relaxing TLS for position-independent + executables. Closes: #862017. + + -- Matthias Klose <doko@debian.org> Wed, 10 May 2017 12:12:53 +0200 + +binutils (2.28-4) unstable; urgency=medium + + * Update, taken from the 2.28 branch 20170418. + - Fix PR ld/21233: Avoid sweeping forced-undefined symbols in section GC. + - BFD fix. + - Fix PR ld/19579, PR ld/21306, link error with PIE on s390x. + * Fix PR binutils/21342, null pointer dereferences when using a link built + with clang. Closes: #859989. CVE-2017-7614. + + -- Matthias Klose <doko@debian.org> Tue, 18 Apr 2017 08:08:02 +0630 + +binutils (2.28-3) unstable; urgency=medium + + * Update, taken from the 2.28 branch 20170405. + - RISC-V updates. + - Fix PR binutils/21303 (PPC), objdump doesn't show e200z4 insns. + - S/390: Remove vx2 facility flag. + - Update -maltivec and -mvsx options to only enable their oldest + instructions (PPC). + - Add support for the new 'lnia' extended mnemonic (PPC). + - Fix ld uninitialized read of script ASSERT data structure. + * Fix incorrect library search order on PowerPC, taken from the trunk. + * Fix PR ld/21233 (MIPS only), taken from the trunk. Closes: #857017. + * Fix a french translation. Closes: #859503. + * Fix PR binutils/21157, handling of corrupt STABS enum type strings. + Closes: #858324. CVE-2017-7210. + * Fix PR binutils/21137, readelf writing to illegal addresses. + Closes: #858264. CVE-2017-6965. + * Fix PR binutils/21156, illegal memory accesses in readelf. + Closes: #858256. CVE-2017-6969. + * Fix PR binutils/21139, read-after-free error in readelf. + Closes: #858263. CVE-2017-6966. + * Fix PR binutils/21135, invalid read of section contents. + Closes: #858323. CVE-2017-7209. + * Fix PR demangler/70909, libiberty Demangler segfaults. CVE-2016-4491. + + -- Matthias Klose <doko@debian.org> Wed, 05 Apr 2017 17:48:03 +0200 + +binutils (2.28-2) unstable; urgency=medium + + * Update, taken from the 2.28 branch 20170307. + - Fix PR ld/20519, PR binutils/21224, PR binutils/21124 (all PPC). + + -- Matthias Klose <doko@debian.org> Tue, 07 Mar 2017 11:09:19 +0100 + +binutils (2.28-1) unstable; urgency=medium + + * binutils 2.28 release. + - S/390: Add support for new cpu architecture - arch12. + - S/390: Issue error for overflowing relocs. + - Fix PR gas/20744 (PPC32): Correct VLE 16D and SDAREL relocations. + - Fix PowerPC ld segfault on script discarding dynamic sections. + - Sync libiberty sources with GCC mainline. Fixes PR PR c++/70182, + PR c++/77489, PR c++/78761. + - Nios2 dynobj handling fixes. + - Don't make dynamic .data.rel.ro SEC_READONLY. + - PowerPC addpcis fix. + - RISC-V updates. + - [AArch64] Additional SVE instructions, add a "compnum" feature, + add SVE system registers, fix +sve documentation, add separate + feature flag for weaker release consistent load insns. + * Don't install windows related man pages in cross packages. Closes: #855630. + * Fix ld.1 symlink for targets without gold. + + -- Matthias Klose <doko@debian.org> Thu, 02 Mar 2017 14:39:24 +0100 + +binutils (2.27.90.20170221-1) unstable; urgency=medium + + * New upstream snapshot, taken from the binutils 2.28 branch. + - Fix Alpha executables segfaulting when linked with -z,now. + * Don't install windows related man pages in cross packages. Closes: #855630. + * Don't install the embedspu binary for powerpcspe. Closes: #850691. + + -- Matthias Klose <doko@debian.org> Tue, 21 Feb 2017 13:06:04 +0100 + +binutils (2.27.90.20170218-1) unstable; urgency=medium + + * New upstream snapshot, taken from the binutils 2.28 branch. + - Fix PR ld/21000, PR ld/21132 (closes: #855095). + - Fix powerpc testsuite source errors. + - Fix PR ld/21168, i386: Allow "lea foo@GOT, %reg" in PIC + - opcodes: Fix use after free in cgen instruction lookup. + - MIPS/BFD: Respect the ELF gABI dynamic symbol table sort requirement. + - MIPS/BFD: Use `bfd_size_type' for dynamic symbol table indices. + - MIPS/BFD: Streamline hash table references in `mips_elf_sort_hash_table'. + - MIPS/BFD: Fix assertion in `mips_elf_sort_hash_table'. + - POWER9: Add scv/rfscv instruction support. + - RiscV updates. + + -- Matthias Klose <doko@debian.org> Sat, 18 Feb 2017 05:37:06 +0100 + +binutils (2.27.90.20170205-1) unstable; urgency=medium + + * New upstream snapshot, taken from the binutils 2.28 branch. + - MIPS/LD/testsuite: Correct relocation addends in VxWorks tests. + - MIPS/LD/testsuite: Fix a `tls-multi-got-1-1.s' build failure. + - MIPS: Add options to control branch ISA checks. + - MIPS/GAS/testsuite: Convert branch local list tests to dump tests. + - Fix PR ld/20995 for cris-linux. + - gold: Fix PPC64 TOC indirect to TOC relative segfault. + - Fix PR ld/21000, support -z relro on hppa. Other hppa updates. + - PR binutils/19935: Fix fallout from now-default initfini-array. + + -- Matthias Klose <doko@debian.org> Sun, 05 Feb 2017 21:05:07 +0100 + +binutils (2.27.90.20170124-2) unstable; urgency=medium + + * Revert the commit causing PR 21074. Works around #852035. + + -- Matthias Klose <doko@debian.org> Thu, 26 Jan 2017 18:09:09 +0100 + +binutils (2.27.90.20170124-1) unstable; urgency=medium + + * New upstream snapshot, taken from the binutils 2.28 branch. + - Fix PR gold/21054 (closes: #851736). + + -- Matthias Klose <doko@debian.org> Tue, 24 Jan 2017 15:24:49 +0100 + +binutils (2.27.90.20170118-1) unstable; urgency=medium + + * New upstream snapshot, taken from the binutils 2.28 branch. + - Fix PR binutils/21059, PR gas/20992, PR gas/20649, + PR binutils/20828 (closes: #844227). + + -- Matthias Klose <doko@debian.org> Wed, 18 Jan 2017 20:05:43 +0100 + +binutils (2.27.90.20170114-1) unstable; urgency=medium + + * New upstream snapshot, taken from the binutils 2.28 branch. + - Fix PR ld/21038, PR ld/20830, PR gold/21040. + * Apply proposed patch for PR binutils/20828 (mips). Addresses: #844227. + + -- Matthias Klose <doko@debian.org> Sat, 14 Jan 2017 11:43:57 +0100 + +binutils (2.27.90.20170113-1) unstable; urgency=medium + + * New upstream snapshot, taken from the binutils 2.28 branch. + - Fix PR binutils/20876 (closes: #838875), PR gold/21040, + PR gold/21039. + + -- Matthias Klose <doko@debian.org> Fri, 13 Jan 2017 13:31:53 +0100 + +binutils (2.27.90.20170109-1) unstable; urgency=medium + + * New upstream snapshot, taken from the binutils 2.28 branch. + - Fix PR ld/20989. + + -- Matthias Klose <doko@debian.org> Mon, 09 Jan 2017 11:03:34 +0100 + +binutils (2.27.90.20161231-1) unstable; urgency=medium + + * New upstream snapshot, taken from the binutils 2.28 branch. + - Fix PR ld/20995, PR binutils/20464, PR binutils/14625, PR gas/10946, + PR gold/20996, PR gold/17643. + + -- Matthias Klose <doko@debian.org> Sat, 31 Dec 2016 02:10:21 +0100 + +binutils (2.27.51.20161220-1) unstable; urgency=medium + + * New upstream snapshot, taken from the trunk. + - Fix PR ld/20968 (closes: #848731), PR ld/20908, PR gold/20949, + PR gold/14676, PR gold/20983, PR gold/20976, PR gold/20749, + PR gold/20522, PR gold/14676, PR gold/16711, PR gold/20717, PR c++/78252. + + -- Matthias Klose <doko@debian.org> Tue, 20 Dec 2016 09:11:49 +0100 + +binutils (2.27.51.20161212-1) unstable; urgency=medium + + * New upstream snapshot, taken from the trunk. + - Implements --push-state/--pop-state for gold. + - Fix PR ld/20908, PR ld/20909, PR gas/20898, PR gas/20897, PR gold/20717, + PR gold/20834, PR gold/18989, PR ld/20910, PR ld/20911, PR ld/20912, + PR ld/20932, PR binutils/20931, PR binutils/20929, PR binutils/20905, + PR binutils/20907, PR binutils/20921, PR binutils/20922, PR ld/20925, + PR ld/20924, PR binutils/20930, PR ld/20923, PR gas/20901, PR gas/20896, + PR gas/20902, PR gas/20904, PR gold/20717, PR gold/16711, PR gold/20878, + PR ld/20906. + + -- Matthias Klose <doko@debian.org> Mon, 12 Dec 2016 13:49:47 +0100 + +binutils (2.27.51.20161201-1) unstable; urgency=medium + + * New upstream snapshot, taken from the trunk. + - Update PR ld/20815 (closes: #845690). + - Fix PR ld/20868 (AArch64), PR ld/16720 (mips), PR binutils/20891, + PR binutils/20892, PR ld/20886 (PPC64), PR gas/20895, PR binutils/20637, + PR binutils/20893. + + -- Matthias Klose <doko@debian.org> Thu, 01 Dec 2016 15:55:10 +0100 + +binutils (2.27.51.20161127-1) unstable; urgency=high + + * New upstream snapshot, taken from the trunk. + - Fix PR target/20737 (ARM32), PR ld/20858. + * Revert the fix for PR ld/20815. Addresses: #845690. + + -- Matthias Klose <doko@debian.org> Sun, 27 Nov 2016 21:00:36 +0100 + +binutils (2.27.51.20161124-1) unstable; urgency=medium + + * New upstream snapshot, taken from the trunk. + - Fix PR ld/20815, PR gas/20744, PR gas/20827, PR gold/20346, + PR gold/20693. + * Fix PR ld/20858, error handling $ORIGIN variable. + Closes: #845171, #844847. + + -- Matthias Klose <doko@debian.org> Thu, 24 Nov 2016 03:34:06 +0100 + +binutils (2.27.51.20161118-2) unstable; urgency=medium + + * Revert problematic sparc64 GOT patch (closes: #844782). + + -- Matthias Klose <doko@debian.org> Sat, 19 Nov 2016 13:40:17 +0100 + +binutils (2.27.51.20161118-1) unstable; urgency=medium + + * New upstream snapshot, taken from the trunk. + - SPARC updates, ARMv8.3 updates. + - Fix PR ld/20675. + * Fix typo in debian changelog. Closes: #843710. + + -- Matthias Klose <doko@debian.org> Fri, 18 Nov 2016 14:11:45 +0100 + +binutils (2.27.51.20161116-2) unstable; urgency=medium + + * Stop building the mipsr6 mipsr6el mipsn32r6 mipsn32r6el mips64r6 mips64r6el + variants; can't continue with this work, because package uploads with + these architectures are still rejected. + * Add homepage attribute to the control file: Closes: #841432. + * ld: enable new dtags by default for linux/gnu targets. Closes: #835859. + * Fix PR ld/20827, using proposed patch. Closes: #844378. + + -- Matthias Klose <doko@debian.org> Thu, 17 Nov 2016 11:56:55 +0100 + +binutils (2.27.51.20161116-1) unstable; urgency=medium + + * New upstream snapshot, taken from the trunk. + - Fix PR ld/20789 (AVR), PR ld/20800 (x86), PR target/20737 (AArch64), + PR binutils/20801, PR binutils/20814, PR binutils/20751, + PR binutils/20794, PR gas/20803 (SPARC), PR gas/20732, + PR binutils/20799 (x86), PR binutils/20754 (x86), PR binutils/20701 (x86), + + -- Matthias Klose <doko@debian.org> Wed, 16 Nov 2016 11:50:32 +0100 + +binutils (2.27.51.20161108-1) unstable; urgency=medium + + * New upstream snapshot, taken from the trunk. + - Fix PR ld/20535 and PR ld/20784. + + -- Matthias Klose <doko@debian.org> Tue, 08 Nov 2016 12:14:20 +0100 + +binutils (2.27.51.20161105-2) unstable; urgency=medium + + * Revert fix for PR ld/20535, causing PR ld/20784. Closes: #843339. + + -- Matthias Klose <doko@debian.org> Sun, 06 Nov 2016 17:36:45 +0100 + +binutils (2.27.51.20161105-1) unstable; urgency=medium + + * New upstream snapshot, taken from the trunk. + * Disable the work around for the build failure on mips* targets. + + -- Matthias Klose <doko@debian.org> Sat, 05 Nov 2016 13:12:01 +0100 + +binutils (2.27.51.20161102-1) unstable; urgency=medium + + * New upstream snapshot, taken from the trunk. + Security issues fixed: CVE-2016-6131, CVE-2016-4493, CVE-2016-4492, + CVE-2016-4490, CVE-2016-4489, CVE-2016-4488, CVE-2016-4487, CVE-2016-2226. + + -- Matthias Klose <doko@debian.org> Wed, 02 Nov 2016 20:38:57 +0100 + +binutils (2.27.51.20161027-2) experimental; urgency=medium + + * Work around build failure on mips* targets. + + -- Matthias Klose <doko@debian.org> Sun, 30 Oct 2016 19:35:41 +0200 + +binutils (2.27.51.20161027-1) experimental; urgency=medium + + * New upstream snapshot, taken from the trunk. + + -- Matthias Klose <doko@debian.org> Thu, 27 Oct 2016 16:57:21 +0200 + +binutils (2.27-9) unstable; urgency=medium + + * Update, taken from the 2.27 branch 20161014. + - Fix PR ld/20608, PR ld/20545, PR gold/20238. + * Fix cross build for non-standard cross archs (Helmut Grohne). + Closes: #839956. + * Fix ld segfault on ARM32, taken from the trunk. Closes: #840374. + * Fix PR ld/20648, taken from the trunk. Closes: #835544. + * Fix PR ld/20649, using proposed patch. Closes: #834147. + + -- Matthias Klose <doko@debian.org> Mon, 17 Oct 2016 13:12:51 +0200 + +binutils (2.27-8) unstable; urgency=medium + + * Fix diversion updates for 32bit x86 targets. + * Update Break for hardening-wrapper. + + -- Matthias Klose <doko@debian.org> Wed, 31 Aug 2016 10:11:22 +0200 + +binutils (2.27-7) unstable; urgency=medium + + * Update, taken from the 2.27 branch 20160830. + - Fix PR ld/20531. + * Fix diversion updates. Closes: #834836. + + -- Matthias Klose <doko@debian.org> Tue, 30 Aug 2016 16:24:37 +0200 + +binutils (2.27-6) unstable; urgency=high + + * Update, taken from the 2.27 branch 20160819. + - Fix PR ld/20472. + * binutils-multiarch: Divert the triplet-prefixed names. Closes: #834253. + + -- Matthias Klose <doko@debian.org> Fri, 19 Aug 2016 07:02:50 +0200 + +binutils (2.27-5) unstable; urgency=high + + * Update, taken from the 2.27 branch 20160812. + * Fix unexecutable MIPS binaries with -Wl,-z,noexecstack (Aurelian Jarno). + Closes: #834096. + + -- Matthias Klose <doko@debian.org> Fri, 12 Aug 2016 09:27:17 +0200 + +binutils (2.27-4) unstable; urgency=medium + + * Fix gold on mipsr6 targets (Aurelian Jarno). + + -- Matthias Klose <doko@debian.org> Tue, 09 Aug 2016 21:58:13 +0200 + +binutils (2.27-3) unstable; urgency=medium + + * Backport patches to fix gold on sparc64 (James Clarke). Closes: #833688. + * Fix gold on mips64 targets (Aurelian Jarno). Closes: #833654. + + -- Matthias Klose <doko@debian.org> Tue, 09 Aug 2016 12:15:51 +0200 + +binutils (2.27-2) unstable; urgency=medium + + * Disable gold for all mips cross targets too. + + -- Matthias Klose <doko@debian.org> Sun, 07 Aug 2016 16:30:20 +0200 + +binutils (2.27-1) unstable; urgency=medium + + * binutils 2.27 release. + * Update, taken from the 2.27 branch 20160807. + * Re-enable gold on sparc and sparc64. Closes: #818934. + * Disable SH64 support for the multilib build. + * Disable gold on all mips targets, currently fails to link. + + -- Matthias Klose <doko@debian.org> Sun, 07 Aug 2016 13:38:27 +0200 + +binutils (2.26.1-1) unstable; urgency=medium + + * binutils 2.26.1 release. + + -- Matthias Klose <doko@debian.org> Thu, 30 Jun 2016 10:37:37 +0200 + +binutils (2.26-12) unstable; urgency=medium + + * Update, taken from the 2.26 branch 20160624. + - Fix PR ld/20254 (AVR), PR ld/20221 (AVR), PR ld/20244 (x86). + - Support for three more new POWER9 instructions. + * Cherry pick backports for AArch64 vulcan support (Dann Frazier). + LP: #1594452. + + -- Matthias Klose <doko@debian.org> Fri, 24 Jun 2016 10:42:57 +0200 + +binutils (2.26-11) unstable; urgency=medium + + * Update, taken from the 2.26 branch 20160610. + - Fix PR ld/20159, reverting the change for PR ld/16467. LP: #1588123. + * Use ldconfig triggers instead of calling ldconfig directly. + + -- Matthias Klose <doko@debian.org> Fri, 10 Jun 2016 18:37:39 +0200 + +binutils (2.26-10) unstable; urgency=medium + + * Update, taken from the 2.26 branch 20160601. + - Fix PR ld/20117, PR ld/20030, PR ld/20093. + - Support for a few more new POWER9 instructions. + * Build for N32 and MIPS r6 (YunQiang Su). Closes: #807377. + * Mark cross binutils as M-A: foreign (Helmut Grohne). Closes: #824424. + * More reproducible build fixes (Chris Lamb). Closes: #824413. + * Fix PR ld/19886, --as-needed regression, taken from the trunk. + + -- Matthias Klose <doko@debian.org> Wed, 01 Jun 2016 21:31:32 +0200 + +binutils (2.26-9) unstable; urgency=medium + + * Update, taken from the 2.26 branch 20160512. + - Fix PR ld/19878, PR ld/19827, PR gas/19909, PR ld/20006, PR gold/19047, + PR gas/20047, PR 20060. + + -- Matthias Klose <doko@debian.org> Thu, 12 May 2016 16:59:29 +0200 + binutils (2.26-8+dyson2) unstable; urgency=medium * Added debian/patches/dyson-pr12548-anonymous-version-tag.patch @@ -4030,7 +4452,7 @@ binutils (2.9.5.0.12-1) unstable; urgency=low * Update Standards version * FHS compliance - -- Christopher C. Chimelis <chris@classnet.med.miami.edu> Sat, 18 Sept 1999 01:21:05 -0400 + -- Christopher C. Chimelis <chris@classnet.med.miami.edu> Sat, 18 Sep 1999 01:21:05 -0400 binutils (2.9.5.0.12-0.2) experimental; urgency=low diff --git a/debian/control b/debian/control index 7680c2c..38e66b8 100644 --- a/debian/control +++ b/debian/control @@ -2,23 +2,26 @@ Source: binutils Section: devel Priority: optional Maintainer: Matthias Klose <doko@debian.org> -Uploaders: James Troup <james@nocrew.org>, Daniel Jacobowitz <dan@debian.org> -Standards-Version: 3.9.7 +Uploaders: James Troup <binutils@elmo.tasta.io>, Daniel Jacobowitz <dan@debian.org> +Standards-Version: 3.9.8 Build-Depends: autoconf (>= 2.64), dpkg-dev (>= 1.17.11), bison, flex, gettext, texinfo, dejagnu, quilt, chrpath, python3:any, file, xz-utils, lsb-release, zlib1g-dev -Vcs-Browser: https://code.launchpad.net/~doko/binutils/pkg-2.25-debian -Vcs-Bzr: http://bazaar.launchpad.net/~doko/binutils/pkg-2.25-debian +Build-Conflicts: libelf-dev +Homepage: https://www.gnu.org/software/binutils/ +Vcs-Browser: https://code.launchpad.net/~doko/binutils/pkg-2.28-debian +Vcs-Bzr: http://bazaar.launchpad.net/~doko/binutils/pkg-2.28-debian XS-Testsuite: autopkgtest Package: binutils Architecture: any Depends: ${shlibs:Depends} Conflicts: gas, elf-binutils, modutils (<< 2.4.19-1), ${extraConflicts}, - binutils-gold (<< 2.20.51.20100415) + binutils-gold (<< 2.20.51.20100415), + binutils-multiarch (<< 2.27-8) Breaks: binutils-mingw-w64-i686 (<< 2.23.52.20130612-1+3), binutils-mingw-w64-x86-64 (<< 2.23.52.20130612-1+3), - hardening-wrapper (<< 2.8) + hardening-wrapper (<< 2.8+nmu3) Replaces: binutils-gold (<< 2.20.51.20100415), binutils-mingw-w64-i686 (<< 2.23.52.20130612-1+3), binutils-mingw-w64-x86-64 (<< 2.23.52.20130612-1+3) @@ -89,6 +92,7 @@ Description: GNU assembler, linker and binary utilities targeted for hppa64-linu Package: binutils-doc Section: doc Architecture: all +Multi-Arch: foreign Priority: optional Depends: dpkg (>= 1.15.4) | install-info Conflicts: binutils (<< 2.9.1.0.25-3) @@ -99,6 +103,7 @@ Description: Documentation for the GNU assembler, linker and binary utilities Package: binutils-source Architecture: all +Multi-Arch: foreign Priority: optional Depends: texinfo, zlib1g-dev, make, python Description: GNU assembler, linker and binary utilities (source) @@ -111,6 +116,7 @@ Depends: binutils (= ${binary:Version}), ${shlibs:Depends} Suggests: binutils-doc (= ${source:Version}) Provides: Priority: extra +Multi-Arch: foreign Description: GNU binary utilities, for s390x-linux-gnu target This package provides GNU assembler, linker and binary utilities for s390x-linux-gnu target, for use in a cross-compilation environment. @@ -124,6 +130,7 @@ Depends: binutils (= ${binary:Version}), ${shlibs:Depends} Suggests: binutils-doc (= ${source:Version}) Provides: Priority: extra +Multi-Arch: foreign Description: GNU binary utilities, for powerpc64le-linux-gnu target This package provides GNU assembler, linker and binary utilities for powerpc64le-linux-gnu target, for use in a cross-compilation environment. @@ -137,6 +144,7 @@ Depends: binutils (= ${binary:Version}), ${shlibs:Depends} Suggests: binutils-doc (= ${source:Version}) Provides: Priority: extra +Multi-Arch: foreign Description: GNU binary utilities, for powerpc-linux-gnu target This package provides GNU assembler, linker and binary utilities for powerpc-linux-gnu target, for use in a cross-compilation environment. @@ -150,6 +158,7 @@ Depends: binutils (= ${binary:Version}), ${shlibs:Depends} Suggests: binutils-doc (= ${source:Version}) Provides: Priority: extra +Multi-Arch: foreign Description: GNU binary utilities, for aarch64-linux-gnu target This package provides GNU assembler, linker and binary utilities for aarch64-linux-gnu target, for use in a cross-compilation environment. @@ -163,6 +172,7 @@ Depends: binutils (= ${binary:Version}), ${shlibs:Depends} Suggests: binutils-doc (= ${source:Version}) Provides: Priority: extra +Multi-Arch: foreign Description: GNU binary utilities, for arm-linux-gnueabihf target This package provides GNU assembler, linker and binary utilities for arm-linux-gnueabihf target, for use in a cross-compilation environment. @@ -176,6 +186,7 @@ Depends: binutils (= ${binary:Version}), ${shlibs:Depends} Suggests: binutils-doc (= ${source:Version}) Provides: Priority: extra +Multi-Arch: foreign Description: GNU binary utilities, for arm-linux-gnueabi target This package provides GNU assembler, linker and binary utilities for arm-linux-gnueabi target, for use in a cross-compilation environment. @@ -189,6 +200,7 @@ Depends: binutils (= ${binary:Version}), ${shlibs:Depends} Suggests: binutils-doc (= ${source:Version}) Provides: Priority: extra +Multi-Arch: foreign Description: GNU binary utilities, for mips-linux-gnu target This package provides GNU assembler, linker and binary utilities for mips-linux-gnu target, for use in a cross-compilation environment. @@ -202,6 +214,7 @@ Depends: binutils (= ${binary:Version}), ${shlibs:Depends} Suggests: binutils-doc (= ${source:Version}) Provides: Priority: extra +Multi-Arch: foreign Description: GNU binary utilities, for mipsel-linux-gnu target This package provides GNU assembler, linker and binary utilities for mipsel-linux-gnu target, for use in a cross-compilation environment. @@ -215,6 +228,7 @@ Depends: binutils (= ${binary:Version}), ${shlibs:Depends} Suggests: binutils-doc (= ${source:Version}) Provides: Priority: extra +Multi-Arch: foreign Description: GNU binary utilities, for alpha-linux-gnu target This package provides GNU assembler, linker and binary utilities for alpha-linux-gnu target, for use in a cross-compilation environment. @@ -228,6 +242,7 @@ Depends: binutils (= ${binary:Version}), ${shlibs:Depends} Suggests: binutils-doc (= ${source:Version}) Provides: Priority: extra +Multi-Arch: foreign Description: GNU binary utilities, for hppa-linux-gnu target This package provides GNU assembler, linker and binary utilities for hppa-linux-gnu target, for use in a cross-compilation environment. @@ -241,6 +256,7 @@ Depends: binutils (= ${binary:Version}), ${shlibs:Depends} Suggests: binutils-doc (= ${source:Version}) Provides: Priority: extra +Multi-Arch: foreign Description: GNU binary utilities, for m68k-linux-gnu target This package provides GNU assembler, linker and binary utilities for m68k-linux-gnu target, for use in a cross-compilation environment. @@ -254,6 +270,7 @@ Depends: binutils (= ${binary:Version}), ${shlibs:Depends} Suggests: binutils-doc (= ${source:Version}) Provides: Priority: extra +Multi-Arch: foreign Description: GNU binary utilities, for mips64-linux-gnuabi64 target This package provides GNU assembler, linker and binary utilities for mips64-linux-gnuabi64 target, for use in a cross-compilation environment. @@ -267,6 +284,7 @@ Depends: binutils (= ${binary:Version}), ${shlibs:Depends} Suggests: binutils-doc (= ${source:Version}) Provides: Priority: extra +Multi-Arch: foreign Description: GNU binary utilities, for mips64el-linux-gnuabi64 target This package provides GNU assembler, linker and binary utilities for mips64el-linux-gnuabi64 target, for use in a cross-compilation environment. @@ -280,6 +298,7 @@ Depends: binutils (= ${binary:Version}), ${shlibs:Depends} Suggests: binutils-doc (= ${source:Version}) Provides: Priority: extra +Multi-Arch: foreign Description: GNU binary utilities, for powerpc-linux-gnuspe target This package provides GNU assembler, linker and binary utilities for powerpc-linux-gnuspe target, for use in a cross-compilation environment. @@ -293,6 +312,7 @@ Depends: binutils (= ${binary:Version}), ${shlibs:Depends} Suggests: binutils-doc (= ${source:Version}) Provides: Priority: extra +Multi-Arch: foreign Description: GNU binary utilities, for powerpc64-linux-gnu target This package provides GNU assembler, linker and binary utilities for powerpc64-linux-gnu target, for use in a cross-compilation environment. @@ -306,6 +326,7 @@ Depends: binutils (= ${binary:Version}), ${shlibs:Depends} Suggests: binutils-doc (= ${source:Version}) Provides: Priority: extra +Multi-Arch: foreign Description: GNU binary utilities, for sh4-linux-gnu target This package provides GNU assembler, linker and binary utilities for sh4-linux-gnu target, for use in a cross-compilation environment. @@ -319,9 +340,38 @@ Depends: binutils (= ${binary:Version}), ${shlibs:Depends} Suggests: binutils-doc (= ${source:Version}) Provides: Priority: extra +Multi-Arch: foreign Description: GNU binary utilities, for sparc64-linux-gnu target This package provides GNU assembler, linker and binary utilities for sparc64-linux-gnu target, for use in a cross-compilation environment. . You don't need this package unless you plan to cross-compile programs for sparc64-linux-gnu. + +Package: binutils-mips64-linux-gnuabin32 +Architecture: amd64 i386 x32 +Depends: binutils (= ${binary:Version}), ${shlibs:Depends} +Suggests: binutils-doc (= ${source:Version}) +Provides: +Priority: extra +Multi-Arch: foreign +Description: GNU binary utilities, for mips64-linux-gnuabin32 target + This package provides GNU assembler, linker and binary utilities + for mips64-linux-gnuabin32 target, for use in a cross-compilation environment. + . + You don't need this package unless you plan to cross-compile programs + for mips64-linux-gnuabin32. + +Package: binutils-mips64el-linux-gnuabin32 +Architecture: amd64 i386 x32 +Depends: binutils (= ${binary:Version}), ${shlibs:Depends} +Suggests: binutils-doc (= ${source:Version}) +Provides: +Priority: extra +Multi-Arch: foreign +Description: GNU binary utilities, for mips64el-linux-gnuabin32 target + This package provides GNU assembler, linker and binary utilities + for mips64el-linux-gnuabin32 target, for use in a cross-compilation environment. + . + You don't need this package unless you plan to cross-compile programs + for mips64el-linux-gnuabin32. diff --git a/debian/control.cross.in b/debian/control.cross.in index 37e2bc6..9c9279c 100644 --- a/debian/control.cross.in +++ b/debian/control.cross.in @@ -6,6 +6,7 @@ Suggests: binutils-doc (= ${source:Version}) Provides: @binutils_alt_triplet@ Priority: extra Built-Using: ${Built-Using} +Multi-Arch: foreign Description: GNU binary utilities, for @target@ target This package provides GNU assembler, linker and binary utilities for @target@ target, for use in a cross-compilation environment. diff --git a/debian/control.in b/debian/control.in index a1aa458..fffc591 100644 --- a/debian/control.in +++ b/debian/control.in @@ -2,23 +2,26 @@ Source: binutils Section: devel Priority: optional Maintainer: Matthias Klose <doko@debian.org> -Uploaders: James Troup <james@nocrew.org>, Daniel Jacobowitz <dan@debian.org> -Standards-Version: 3.9.7 +Uploaders: James Troup <binutils@elmo.tasta.io>, Daniel Jacobowitz <dan@debian.org> +Standards-Version: 3.9.8 Build-Depends: autoconf (>= 2.64), @dpkg_dev@ bison, flex, gettext, texinfo, dejagnu, quilt, chrpath, python3:any, file, xz-utils, lsb-release, zlib1g-dev -Vcs-Browser: https://code.launchpad.net/~doko/binutils/pkg-2.25-debian -Vcs-Bzr: http://bazaar.launchpad.net/~doko/binutils/pkg-2.25-debian +Build-Conflicts: libelf-dev +Homepage: https://www.gnu.org/software/binutils/ +Vcs-Browser: https://code.launchpad.net/~doko/binutils/pkg-2.28-debian +Vcs-Bzr: http://bazaar.launchpad.net/~doko/binutils/pkg-2.28-debian XS-Testsuite: autopkgtest Package: binutils Architecture: any Depends: ${shlibs:Depends} Conflicts: gas, elf-binutils, modutils (<< 2.4.19-1), ${extraConflicts}, - binutils-gold (<< 2.20.51.20100415) + binutils-gold (<< 2.20.51.20100415), + binutils-multiarch (<< 2.27-8) Breaks: binutils-mingw-w64-i686 (<< 2.23.52.20130612-1+3), binutils-mingw-w64-x86-64 (<< 2.23.52.20130612-1+3), - hardening-wrapper (<< 2.8) + hardening-wrapper (<< 2.8+nmu3) Replaces: binutils-gold (<< 2.20.51.20100415), binutils-mingw-w64-i686 (<< 2.23.52.20130612-1+3), binutils-mingw-w64-x86-64 (<< 2.23.52.20130612-1+3) @@ -89,6 +92,7 @@ Description: GNU assembler, linker and binary utilities targeted for hppa64-linu Package: binutils-doc Section: doc Architecture: all +Multi-Arch: foreign Priority: optional Depends: dpkg (>= 1.15.4) | install-info Conflicts: binutils (<< 2.9.1.0.25-3) @@ -99,6 +103,7 @@ Description: Documentation for the GNU assembler, linker and binary utilities Package: binutils-source Architecture: all +Multi-Arch: foreign Priority: optional Depends: texinfo, zlib1g-dev, make, python Description: GNU assembler, linker and binary utilities (source) diff --git a/debian/dwp.1 b/debian/dwp.1 index 7274816..fb78be7 100644 --- a/debian/dwp.1 +++ b/debian/dwp.1 @@ -1,5 +1,5 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.2. -.TH DWP "1" "November 2015" "dwp (GNU Binutils for Debian) 2.25.51.20151106" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4. +.TH DWP "1" "May 2017" "dwp (GNU Binutils for Debian) 2.28" "User Commands" .SH NAME dwp \- The DWARF packaging utility .SH SYNOPSIS @@ -27,7 +27,7 @@ Print version number .SH "REPORTING BUGS" Report bugs to <http://www.sourceware.org/bugzilla/> .SH COPYRIGHT -Copyright \(co 2015 Free Software Foundation, Inc. +Copyright \(co 2017 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) any later version. This program has absolutely no warranty. diff --git a/debian/ld.gold.1 b/debian/ld.gold.1 index 3f7438c..50a4261 100644 --- a/debian/ld.gold.1 +++ b/debian/ld.gold.1 @@ -1,5 +1,5 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.2. -.TH GOLD "1" "November 2015" "gold (GNU Binutils for Debian 2.25.51.20151106) 1.11" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4. +.TH GOLD "1" "May 2017" "gold (GNU Binutils for Debian 2.28) 1.14" "User Commands" .SH NAME gold \- The GNU ELF linker .SH SYNOPSIS @@ -20,18 +20,18 @@ Report version and target information Not supported .TP \fB\-\-no\-add\-needed\fR -Do not copy DT_NEEDED tags from shared libraries +Do not copy DT_NEEDED tags from shared libraries (default) .HP \fB\-\-allow\-multiple\-definition\fR Allow multiple definitions of symbols .TP \fB\-\-no\-allow\-multiple\-definition\fR -Do not allow multiple definitions +Do not allow multiple definitions (default) .TP \fB\-\-allow\-shlib\-undefined\fR Allow unresolved references in shared libraries .TP \fB\-\-no\-allow\-shlib\-undefined\fR -Do not allow unresolved references in shared libraries +Do not allow unresolved references in shared libraries (default) .TP \fB\-\-apply\-dynamic\-relocs\fR Apply link\-time values for dynamic relocations (default) @@ -40,23 +40,35 @@ Apply link\-time values for dynamic relocations (default) (aarch64 only) Do not apply link\-time values for dynamic relocations .TP \fB\-\-as\-needed\fR -Only set DT_NEEDED for shared libraries if used +Use DT_NEEDED only for shared libraries that are used .TP \fB\-\-no\-as\-needed\fR -Always DT_NEEDED for shared libraries +Use DT_NEEDED for all shared libraries (default) .TP \fB\-assert\fR [ignored] Ignored .TP \fB\-b\fR [elf,binary], \fB\-\-format\fR [elf,binary] Set input format +.TP +\fB\-\-be8\fR +Output BE8 format image +.TP +\fB\-\-build\-id\fR [=STYLE] +Generate build ID note +.TP +\fB\-\-build\-id\-chunk\-size\-for\-treehash\fR SIZE +Chunk size for '\-\-build\-id=tree' +.TP +\fB\-\-build\-id\-min\-file\-size\-for\-treehash\fR SIZE +Minimum output file size for '\-\-build\-id=tree' to work differently than '\-\-build\-id=sha1' .HP -\fB\-Bdynamic\fR \fB\-l\fR searches for shared libraries +\fB\-Bdynamic\fR \fB\-l\fR searches for shared libraries (default) .HP \fB\-Bstatic\fR \fB\-l\fR does not search for shared libraries .TP \fB\-dy\fR -alias for \fB\-Bdynamic\fR +alias for \fB\-Bdynamic\fR (default) .TP \fB\-dn\fR alias for \fB\-Bstatic\fR @@ -64,21 +76,15 @@ alias for \fB\-Bstatic\fR \fB\-Bgroup\fR Use group name lookup rules for shared library .TP +\fB\-Bshareable\fR +Generate shared library (alias for \fB\-G\fR/\-shared) +.TP \fB\-Bsymbolic\fR Bind defined symbols locally .TP \fB\-Bsymbolic\-functions\fR Bind defined function symbols locally .TP -\fB\-\-build\-id\fR [=STYLE] -Generate build ID note -.TP -\fB\-\-build\-id\-chunk\-size\-for\-treehash\fR SIZE -Chunk size for '\-\-build\-id=tree' -.TP -\fB\-\-build\-id\-min\-file\-size\-for\-treehash\fR SIZE -Minimum output file size for '\-\-build\-id=tree' to work differently than '\-\-build\-id=sha1' -.TP \fB\-\-check\-sections\fR Check segment addresses for overlaps (default) .TP @@ -91,13 +97,13 @@ Compress .debug_* sections in the output file \fB\-\-copy\-dt\-needed\-entries\fR Not supported .HP -\fB\-\-no\-copy\-dt\-needed\-entries\fR Do not copy DT_NEEDED tags from shared libraries +\fB\-\-no\-copy\-dt\-needed\-entries\fR Do not copy DT_NEEDED tags from shared libraries (default) .TP \fB\-\-cref\fR Output cross reference table .TP \fB\-\-no\-cref\fR -Do not output cross reference table +Do not output cross reference table (default) .TP \fB\-\-ctors\-in\-init\-array\fR Use DT_INIT_ARRAY for all constructors (default) @@ -109,7 +115,7 @@ Handle constructors as directed by compiler Define common symbols .TP \fB\-\-no\-define\-common\fR -Do not define common symbols +Do not define common symbols in relocatable output (default) .TP \fB\-dc\fR Alias for \fB\-d\fR @@ -133,16 +139,7 @@ Do not demangle C++ symbols in log messages Look for violations of the C++ One Definition Rule .TP \fB\-\-no\-detect\-odr\-violations\fR -Do not look for violations of the C++ One Definition Rule -.TP -\fB\-x\fR, \fB\-\-discard\-all\fR -Delete all local symbols -.TP -\fB\-X\fR, \fB\-\-discard\-locals\fR -Delete all temporary local symbols -.TP -\fB\-\-discard\-none\fR -Keep all local symbols +Do not look for violations of the C++ One Definition Rule (default) .TP \fB\-\-dynamic\-list\-data\fR Add data symbols to dynamic symbols @@ -157,6 +154,21 @@ Read a list of dynamic symbols .HP \fB\-e\fR ADDRESS, \fB\-\-entry\fR ADDRESS Set program start address .TP +\fB\-\-eh\-frame\-hdr\fR +Create exception frame header +.TP +\fB\-\-no\-eh\-frame\-hdr\fR +Do not create exception frame header (default) +.TP +\fB\-\-enable\-new\-dtags\fR +Enable use of DT_RUNPATH (default) +.TP +\fB\-\-disable\-new\-dtags\fR +Disable use of DT_RUNPATH +.TP +\fB\-\-no\-enum\-size\-warning\fR +(ARM only) Do not warn about objects with incompatible enum sizes +.TP \fB\-\-exclude\-libs\fR lib,lib ... Exclude libraries from automatic export .TP @@ -174,12 +186,6 @@ Link big\-endian objects. .TP \fB\-EL\fR Link little\-endian objects. -.TP -\fB\-\-eh\-frame\-hdr\fR -Create exception frame header -.TP -\fB\-\-no\-enum\-size\-warning\fR -(ARM only) Do not warn about objects with incompatible enum sizes .HP \fB\-f\fR SHLIB, \fB\-\-auxiliary\fR SHLIB Auxiliary filter for shared object symbol table .TP @@ -190,40 +196,34 @@ Filter for shared object symbol table Treat warnings as errors .TP \fB\-\-no\-fatal\-warnings\fR -Do not treat warnings as errors +Do not treat warnings as errors (default) .TP \fB\-fini\fR SYMBOL Call SYMBOL at unload\-time .TP +\fB\-\-fix\-arm1176\fR +(ARM only) Fix binaries for ARM1176 erratum (default) +.TP +\fB\-\-no\-fix\-arm1176\fR +(ARM only) Do not fix binaries for ARM1176 erratum +.TP \fB\-\-fix\-cortex\-a8\fR -(ARM only) Fix binaries for Cortex\-A8 erratum. +(ARM only) Fix binaries for Cortex\-A8 erratum .TP \fB\-\-no\-fix\-cortex\-a8\fR -(ARM only) Do not fix binaries for Cortex\-A8 erratum. +(ARM only) Do not fix binaries for Cortex\-A8 erratum (default) .TP \fB\-\-fix\-cortex\-a53\-843419\fR -(AArch64 only) Fix Cortex\-A53 erratum 843419. +(AArch64 only) Fix Cortex\-A53 erratum 843419 .TP \fB\-\-no\-fix\-cortex\-a53\-843419\fR -(AArch64 only) Do not fix Cortex\-A53 erratum 843419. +(AArch64 only) Do not fix Cortex\-A53 erratum 843419 (default) .TP \fB\-\-fix\-cortex\-a53\-835769\fR -(AArch64 only) Fix Cortex\-A53 erratum 835769. +(AArch64 only) Fix Cortex\-A53 erratum 835769 .TP \fB\-\-no\-fix\-cortex\-a53\-835769\fR -(AArch64 only) Do not fix Cortex\-A53 erratum 835769. -.TP -\fB\-\-fix\-arm1176\fR -(ARM only) Fix binaries for ARM1176 erratum. -.TP -\fB\-\-no\-fix\-arm1176\fR -(ARM only) Do not fix binaries for ARM1176 erratum. -.TP -\fB\-\-merge\-exidx\-entries\fR -(ARM only) Merge exidx entries in debuginfo. -.TP -\fB\-\-no\-merge\-exidx\-entries\fR -(ARM only) Do not merge exidx entries in debuginfo. +(AArch64 only) Do not fix Cortex\-A53 erratum 835769 (default) .TP \fB\-\-fix\-v4bx\fR (ARM only) Rewrite BX rn as MOV pc, rn for ARMv4 @@ -231,14 +231,23 @@ Call SYMBOL at unload\-time \fB\-\-fix\-v4bx\-interworking\fR (ARM only) Rewrite BX rn branch to ARMv4 interworking veneer .TP +\fB\-fuse\-ld\fR +Ignored for GCC linker option compatibility +.TP \fB\-g\fR Ignored .TP +\fB\-\-gc\-sections\fR +Remove unused sections +.TP +\fB\-\-no\-gc\-sections\fR +Don't remove unused sections (default) +.TP \fB\-\-gdb\-index\fR Generate .gdb_index section .TP \fB\-\-no\-gdb\-index\fR -Do not generate .gdb_index section +Do not generate .gdb_index section (default) .TP \fB\-\-gnu\-unique\fR Enable STB_GNU_UNIQUE symbol binding (default) @@ -246,6 +255,9 @@ Enable STB_GNU_UNIQUE symbol binding (default) \fB\-\-no\-gnu\-unique\fR Disable STB_GNU_UNIQUE symbol binding .TP +\fB\-G\fR, \fB\-shared\fR +Generate shared library +.TP \fB\-h\fR FILENAME, \fB\-soname\fR FILENAME Set shared library name .TP @@ -255,8 +267,14 @@ Min fraction of empty buckets in dynamic hash \fB\-\-hash\-style\fR [sysv,gnu,both] Dynamic hash style .TP -\fB\-I\fR PROGRAM, \fB\-\-dynamic\-linker\fR PROGRAM -Set dynamic linker path +\fB\-i\fR +Alias for \fB\-r\fR +.TP +\fB\-\-icf\fR [none,all,safe] +Identical Code Folding. '\-\-icf=safe' Folds ctors, dtors and functions whose pointers are definitely not taken +.TP +\fB\-\-icf\-iterations\fR COUNT +Number of iterations of ICF (default 2) .TP \fB\-\-incremental\fR Do an incremental link if possible; otherwise, do a full link and prepare output for incremental linking @@ -285,61 +303,64 @@ Use timestamps to check files (default) \fB\-\-incremental\-startup\-unchanged\fR Assume startup files unchanged (files preceding this option) .HP -\fB\-\-incremental\-patch\fR PERCENT Amount of extra space to allocate for patches +\fB\-\-incremental\-patch\fR PERCENT Amount of extra space to allocate for patches (default 10) .TP \fB\-init\fR SYMBOL Call SYMBOL at load\-time .TP +\fB\-I\fR PROGRAM, \fB\-\-dynamic\-linker\fR PROGRAM +Set dynamic linker path +.TP \fB\-\-just\-symbols\fR FILE Read only symbol values from FILE .TP -\fB\-\-map\-whole\-files\fR -Map whole files to memory (default on 64\-bit hosts) -.TP -\fB\-\-no\-map\-whole\-files\fR -Map relevant file parts to memory (default on 32\-bit hosts) -.TP \fB\-\-keep\-files\-mapped\fR Keep files mapped across passes (default) .TP \fB\-\-no\-keep\-files\-mapped\fR Release mapped files after each pass .TP +\fB\-\-keep\-unique\fR SYMBOL +Do not fold this symbol during ICF +.TP +\fB\-l\fR LIBNAME, \fB\-\-library\fR LIBNAME +Search for library LIBNAME +.TP \fB\-\-ld\-generated\-unwind\-info\fR Generate unwind information for PLT (default) .TP \fB\-\-no\-ld\-generated\-unwind\-info\fR Do not generate unwind information for PLT .TP -\fB\-l\fR LIBNAME, \fB\-\-library\fR LIBNAME -Search for library LIBNAME -.TP \fB\-L\fR DIR, \fB\-\-library\-path\fR DIR Add directory to search path .TP -\fB\-\-text\-reorder\fR -Enable text section reordering for GCC section names (default) +\fB\-\-long\-plt\fR +(ARM only) Generate long PLT entries .TP -\fB\-\-no\-text\-reorder\fR -Disable text section reordering for GCC section names +\fB\-\-no\-long\-plt\fR +(ARM only) Do not generate long PLT entries (default) .TP -\fB\-nostdlib\fR -Only search directories specified on the command line. +\fB\-m\fR EMULATION +Set GNU linker emulation; obsolete .TP -\fB\-\-rosegment\fR -Put read\-only non\-executable sections in their own segment +\fB\-\-map\-whole\-files\fR +Map whole files to memory (default) .TP -\fB\-\-rosegment\-gap\fR OFFSET -Set offset between executable and read\-only segments +\fB\-\-no\-map\-whole\-files\fR +Map relevant file parts to memory .TP -\fB\-m\fR EMULATION -Set GNU linker emulation; obsolete +\fB\-\-merge\-exidx\-entries\fR +(ARM only) Merge exidx entries in debuginfo (default) +.TP +\fB\-\-no\-merge\-exidx\-entries\fR +(ARM only) Do not merge exidx entries in debuginfo .TP \fB\-\-mmap\-output\-file\fR -Map the output file for writing (default). +Map the output file for writing (default) .TP \fB\-\-no\-mmap\-output\-file\fR -Do not map the output file for writing. +Do not map the output file for writing .TP \fB\-M\fR, \fB\-\-print\-map\fR Write map file on standard output @@ -354,49 +375,52 @@ Do not page align data Do not page align data, do not make text readonly .TP \fB\-\-no\-omagic\fR -Page align data, make text readonly +Page align data, make text readonly (default) .TP -\fB\-\-enable\-new\-dtags\fR -Enable use of DT_RUNPATH and DT_FLAGS +\fB\-\-no\-keep\-memory\fR +Use less memory and more disk I/O (included only for compatibility with GNU ld) .TP -\fB\-\-disable\-new\-dtags\fR -Disable use of DT_RUNPATH and DT_FLAGS +\fB\-\-no\-undefined\fR +Report undefined symbols (even with \fB\-\-shared\fR) .TP \fB\-\-noinhibit\-exec\fR Create an output file even if errors occur .TP -\fB\-\-no\-undefined\fR -Report undefined symbols (even with \fB\-\-shared\fR) +\fB\-nostdlib\fR +Only search directories specified on the command line .TP \fB\-o\fR FILE, \fB\-\-output\fR FILE Set output file name .TP +\fB\-\-oformat\fR [binary] +Set output format +.TP \fB\-O\fR LEVEL, \fB\-optimize\fR LEVEL Optimize output file size .TP -\fB\-\-oformat\fR [binary] -Set output format +\fB\-\-orphan\-handling\fR [place,discard,warn,error] +Orphan section handling .TP \fB\-p\fR -(ARM only) Ignore for backward compatibility +Ignored for ARM compatibility .TP \fB\-pie\fR Create a position independent executable .TP \fB\-no\-pie\fR -Do not create a position independent executable +Do not create a position independent executable (default) .TP \fB\-\-pic\-executable\fR Create a position independent executable .TP \fB\-\-no\-pic\-executable\fR -Do not create a position independent executable +Do not create a position independent executable (default) .TP \fB\-\-pic\-veneer\fR Force PIC sequences for ARM/Thumb interworking veneers .TP \fB\-no\-pipeline\-knowledge\fR -(ARM only) Ignore for backward compatibility +(ARM only) Ignore for backward compatibility (default) .TP \fB\-\-plt\-align\fR [=P2ALIGN] (PowerPC64 only) Align PLT call stubs to fit cache lines @@ -405,13 +429,13 @@ Force PIC sequences for ARM/Thumb interworking veneers (PowerPC64 only) PLT call stubs should load r11 .TP \fB\-\-no\-plt\-static\-chain\fR -(PowerPC64 only) PLT call stubs should not load r11 +(PowerPC64 only) PLT call stubs should not load r11 (default) .TP \fB\-\-plt\-thread\-safe\fR (PowerPC64 only) PLT call stubs with load\-load barrier .TP \fB\-\-no\-plt\-thread\-safe\fR -(PowerPC64 only) PLT call stubs without barrier +(PowerPC64 only) PLT call stubs without barrier (default) .TP \fB\-\-plugin\fR PLUGIN Load a plugin library @@ -420,38 +444,59 @@ Load a plugin library Pass an option to the plugin .TP \fB\-\-posix\-fallocate\fR -Use posix_fallocate to reserve space in the output file (default). +Use posix_fallocate to reserve space in the output file (default) .TP \fB\-\-no\-posix\-fallocate\fR -Use fallocate or ftruncate to reserve space. +Use fallocate or ftruncate to reserve space .TP \fB\-\-preread\-archive\-symbols\fR Preread archive symbols when multi\-threaded .TP +\fB\-\-print\-gc\-sections\fR +List removed unused sections on stderr +.TP +\fB\-\-no\-print\-gc\-sections\fR +Do not list removed unused sections (default) +.TP +\fB\-\-print\-icf\-sections\fR +List folded identical sections on stderr +.TP +\fB\-\-no\-print\-icf\-sections\fR +Do not list folded identical sections (default) +.TP \fB\-\-print\-output\-format\fR Print default output format .TP \fB\-\-print\-symbol\-counts\fR FILENAME Print symbols defined and used for each input .TP -\fB\-Qy\fR -Ignored for SVR4 compatibility +\fB\-\-push\-state\fR +Save the state of flags related to input files +.TP +\fB\-\-pop\-state\fR +Restore the state of flags related to input files .TP \fB\-q\fR, \fB\-\-emit\-relocs\fR Generate relocations in output .TP +\fB\-Qy\fR +Ignored for SVR4 compatibility +.TP \fB\-r\fR, \fB\-relocatable\fR Generate relocatable output .TP -\fB\-i\fR -Synonym for \fB\-r\fR -.TP \fB\-\-relax\fR Relax branches on certain targets .TP \fB\-\-retain\-symbols\-file\fR FILE keep only symbols listed in this file .TP +\fB\-\-rosegment\fR +Put read\-only non\-executable sections in their own segment +.TP +\fB\-\-rosegment\-gap\fR OFFSET +Set offset between executable and read\-only segments +.TP \fB\-R\fR DIR Add DIR to runtime search path .TP @@ -461,21 +506,6 @@ Add DIR to runtime search path \fB\-\-rpath\-link\fR DIR Add DIR to link time shared library search path .TP -\fB\-\-section\-ordering\-file\fR FILENAME -Layout sections in the order specified. -.TP -\fB\-\-section\-start\fR SECTION=ADDRESS -Set address of section -.TP -\fB\-\-sort\-common\fR [={ascending,descending}] -Sort common symbols by alignment -.TP -\fB\-\-sort\-section\fR [none,name] -Sort sections by name. '\-\-no\-text\-reorder' will override '\-\-sort\-section=name' for .text -.TP -\fB\-\-spare\-dynamic\-tags\fR COUNT -Dynamic tag slots to reserve (default 5) -.TP \fB\-s\fR, \fB\-\-strip\-all\fR Strip all symbols .TP @@ -489,52 +519,43 @@ Emit only debug line number information Strip debug symbols that are unused by gdb (at least versions <= 7.4) .TP \fB\-\-strip\-lto\-sections\fR -Strip LTO intermediate code sections -.TP -\fB\-\-stub\-group\-size\fR SIZE -(ARM, PowerPC only) The maximum distance from instructions in a group of sections to their stubs. Negative values mean stubs are always after (PowerPC before) the group. 1 means use default size. -.TP -\fB\-\-no\-keep\-memory\fR -Use less memory and more disk I/O (included only for compatibility with GNU ld) +Strip LTO intermediate code sections (default) .TP -\fB\-G\fR, \fB\-shared\fR -Generate shared library -.TP -\fB\-Bshareable\fR -Generate shared library +\fB\-\-section\-ordering\-file\fR FILENAME +Layout sections in the order specified .TP -\fB\-\-split\-stack\-adjust\-size\fR SIZE -Stack size when \fB\-fsplit\-stack\fR function calls non\-split +\fB\-\-section\-start\fR SECTION=ADDRESS +Set address of section .TP -\fB\-static\fR -Do not link against shared libraries +\fB\-\-secure\-plt\fR +(PowerPC only) Use new\-style PLT (default) .TP -\fB\-\-icf\fR [none,all,safe] -Identical Code Folding. '\-\-icf=safe' Folds ctors, dtors and functions whose pointers are definitely not taken. +\fB\-\-sort\-common\fR [={ascending,descending}] +Sort common symbols by alignment .TP -\fB\-\-icf\-iterations\fR COUNT -Number of iterations of ICF (default 2) +\fB\-\-sort\-section\fR [none,name] +Sort sections by name. '\-\-no\-text\-reorder' will override '\-\-sort\-section=name' for .text .TP -\fB\-\-print\-icf\-sections\fR -List folded identical sections on stderr +\fB\-\-spare\-dynamic\-tags\fR COUNT +Dynamic tag slots to reserve (default 5) .TP -\fB\-\-no\-print\-icf\-sections\fR -Do not list folded identical sections +\fB\-\-stub\-group\-size\fR SIZE +(ARM, PowerPC only) The maximum distance from instructions in a group of sections to their stubs. Negative values mean stubs are always after the group. 1 means use default size .TP -\fB\-\-keep\-unique\fR SYMBOL -Do not fold this symbol during ICF +\fB\-\-stub\-group\-multi\fR +(PowerPC only) Allow a group of stubs to serve multiple output sections .TP -\fB\-\-gc\-sections\fR -Remove unused sections +\fB\-\-split\-stack\-adjust\-size\fR SIZE +Stack size when \fB\-fsplit\-stack\fR function calls non\-split .TP -\fB\-\-no\-gc\-sections\fR -Don't remove unused sections (default) +\fB\-static\fR +Do not link against shared libraries .TP -\fB\-\-print\-gc\-sections\fR -List removed unused sections on stderr +\fB\-\-start\-lib\fR +Start a library .TP -\fB\-\-no\-print\-gc\-sections\fR -Do not list removed unused sections +\fB\-\-end\-lib\fR +End a library .TP \fB\-\-stats\fR Print resource usage statistics @@ -545,14 +566,26 @@ Set target system root directory \fB\-t\fR, \fB\-\-trace\fR Print the name of each input file .TP -\fB\-T\fR FILE, \fB\-\-script\fR FILE -Read linker script +\fB\-\-target1\-abs\fR +(ARM only) Force R_ARM_TARGET1 type to R_ARM_ABS32 +.TP +\fB\-\-target1\-rel\fR +(ARM only) Force R_ARM_TARGET1 type to R_ARM_REL32 +.TP +\fB\-\-target2\fR [rel, abs, got\-rel +(ARM only) Set R_ARM_TARGET2 relocation type +.TP +\fB\-\-text\-reorder\fR +Enable text section reordering for GCC section names (default) +.TP +\fB\-\-no\-text\-reorder\fR +Disable text section reordering for GCC section names .TP \fB\-\-threads\fR Run the linker multi\-threaded .TP \fB\-\-no\-threads\fR -Do not run the linker multi\-threaded +Do not run the linker multi\-threaded (default) .TP \fB\-\-thread\-count\fR COUNT Number of threads to use @@ -565,6 +598,21 @@ Number of threads to use in initial pass \fB\-\-thread\-count\-final\fR COUNT Number of threads to use in final pass .TP +\fB\-\-toc\-optimize\fR +(PowerPC64 only) Optimize TOC code sequences (default) +.TP +\fB\-\-no\-toc\-optimize\fR +(PowerPC64 only) Don't optimize TOC code sequences +.TP +\fB\-\-toc\-sort\fR +(PowerPC64 only) Sort TOC and GOT sections (default) +.TP +\fB\-\-no\-toc\-sort\fR +(PowerPC64 only) Don't sort TOC and GOT sections +.TP +\fB\-T\fR FILE, \fB\-\-script\fR FILE +Read linker script +.TP \fB\-Tbss\fR ADDRESS Set the address of the bss segment .TP @@ -580,18 +628,6 @@ Set the address of the text segment \fB\-Trodata\-segment\fR ADDRESS Set the address of the rodata segment .TP -\fB\-\-toc\-optimize\fR -(PowerPC64 only) Optimize TOC code sequences -.TP -\fB\-\-no\-toc\-optimize\fR -(PowerPC64 only) Don't optimize TOC code sequences -.TP -\fB\-\-toc\-sort\fR -(PowerPC64 only) Sort TOC and GOT sections -.TP -\fB\-\-no\-toc\-sort\fR -(PowerPC64 only) Don't sort TOC and GOT sections -.TP \fB\-u\fR SYMBOL, \fB\-\-undefined\fR SYMBOL Create undefined reference to SYMBOL .TP @@ -599,7 +635,7 @@ Create undefined reference to SYMBOL How to handle unresolved symbols .TP \fB\-\-verbose\fR -Synonym for \fB\-\-debug\fR=\fI\,files\/\fR +Alias for \fB\-\-debug\fR=\fI\,files\/\fR .TP \fB\-\-version\-script\fR FILE Read version script @@ -629,7 +665,7 @@ Don't warn about mismatched input files Ignored .TP \fB\-\-warn\-search\-mismatch\fR -Warn when skipping an incompatible library +Warn when skipping an incompatible library (default) .TP \fB\-\-no\-warn\-search\-mismatch\fR Don't warn when skipping an incompatible library @@ -644,23 +680,35 @@ Do not warn if text segment is not shareable (default) Report unresolved symbols as warnings .TP \fB\-\-error\-unresolved\-symbols\fR -Report unresolved symbols as errors +Report unresolved symbols as errors (default) .TP -\fB\-\-weak\-unresolved\-symbols\fR -Convert unresolved symbols to weak references +\fB\-z\fR buildd +Dummy z option .TP \fB\-\-no\-wchar\-size\-warning\fR (ARM only) Do not warn about objects with incompatible wchar_t sizes .TP +\fB\-\-weak\-unresolved\-symbols\fR +Convert unresolved symbols to weak references +.TP \fB\-\-whole\-archive\fR Include all archive contents .TP \fB\-\-no\-whole\-archive\fR -Include only needed archive contents +Include only needed archive contents (default) .TP \fB\-\-wrap\fR SYMBOL Use wrapper functions for SYMBOL .TP +\fB\-x\fR, \fB\-\-discard\-all\fR +Delete all local symbols +.TP +\fB\-X\fR, \fB\-\-discard\-locals\fR +Delete all temporary local symbols +.TP +\fB\-\-discard\-none\fR +Keep all local symbols +.TP \fB\-y\fR SYMBOL, \fB\-\-trace\-symbol\fR SYMBOL Trace references to symbol .TP @@ -679,17 +727,14 @@ Start a library search group \-), \fB\-\-end\-group\fR End a library search group .TP -\fB\-\-start\-lib\fR -Start a library +\fB\-z\fR bndplt +(x86\-64 only) Generate a BND PLT for Intel MPX .TP -\fB\-\-end\-lib\fR -End a library -.TP -\fB\-fuse\-ld\fR -Ignored for GCC linker option compatibility +\fB\-z\fR nobndplt +Generate a regular PLT (default) .TP \fB\-z\fR combreloc -Sort dynamic relocs +Sort dynamic relocs (default) .TP \fB\-z\fR nocombreloc Do not sort dynamic relocs @@ -749,11 +794,14 @@ Mark object for immediate function binding Mark DSO to indicate that needs immediate $ORIGIN processing at runtime .TP \fB\-z\fR relro -Where possible mark variables read\-only after relocation +Where possible mark variables read\-only after relocation (default) .TP \fB\-z\fR norelro Don't mark variables read\-only after relocation .TP +\fB\-z\fR stack\-size=SIZE +Set PT_GNU_STACK segment p_memsz to SIZE +.TP \fB\-z\fR text Do not permit relocations in read\-only segments .TP @@ -762,16 +810,13 @@ Permit relocations in read\-only segments (default) .TP \fB\-z\fR textoff Permit relocations in read\-only segments (default) -.TP -\fB\-z\fR buildd -Dummy z option .PP ld.gold: supported targets: elf32\-iamcu elf32\-i386 elf32\-i386\-freebsd elf32\-i386\-nacl elf32\-x86\-64 elf32\-x86\-64\-freebsd elf32\-x86\-64\-nacl elf64\-x86\-64 elf64\-x86\-64\-freebsd elf64\-x86\-64\-nacl ld.gold: supported emulations: elf_iamcu elf_i386 elf_i386_nacl elf32_x86_64 elf32_x86_64_nacl elf_x86_64 elf_x86_64_nacl .SH "REPORTING BUGS" Report bugs to <http://www.sourceware.org/bugzilla/> .SH COPYRIGHT -Copyright \(co 2015 Free Software Foundation, Inc. +Copyright \(co 2017 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) a later version. This program has absolutely no warranty. diff --git a/debian/patches/001_ld_makefile_patch.patch b/debian/patches/001_ld_makefile_patch.patch index 8dc5535..bb83d23 100644 --- a/debian/patches/001_ld_makefile_patch.patch +++ b/debian/patches/001_ld_makefile_patch.patch @@ -20,7 +20,7 @@ Index: b/ld/Makefile.in =================================================================== --- a/ld/Makefile.in +++ b/ld/Makefile.in -@@ -413,7 +413,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) +@@ -452,7 +452,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) # We put the scripts in the directory $(scriptdir)/ldscripts. # We can't put the scripts in $(datadir) because the SEARCH_DIR # directives need to be different for native and cross linkers. diff --git a/debian/patches/006_better_file_error.patch b/debian/patches/006_better_file_error.patch index 067ef38..2c4e001 100644 --- a/debian/patches/006_better_file_error.patch +++ b/debian/patches/006_better_file_error.patch @@ -5,7 +5,7 @@ Index: b/bfd/opncls.c =================================================================== --- a/bfd/opncls.c +++ b/bfd/opncls.c -@@ -195,6 +195,13 @@ bfd_fopen (const char *filename, const c +@@ -196,6 +196,13 @@ bfd_fopen (const char *filename, const c { bfd *nbfd; const bfd_target *target_vec; diff --git a/debian/patches/012_check_ldrunpath_length.patch b/debian/patches/012_check_ldrunpath_length.patch index f706985..012f838 100644 --- a/debian/patches/012_check_ldrunpath_length.patch +++ b/debian/patches/012_check_ldrunpath_length.patch @@ -5,7 +5,7 @@ Index: b/ld/emultempl/elf32.em =================================================================== --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em -@@ -1242,6 +1242,8 @@ fragment <<EOF +@@ -1411,6 +1411,8 @@ fragment <<EOF && command_line.rpath == NULL) { lib_path = (const char *) getenv ("LD_RUN_PATH"); @@ -14,7 +14,7 @@ Index: b/ld/emultempl/elf32.em if (gld${EMULATION_NAME}_search_needed (lib_path, &n, force)) break; -@@ -1523,6 +1525,8 @@ gld${EMULATION_NAME}_before_allocation ( +@@ -1692,6 +1694,8 @@ gld${EMULATION_NAME}_before_allocation ( rpath = command_line.rpath; if (rpath == NULL) rpath = (const char *) getenv ("LD_RUN_PATH"); diff --git a/debian/patches/013_bash_in_ld_testsuite.patch b/debian/patches/013_bash_in_ld_testsuite.patch index 7e5a5a8..09be8ac 100644 --- a/debian/patches/013_bash_in_ld_testsuite.patch +++ b/debian/patches/013_bash_in_ld_testsuite.patch @@ -4,7 +4,7 @@ Index: b/ld/testsuite/config/default.exp =================================================================== --- a/ld/testsuite/config/default.exp +++ b/ld/testsuite/config/default.exp -@@ -121,10 +121,10 @@ proc get_link_files {varname} { +@@ -124,10 +124,10 @@ proc get_link_files {varname} { #makefile rules, with embedded shell variable expansions. #make wants $$shell_var, we want $shell_var ... set cmd "host='$target_triplet' && . $srcdir/../configure.host && sed -e 's,\\\$\\\$,\$,g' <<EOF\n\$$varname\nEOF" @@ -17,7 +17,7 @@ Index: b/ld/testsuite/config/default.exp if $status { error "Error getting native link files: $result" } set $varname $result send_log "$varname = $result\n" -@@ -134,7 +134,7 @@ proc get_link_files {varname} { +@@ -137,7 +137,7 @@ proc get_link_files {varname} { proc get_target_emul {} { global target_triplet global srcdir diff --git a/debian/patches/129_multiarch_libpath.patch b/debian/patches/129_multiarch_libpath.patch index 5b64cea..9b59471 100644 --- a/debian/patches/129_multiarch_libpath.patch +++ b/debian/patches/129_multiarch_libpath.patch @@ -286,7 +286,7 @@ Index: b/gold/configure DLOPEN_LIBS CXXCPP HAVE_NO_USE_LINKER_PLUGIN_FALSE -@@ -7607,6 +7608,14 @@ $as_echo "#define HAVE_LC_MESSAGES 1" >> +@@ -7720,6 +7721,14 @@ $as_echo "#define HAVE_LC_MESSAGES 1" >> fi @@ -305,7 +305,7 @@ Index: b/gold/configure.ac =================================================================== --- a/gold/configure.ac +++ b/gold/configure.ac -@@ -643,6 +643,14 @@ AC_CHECK_HEADERS(locale.h) +@@ -662,6 +662,14 @@ AC_CHECK_HEADERS(locale.h) AC_CHECK_FUNCS(setlocale) AM_LC_MESSAGES @@ -324,7 +324,7 @@ Index: b/gold/options.cc =================================================================== --- a/gold/options.cc +++ b/gold/options.cc -@@ -1164,8 +1164,15 @@ General_options::finalize() +@@ -1227,8 +1227,15 @@ General_options::finalize() || this->user_set_sysroot() || *TARGET_SYSTEM_ROOT != '\0') { @@ -344,7 +344,7 @@ Index: b/gold/Makefile.in =================================================================== --- a/gold/Makefile.in +++ b/gold/Makefile.in -@@ -424,6 +424,7 @@ AM_CPPFLAGS = \ +@@ -490,6 +490,7 @@ AM_CPPFLAGS = \ -I$(srcdir) -I$(srcdir)/../include -I$(srcdir)/../elfcpp \ -DLOCALEDIR="\"$(datadir)/locale\"" \ -DBINDIR="\"$(bindir)\"" -DTOOLBINDIR="\"$(tooldir)/bin\"" \ diff --git a/debian/patches/130_gold_disable_testsuite_build.patch b/debian/patches/130_gold_disable_testsuite_build.patch index 6ade3a2..5fb0375 100644 --- a/debian/patches/130_gold_disable_testsuite_build.patch +++ b/debian/patches/130_gold_disable_testsuite_build.patch @@ -19,7 +19,7 @@ Index: b/gold/Makefile.in =================================================================== --- a/gold/Makefile.in +++ b/gold/Makefile.in -@@ -409,7 +409,7 @@ top_srcdir = @top_srcdir@ +@@ -475,7 +475,7 @@ top_srcdir = @top_srcdir@ zlibdir = @zlibdir@ zlibinc = @zlibinc@ AUTOMAKE_OPTIONS = foreign diff --git a/debian/patches/135_bfd_version.patch b/debian/patches/135_bfd_version.patch index e763266..dc68ad1 100644 --- a/debian/patches/135_bfd_version.patch +++ b/debian/patches/135_bfd_version.patch @@ -5,7 +5,7 @@ Index: b/bfd/Makefile.am =================================================================== --- a/bfd/Makefile.am +++ b/bfd/Makefile.am -@@ -1042,15 +1042,15 @@ DISTCLEANFILES = $(BUILD_CFILES) $(BUILD +@@ -1069,15 +1069,15 @@ DISTCLEANFILES = $(BUILD_CFILES) $(BUILD bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in @echo "creating $@" @@ -28,7 +28,7 @@ Index: b/bfd/Makefile.in =================================================================== --- a/bfd/Makefile.in +++ b/bfd/Makefile.in -@@ -2110,15 +2110,15 @@ stmp-lcoff-h: $(LIBCOFF_H_FILES) +@@ -2179,15 +2179,15 @@ stmp-lcoff-h: $(LIBCOFF_H_FILES) bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in @echo "creating $@" diff --git a/debian/patches/136_bfd_pic.patch b/debian/patches/136_bfd_pic.patch new file mode 100644 index 0000000..9ac484f --- /dev/null +++ b/debian/patches/136_bfd_pic.patch @@ -0,0 +1,29 @@ +Author: Balint Reczey <balint@balintreczey.hu> +Description: Build libbfd with -fPIC to allow linking with PIE binaries + +Index: b/bfd/Makefile.am +=================================================================== +--- a/bfd/Makefile.am ++++ b/bfd/Makefile.am +@@ -51,7 +51,7 @@ ZLIBINC = @zlibinc@ + + WARN_CFLAGS = @WARN_CFLAGS@ + NO_WERROR = @NO_WERROR@ +-AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC) ++AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC) -fPIC + AM_CPPFLAGS = -DBINDIR='"$(bindir)"' + if PLUGINS + bfdinclude_HEADERS += $(INCDIR)/plugin-api.h +Index: b/bfd/Makefile.in +=================================================================== +--- a/bfd/Makefile.in ++++ b/bfd/Makefile.in +@@ -388,7 +388,7 @@ libbfd_la_LDFLAGS = $(am__append_1) -rel + # case both are empty. + ZLIB = @zlibdir@ -lz + ZLIBINC = @zlibinc@ +-AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC) ++AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC) -fPIC + AM_CPPFLAGS = -DBINDIR='"$(bindir)"' + @PLUGINS_TRUE@LIBDL = @lt_cv_dlopen_libs@ + diff --git a/debian/patches/161_gold_dummy_zoption.diff b/debian/patches/161_gold_dummy_zoption.diff index 68e8d15..e203ff7 100644 --- a/debian/patches/161_gold_dummy_zoption.diff +++ b/debian/patches/161_gold_dummy_zoption.diff @@ -4,21 +4,21 @@ Index: b/gold/options.h =================================================================== --- a/gold/options.h +++ b/gold/options.h -@@ -1341,6 +1341,9 @@ class General_options - DEFINE_bool_alias(textoff, text, options::DASH_Z, '\0', - N_("Permit relocations in read-only segments (default)"), +@@ -1359,6 +1359,9 @@ class General_options + options::TWO_DASHES, '\0', + N_("Report unresolved symbols as errors"), NULL, true); + DEFINE_bool(buildd, options::DASH_Z, '\0', false, + N_("Dummy z option"), + NULL); - public: - typedef options::Dir_list Dir_list; + DEFINE_bool(wchar_size_warning, options::TWO_DASHES, '\0', true, NULL, + N_("(ARM only) Do not warn about objects with incompatible " Index: b/gold/options.cc =================================================================== --- a/gold/options.cc +++ b/gold/options.cc -@@ -918,6 +918,8 @@ parse_short_option(int argc, const char* +@@ -967,6 +967,8 @@ parse_short_option(int argc, const char* { int dummy_i = 0; const char* dash_z_arg = *arg; diff --git a/debian/patches/164_ld_doc_remove_xref.diff b/debian/patches/164_ld_doc_remove_xref.diff index 3c24528..293724c 100644 --- a/debian/patches/164_ld_doc_remove_xref.diff +++ b/debian/patches/164_ld_doc_remove_xref.diff @@ -4,7 +4,7 @@ Index: b/ld/ld.texinfo =================================================================== --- a/ld/ld.texinfo +++ b/ld/ld.texinfo -@@ -8010,7 +8010,8 @@ may be spent optimizing algorithms for a +@@ -8186,7 +8186,8 @@ may be spent optimizing algorithms for a One minor artifact of the BFD solution which you should bear in mind is the potential for information loss. There are two places where useful information can be lost using the BFD mechanism: during diff --git a/debian/patches/branch-updates.diff b/debian/patches/branch-updates.diff index e18c611..a83015f 100644 --- a/debian/patches/branch-updates.diff +++ b/debian/patches/branch-updates.diff @@ -1,6320 +1,2217 @@ -# DP: updates from the binutils-2.26 branch +# DP: updates from the binutils-2.28 branch -# git diff 2c49145108878e9914173cd9c3aa36ab0cede6b3 0a2ba2faf315f945afde25416a2351275d12506d +# git diff d1b878ec9a4e6a92e2863a8929e9794dd12b13b9 de33d5aed37edb1f2467adab7c2402aef36045b4 diff --git a/bfd/ChangeLog b/bfd/ChangeLog -index e860c3e..4741b19 100644 +index 9809bcf..a51642b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog -@@ -1,3 +1,156 @@ -+2016-03-17 H.J. Lu <hongjiu.lu@intel.com> +@@ -1,3 +1,83 @@ ++2017-05-01 Palmer Dabbelt <palmer@dabbelt.com> + -+ Backport from master -+ 2016-03-15 H.J. Lu <hongjiu.lu@intel.com> ++ * config.bfd (riscv32-*): Enable rv64. + -+ PR ld/19827 -+ * elf32-i386.c (elf_i386_check_relocs): Bind defined symbol -+ locally in PIE. -+ (elf_i386_relocate_section): Likewise. -+ * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. -+ (elf_x86_64_relocate_section): Likewise. ++2017-04-03 Palmer Dabbelt <palmer@dabbelt.com> + -+2016-03-15 H.J. Lu <hongjiu.lu@intel.com> ++ * elfnn-riscv.c (GP_NAME): Delete. ++ (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL. ++ (_bfd_riscv_relax_lui): Likewise. + -+ Backport from master -+ 2016-01-30 H.J. Lu <hongjiu.lu@intel.com> ++2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com> + -+ PR ld/19539 -+ * elf32-i386.c (elf_i386_reloc_type_class): Check relocation -+ against STT_GNU_IFUNC symbol only with dynamic symbols. -+ * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise. ++ * elfnn-riscv.c (riscv_elf_object_p): New function. + -+2016-03-15 Nick Clifton <nickc@redhat.com> ++2017-04-26 Maciej W. Rozycki <macro@imgtec.com> + -+ Backport from master: -+ 2016-03-09 Leon Winter <winter-gcc@bfw-online.de> ++ PR ld/21334 ++ * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms' ++ member. ++ * elfxx-target.h [!elf_backend_always_renumber_dynsyms] ++ (elf_backend_always_renumber_dynsyms): Define. ++ (elfNN_bed): Initialize `always_renumber_dynsyms' member. ++ * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define. ++ * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Also call ++ `_bfd_elf_link_renumber_dynsyms' if the backend has requested ++ it. ++ (elf_gc_sweep): Likewise. + -+ PR ld/19623 -+ * cofflink.c (_bfd_coff_generic_relocate_section): Do not apply -+ relocations against absolute symbols. ++2017-04-26 Maciej W. Rozycki <macro@imgtec.com> + -+2016-03-14 H.J. Lu <hongjiu.lu@intel.com> ++ * elflink.c (elf_gc_sweep): Only call ++ `_bfd_elf_link_renumber_dynsyms' if dynamic sections have been ++ created. + -+ Backport from master -+ 2016-01-28 H.J. Lu <hongjiu.lu@intel.com> ++2017-04-24 H.J. Lu <hongjiu.lu@intel.com> + -+ PR binutils/19523 -+ * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Set BFD_DECOMPRESS to -+ decompress debug sections. ++ PR ld/21425 ++ * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks. + -+2016-03-09 H.J. Lu <hongjiu.lu@intel.com> ++2017-03-28 Hans-Peter Nilsson <hp@axis.com> + -+ PR ld/19579 -+ Backport from master -+ 2016-03-08 H.J. Lu <hongjiu.lu@intel.com> -+ -+ * elflink.c (_bfd_elf_merge_symbol): Group common symbol checking -+ together. -+ -+ 2016-03-04 H.J. Lu <hongjiu.lu@intel.com> -+ -+ * elflink.c (_bfd_elf_merge_symbol): Treat common symbol in -+ executable as definition if the new definition comes from a -+ shared library. -+ -+2016-03-09 Nick Clifton <nickc@redhat.com> -+ Alan Modra <amodra@gmail.com> -+ -+ PR binutils/19775 -+ * archive.c (bfd_generic_openr_next_archived_file): Allow zero -+ length elements in the archive. -+ * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Likewise. -+ -+2016-03-01 H.J. Lu <hongjiu.lu@intel.com> -+ -+ PR ld/19752 -+ Backport from master -+ 2015-12-18 H.J. Lu <hongjiu.lu@intel.com> -+ -+ * coff-x86_64.c (coff_amd64_reloc): Fix formatting. -+ -+ 2015-12-18 Nick Clifton <nickc@redhat.com> -+ -+ * coff-i386.c (coff_i386_reloc): Fix formatting. -+ -+2016-02-26 H.J. Lu <hongjiu.lu@intel.com> -+ -+ Backport from master -+ 2016-02-24 H.J. Lu <hongjiu.lu@intel.com> -+ -+ PR ld/19698 -+ * elflink.c (bfd_elf_record_link_assignment): Set versioned if -+ symbol version is unknown. -+ -+2016-02-26 H.J. Lu <hongjiu.lu@intel.com> -+ -+ Backport from master -+ 2016-02-01 H.J. Lu <hongjiu.lu@intel.com> -+ -+ PR ld/19553 -+ * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED -+ if a symbol from a library loaded via DT_NEEDED doesn't match -+ the symbol referenced by regular object. -+ -+2016-02-26 H.J. Lu <hongjiu.lu@intel.com> -+ -+ Backport from master -+ 2016-02-24 H.J. Lu <hongjiu.lu@intel.com> -+ -+ * elf32-i386.c (elf_i386_allocate_dynrelocs): Set plt_got.offset -+ to (bfd_vma) -1 when setting needs_plt to 0. -+ * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise. -+ -+2016-02-26 Alan Modra <amodra@gmail.com> -+ -+ * elf64-ppc.c (create_linkage_sections): Create sfpr when -+ save_restore_funcs, rest of sections when not relocatable. -+ (ppc64_elf_init_stub_bfd): Always call create_linkage_sections. -+ (sfpr_define): Define all symbols on emitted code. -+ (ppc64_elf_func_desc_adjust): Adjust for sfpr now being created -+ when relocatable. Move sfpr_define loop earlier. -+ -+2016-02-25 Jiong Wang <jiong.wang@arm.com> -+ -+ Backport from master -+ 2016-01-21 Jiong Wang <jiong.wang@arm.com> -+ -+ * elfnn-aarch64.c (aarch64_type_of_stub): Allow insert long branch -+ veneer for sym_sec != input_sec. -+ (elfNN_aarch64_size_stub): Support STT_SECTION symbol. -+ (elfNN_aarch64_final_link_relocate): Take rela addend into account when -+ calculation destination. -+ -+2016-02-10 H.J. Lu <hongjiu.lu@intel.com> -+ -+ Backport from master -+ 2016-02-10 H.J. Lu <hongjiu.lu@intel.com> -+ -+ PR ld/19601 -+ * elf32-i386.c (elf_i386_relocate_section): Mask off the least -+ significant bit in GOT offset for R_386_GOT32X. -+ -+2016-02-02 H.J. Lu <hongjiu.lu@intel.com> ++ PR ld/16044 ++ * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT ++ to handle a local symbol with a hash-symbol-entry; without PLT. ++ Add BFD_ASSERT for an incidental case with GOT entry present. ++ (cris_elf_check_relocs): Increment PLT refcount only if the symbol ++ isn't forced-or-set local. + -+ Backport from master -+ 2016-02-02 H.J. Lu <hongjiu.lu@intel.com> ++2017-04-13 Alan Modra <amodra@gmail.com> + -+ PR ld/19542 -+ * elf64-x86-64.c (elf_x86_64_convert_load): Store the estimated -+ distances in the compressed_size field of the output section. ++ * elf32-arm.c (arm_type_of_stub): Supply missing args to "long ++ branch veneers" error. Fix double space and format message. ++ * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg. ++ * elf64-ppc.c (tocsave_find): Supply missing %B arg. + -+2016-02-01 John David Anglin <danglin@gcc.gnu.org> ++2017-04-10 H.J. Lu <hongjiu.lu@intel.com> + -+ PR ld/19526 -+ * elf32-hppa.c (elf32_hppa_final_link): Don't sort non-regular output -+ files. -+ * elf64-hppa.c (elf32_hppa_final_link): Likewise. Remove retval. -+ -+2016-01-25 Tristan Gingold <gingold@adacore.com> -+ -+ * version.m4: Bump version to 2.26.0 -+ * configure: Regenerate. -+ - 2016-01-25 Tristan Gingold <gingold@adacore.com> - - * version.m4: Bump version to 2.26 -@@ -119,7 +272,7 @@ - * configure: Regenerate. - - 2015-11-11 Alan Modra <amodra@gmail.com> -- Peter Bergner <bergner@vnet.ibm.com> -+ Peter Bergner <bergner@vnet.ibm.com> - - * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_REL16DX_HA. - (ppc_elf_reloc_type_lookup): Handle R_PPC_REL16DX_HA. -@@ -179,8 +332,8 @@ - - 2015-10-29 Catherine Moore <clm@codesourcery.com> - -- * elfxx-mips.c (mips_elf_check_mips16_stubs): Set a stub's output -- section to bfd_abs_section_ptr if the stub is discarded. -+ * elfxx-mips.c (mips_elf_check_mips16_stubs): Set a stub's output -+ section to bfd_abs_section_ptr if the stub is discarded. - - 2015-10-29 Ed Schouten <ed@nuxi.nl> - -@@ -232,7 +385,7 @@ - * bfd-in2.h: Regenerate. - - 2015-10-27 Laurent Alfonsi <laurent.alfonsi@st.com> -- Christophe Monat <christophe.monat@st.com> -+ Christophe Monat <christophe.monat@st.com> - - * bfd-in2.h: Regenerate. - * bfd-in.h (bfd_arm_stm32l4xx_fix): New enum. Specify how -@@ -1225,115 +1378,115 @@ - - 2015-08-18 H.J. Lu <hongjiu.lu@intel.com> - -- * bfd/aoutx.h: Replace shared, executable, relocatable and pie -+ * aoutx.h: Replace shared, executable, relocatable and pie - fields with bfd_link_executable, bfd_link_dll, - bfd_link_relocatable, bfd_link_pic and bfd_link_pie. -- * bfd/bout.c: Likewise. -- * bfd/coff-alpha.c: Likewise. -- * bfd/coff-arm.c: Likewise. -- * bfd/coff-i386.c: Likewise. -- * bfd/coff-i960.c: Likewise. -- * bfd/coff-m68k.c: Likewise. -- * bfd/coff-mcore.c: Likewise. -- * bfd/coff-mips.c: Likewise. -- * bfd/coff-ppc.c: Likewise. -- * bfd/coff-rs6000.c: Likewise. -- * bfd/coff-sh.c: Likewise. -- * bfd/coff-tic80.c: Likewise. -- * bfd/coff-x86_64.c: Likewise. -- * bfd/coff64-rs6000.c: Likewise. -- * bfd/coffgen.c: Likewise. -- * bfd/cofflink.c: Likewise. -- * bfd/ecoff.c: Likewise. -- * bfd/ecofflink.c: Likewise. -- * bfd/elf-bfd.h: Likewise. -- * bfd/elf-eh-frame.c: Likewise. -- * bfd/elf-ifunc.c: Likewise. -- * bfd/elf-m10200.c: Likewise. -- * bfd/elf-m10300.c: Likewise. -- * bfd/elf-s390-common.c: Likewise. -- * bfd/elf-vxworks.c: Likewise. -- * bfd/elf.c: Likewise. -- * bfd/elf32-arm.c: Likewise. -- * bfd/elf32-avr.c: Likewise. -- * bfd/elf32-bfin.c: Likewise. -- * bfd/elf32-cr16.c: Likewise. -- * bfd/elf32-cr16c.c: Likewise. -- * bfd/elf32-cris.c: Likewise. -- * bfd/elf32-crx.c: Likewise. -- * bfd/elf32-d10v.c: Likewise. -- * bfd/elf32-dlx.c: Likewise. -- * bfd/elf32-epiphany.c: Likewise. -- * bfd/elf32-fr30.c: Likewise. -- * bfd/elf32-frv.c: Likewise. -- * bfd/elf32-ft32.c: Likewise. -- * bfd/elf32-h8300.c: Likewise. -- * bfd/elf32-hppa.c: Likewise. -- * bfd/elf32-i370.c: Likewise. -- * bfd/elf32-i386.c: Likewise. -- * bfd/elf32-i860.c: Likewise. -- * bfd/elf32-ip2k.c: Likewise. -- * bfd/elf32-iq2000.c: Likewise. -- * bfd/elf32-lm32.c: Likewise. -- * bfd/elf32-m32c.c: Likewise. -- * bfd/elf32-m32r.c: Likewise. -- * bfd/elf32-m68hc11.c: Likewise. -- * bfd/elf32-m68hc1x.c: Likewise. -- * bfd/elf32-m68k.c: Likewise. -- * bfd/elf32-mcore.c: Likewise. -- * bfd/elf32-mep.c: Likewise. -- * bfd/elf32-metag.c: Likewise. -- * bfd/elf32-microblaze.c: Likewise. -- * bfd/elf32-moxie.c: Likewise. -- * bfd/elf32-msp430.c: Likewise. -- * bfd/elf32-mt.c: Likewise. -- * bfd/elf32-nds32.c: Likewise. -- * bfd/elf32-nios2.c: Likewise. -- * bfd/elf32-or1k.c: Likewise. -- * bfd/elf32-ppc.c: Likewise. -- * bfd/elf32-rl78.c: Likewise. -- * bfd/elf32-rx.c: Likewise. -- * bfd/elf32-s390.c: Likewise. -- * bfd/elf32-score.c: Likewise. -- * bfd/elf32-score7.c: Likewise. -- * bfd/elf32-sh-symbian.c: Likewise. -- * bfd/elf32-sh.c: Likewise. -- * bfd/elf32-sh64.c: Likewise. -- * bfd/elf32-spu.c: Likewise. -- * bfd/elf32-tic6x.c: Likewise. -- * bfd/elf32-tilepro.c: Likewise. -- * bfd/elf32-v850.c: Likewise. -- * bfd/elf32-vax.c: Likewise. -- * bfd/elf32-visium.c: Likewise. -- * bfd/elf32-xc16x.c: Likewise. -- * bfd/elf32-xstormy16.c: Likewise. -- * bfd/elf32-xtensa.c: Likewise. -- * bfd/elf64-alpha.c: Likewise. -- * bfd/elf64-hppa.c: Likewise. -- * bfd/elf64-ia64-vms.c: Likewise. -- * bfd/elf64-mmix.c: Likewise. -- * bfd/elf64-ppc.c: Likewise. -- * bfd/elf64-s390.c: Likewise. -- * bfd/elf64-sh64.c: Likewise. -- * bfd/elf64-x86-64.c: Likewise. -- * bfd/elflink.c: Likewise. -- * bfd/elfnn-aarch64.c: Likewise. -- * bfd/elfnn-ia64.c: Likewise. -- * bfd/elfxx-mips.c: Likewise. -- * bfd/elfxx-sparc.c: Likewise. -- * bfd/elfxx-tilegx.c: Likewise. -- * bfd/i386linux.c: Likewise. -- * bfd/linker.c: Likewise. -- * bfd/m68klinux.c: Likewise. -- * bfd/pdp11.c: Likewise. -- * bfd/pe-mips.c: Likewise. -- * bfd/peXXigen.c: Likewise. -- * bfd/reloc.c: Likewise. -- * bfd/reloc16.c: Likewise. -- * bfd/sparclinux.c: Likewise. -- * bfd/sunos.c: Likewise. -- * bfd/vms-alpha.c: Likewise. -- * bfd/xcofflink.c: Likewise. -+ * bout.c: Likewise. -+ * coff-alpha.c: Likewise. -+ * coff-arm.c: Likewise. -+ * coff-i386.c: Likewise. -+ * coff-i960.c: Likewise. -+ * coff-m68k.c: Likewise. -+ * coff-mcore.c: Likewise. -+ * coff-mips.c: Likewise. -+ * coff-ppc.c: Likewise. -+ * coff-rs6000.c: Likewise. -+ * coff-sh.c: Likewise. -+ * coff-tic80.c: Likewise. -+ * coff-x86_64.c: Likewise. -+ * coff64-rs6000.c: Likewise. -+ * coffgen.c: Likewise. -+ * cofflink.c: Likewise. -+ * ecoff.c: Likewise. -+ * ecofflink.c: Likewise. -+ * elf-bfd.h: Likewise. -+ * elf-eh-frame.c: Likewise. -+ * elf-ifunc.c: Likewise. -+ * elf-m10200.c: Likewise. -+ * elf-m10300.c: Likewise. -+ * elf-s390-common.c: Likewise. -+ * elf-vxworks.c: Likewise. -+ * elf.c: Likewise. -+ * elf32-arm.c: Likewise. -+ * elf32-avr.c: Likewise. -+ * elf32-bfin.c: Likewise. -+ * elf32-cr16.c: Likewise. -+ * elf32-cr16c.c: Likewise. -+ * elf32-cris.c: Likewise. -+ * elf32-crx.c: Likewise. -+ * elf32-d10v.c: Likewise. -+ * elf32-dlx.c: Likewise. -+ * elf32-epiphany.c: Likewise. -+ * elf32-fr30.c: Likewise. -+ * elf32-frv.c: Likewise. -+ * elf32-ft32.c: Likewise. -+ * elf32-h8300.c: Likewise. -+ * elf32-hppa.c: Likewise. -+ * elf32-i370.c: Likewise. -+ * elf32-i386.c: Likewise. -+ * elf32-i860.c: Likewise. -+ * elf32-ip2k.c: Likewise. -+ * elf32-iq2000.c: Likewise. -+ * elf32-lm32.c: Likewise. -+ * elf32-m32c.c: Likewise. -+ * elf32-m32r.c: Likewise. -+ * elf32-m68hc11.c: Likewise. -+ * elf32-m68hc1x.c: Likewise. -+ * elf32-m68k.c: Likewise. -+ * elf32-mcore.c: Likewise. -+ * elf32-mep.c: Likewise. -+ * elf32-metag.c: Likewise. -+ * elf32-microblaze.c: Likewise. -+ * elf32-moxie.c: Likewise. -+ * elf32-msp430.c: Likewise. -+ * elf32-mt.c: Likewise. -+ * elf32-nds32.c: Likewise. -+ * elf32-nios2.c: Likewise. -+ * elf32-or1k.c: Likewise. -+ * elf32-ppc.c: Likewise. -+ * elf32-rl78.c: Likewise. -+ * elf32-rx.c: Likewise. -+ * elf32-s390.c: Likewise. -+ * elf32-score.c: Likewise. -+ * elf32-score7.c: Likewise. -+ * elf32-sh-symbian.c: Likewise. -+ * elf32-sh.c: Likewise. -+ * elf32-sh64.c: Likewise. -+ * elf32-spu.c: Likewise. -+ * elf32-tic6x.c: Likewise. -+ * elf32-tilepro.c: Likewise. -+ * elf32-v850.c: Likewise. -+ * elf32-vax.c: Likewise. -+ * elf32-visium.c: Likewise. -+ * elf32-xc16x.c: Likewise. -+ * elf32-xstormy16.c: Likewise. -+ * elf32-xtensa.c: Likewise. -+ * elf64-alpha.c: Likewise. -+ * elf64-hppa.c: Likewise. -+ * elf64-ia64-vms.c: Likewise. -+ * elf64-mmix.c: Likewise. -+ * elf64-ppc.c: Likewise. -+ * elf64-s390.c: Likewise. -+ * elf64-sh64.c: Likewise. -+ * elf64-x86-64.c: Likewise. -+ * elflink.c: Likewise. -+ * elfnn-aarch64.c: Likewise. -+ * elfnn-ia64.c: Likewise. -+ * elfxx-mips.c: Likewise. -+ * elfxx-sparc.c: Likewise. -+ * elfxx-tilegx.c: Likewise. -+ * i386linux.c: Likewise. -+ * linker.c: Likewise. -+ * m68klinux.c: Likewise. -+ * pdp11.c: Likewise. -+ * pe-mips.c: Likewise. -+ * peXXigen.c: Likewise. -+ * reloc.c: Likewise. -+ * reloc16.c: Likewise. -+ * sparclinux.c: Likewise. -+ * sunos.c: Likewise. -+ * vms-alpha.c: Likewise. -+ * xcofflink.c: Likewise. - - 2015-08-18 Alan Modra <amodra@gmail.com> - -@@ -1387,7 +1540,7 @@ - - 2015-08-11 Jiong Wang <jiong.wang@arm.com> - -- * bfd/elfnn-aarch64.c (aarch64_type_of_stub): New parameter "sym_sec". -+ * elfnn-aarch64.c (aarch64_type_of_stub): New parameter "sym_sec". - Loose the check for symbol from ABS section. - (elfNN_aarch64_size_stubs): Pass sym_sec. - -@@ -1688,10 +1841,10 @@ - - 2015-07-10 H.J. Lu <hongjiu.lu@intel.com> - -- PR binutils/18656 -- * bfd.c (bfd_convert_section_size): New function. -- (bfd_convert_section_contents): Likewise. -- * bfd-in2.h: Regenerated. -+ PR binutils/18656 -+ * bfd.c (bfd_convert_section_size): New function. -+ (bfd_convert_section_contents): Likewise. -+ * bfd-in2.h: Regenerated. - - 2015-07-09 Catherine Moore <clm@codesourcery.com> - -@@ -2004,7 +2157,6 @@ - Bernd Schmidt <bernds@codesourcery.com> - Paul Brook <paul@codesourcery.com> - -- bfd/ - * bfd-in2.h: Regenerated. - * elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define. - (COMPACT_EH_CANT_UNWIND_OPCODE): Define. -@@ -2913,7 +3065,7 @@ - 2015-03-18 H.J. Lu <hongjiu.lu@intel.com> - - * compress.c (bfd_compress_section_contents): Make it static. -- * bfd/bfd-in2.h: Regenerated. -+ * bfd-in2.h: Regenerated. - - 2015-03-18 Eric Youngdale <eyoungdale@ptc.com> - -@@ -3062,8 +3214,8 @@ - - 2015-02-27 Marcus Shawcroft <marcus.shawcroft@arm.com> - -- * bfd/bfd-in2.h: Regenerate. -- * bfd/libbfd.h: Regenerate. -+ * bfd-in2.h: Regenerate. -+ * libbfd.h: Regenerate. - - 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com> - -@@ -3534,7 +3686,7 @@ - is weak or pointer_equality_needed is FALSE. - - * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve -- comment discussing why we clear st_value for some symbols. -+ comment discussing why we clear st_value for some symbols. - - 2015-02-02 Kuan-Lin Chen <kuanlinchentw@gmail.com> - -diff --git a/bfd/archive.c b/bfd/archive.c -index b3d03d3..1fc3a94 100644 ---- a/bfd/archive.c -+++ b/bfd/archive.c -@@ -802,7 +802,7 @@ bfd_generic_openr_next_archived_file (bfd *archive, bfd *last_file) - Note that last_file->origin can be odd in the case of - BSD-4.4-style element with a long odd size. */ - filestart += filestart % 2; -- if (filestart <= last_file->proxy_origin) -+ if (filestart < last_file->proxy_origin) ++ PR ld/19579 ++ PR ld/21306 ++ * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check ++ ELF_COMMON_DEF_P for common symbols. ++ * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise. ++ * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. ++ * elflink.c (_bfd_elf_merge_symbol): Revert commits ++ 202ac193bbbecc96a4978d1ac3d17148253f9b01 and ++ 07492f668d2173da7a2bda3707ff0985e0f460b6. ++ ++2017-03-07 Alan Modra <amodra@gmail.com> ++ ++ PR 21224 ++ PR 20519 ++ * elf64-ppc.c (ppc64_elf_relocate_section): Add missing ++ dyn_relocs check. ++ ++2017-03-07 Alan Modra <amodra@gmail.com> ++ ++ Apply from master ++ 2017-03-02 Alan Modra <amodra@gmail.com> ++ * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo. ++ + 2017-03-02 Tristan Gingold <gingold@adacore.com> + + * version.m4: Bump version to 2.28.0 +diff --git a/bfd/config.bfd b/bfd/config.bfd +index 1b28016..c031216 100644 +--- a/bfd/config.bfd ++++ b/bfd/config.bfd +@@ -1439,10 +1439,9 @@ case "${targ}" in + #ifdef BFD64 + riscv32-*-*) + targ_defvec=riscv_elf32_vec +- targ_selvecs="riscv_elf32_vec" ++ targ_selvecs="riscv_elf32_vec riscv_elf64_vec" + want64=true + ;; +- + riscv64-*-*) + targ_defvec=riscv_elf64_vec + targ_selvecs="riscv_elf32_vec riscv_elf64_vec" +diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h +index 5de9ab6..dc4bd87 100644 +--- a/bfd/elf-bfd.h ++++ b/bfd/elf-bfd.h +@@ -1478,6 +1478,10 @@ struct elf_backend_data + /* Address of protected data defined in the shared library may be + external, i.e., due to copy relocation. */ + unsigned extern_protected_data : 1; ++ ++ /* True if `_bfd_elf_link_renumber_dynsyms' must be called even for ++ static binaries. */ ++ unsigned always_renumber_dynsyms : 1; + }; + + /* Information about reloc sections associated with a bfd_elf_section_data +diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c +index 0a78595..e04caef 100644 +--- a/bfd/elf32-arm.c ++++ b/bfd/elf32-arm.c +@@ -4024,10 +4024,12 @@ arm_type_of_stub (struct bfd_link_info *info, + if (!thumb_only) + { + if (input_sec->flags & SEC_ELF_PURECODE) +- _bfd_error_handler (_("\ +-%B(%A): warning: long branch veneers used in section with SHF_ARM_PURECODE section \ +-attribute is only supported for M-profile targets that implement the movw instruction."), +- input_sec); ++ _bfd_error_handler ++ (_("%B(%A): warning: long branch veneers used in" ++ " section with SHF_ARM_PURECODE section" ++ " attribute is only supported for M-profile" ++ " targets that implement the movw instruction."), ++ input_bfd, input_sec); + + stub_type = (bfd_link_pic (info) | globals->pic_veneer) + /* PIC stubs. */ +@@ -4056,10 +4058,12 @@ attribute is only supported for M-profile targets that implement the movw instru + else + { + if (input_sec->flags & SEC_ELF_PURECODE) +- _bfd_error_handler (_("\ +-%B(%A): warning: long branch veneers used in section with SHF_ARM_PURECODE section \ +-attribute is only supported for M-profile targets that implement the movw instruction."), +- input_sec); ++ _bfd_error_handler ++ (_("%B(%A): warning: long branch veneers used in" ++ " section with SHF_ARM_PURECODE section" ++ " attribute is only supported for M-profile" ++ " targets that implement the movw instruction."), ++ input_bfd, input_sec); + + stub_type = (bfd_link_pic (info) | globals->pic_veneer) + /* PIC stub. */ +@@ -4073,13 +4077,12 @@ attribute is only supported for M-profile targets that implement the movw instru + else { - /* Prevent looping. See PR19256. */ - bfd_set_error (bfd_error_malformed_archive); -diff --git a/bfd/coff-alpha.c b/bfd/coff-alpha.c -index 7478f2f..fffb9f7 100644 ---- a/bfd/coff-alpha.c -+++ b/bfd/coff-alpha.c -@@ -2208,7 +2208,7 @@ alpha_ecoff_openr_next_archived_file (bfd *archive, bfd *last_file) - BSD-4.4-style element with a long odd size. */ - filestart = last_file->proxy_origin + size; - filestart += filestart % 2; -- if (filestart <= last_file->proxy_origin) -+ if (filestart < last_file->proxy_origin) + if (input_sec->flags & SEC_ELF_PURECODE) +- _bfd_error_handler (_("%B(%s): warning: long branch " +- " veneers used in section with " +- "SHF_ARM_PURECODE section " +- "attribute is only supported" +- " for M-profile targets that " +- "implement the movw " +- "instruction.")); ++ _bfd_error_handler ++ (_("%B(%A): warning: long branch veneers used in" ++ " section with SHF_ARM_PURECODE section" ++ " attribute is only supported" " for M-profile" ++ " targets that implement the movw instruction."), ++ input_bfd, input_sec); + + /* Thumb to arm. */ + if (sym_sec != NULL +@@ -4126,13 +4129,12 @@ attribute is only supported for M-profile targets that implement the movw instru + || r_type == R_ARM_TLS_CALL) + { + if (input_sec->flags & SEC_ELF_PURECODE) +- _bfd_error_handler (_("%B(%s): warning: long branch " +- " veneers used in section with " +- "SHF_ARM_PURECODE section " +- "attribute is only supported" +- " for M-profile targets that " +- "implement the movw " +- "instruction.")); ++ _bfd_error_handler ++ (_("%B(%A): warning: long branch veneers used in" ++ " section with SHF_ARM_PURECODE section" ++ " attribute is only supported for M-profile" ++ " targets that implement the movw instruction."), ++ input_bfd, input_sec); + if (branch_type == ST_BRANCH_TO_THUMB) { - /* Prevent looping. See PR19256. */ - bfd_set_error (bfd_error_malformed_archive); -diff --git a/bfd/coff-i386.c b/bfd/coff-i386.c -index a9725c4..1b1a815 100644 ---- a/bfd/coff-i386.c -+++ b/bfd/coff-i386.c -@@ -139,41 +139,41 @@ coff_i386_reloc (bfd *abfd, - #define DOIT(x) \ - x = ((x & ~howto->dst_mask) | (((x & howto->src_mask) + diff) & howto->dst_mask)) - -- if (diff != 0) -- { -- reloc_howto_type *howto = reloc_entry->howto; -- unsigned char *addr = (unsigned char *) data + reloc_entry->address; -+ if (diff != 0) -+ { -+ reloc_howto_type *howto = reloc_entry->howto; -+ unsigned char *addr = (unsigned char *) data + reloc_entry->address; -+ -+ switch (howto->size) -+ { -+ case 0: -+ { -+ char x = bfd_get_8 (abfd, addr); -+ DOIT (x); -+ bfd_put_8 (abfd, x, addr); -+ } -+ break; - -- switch (howto->size) -+ case 1: - { -- case 0: -- { -- char x = bfd_get_8 (abfd, addr); -- DOIT (x); -- bfd_put_8 (abfd, x, addr); -- } -- break; -- -- case 1: -- { -- short x = bfd_get_16 (abfd, addr); -- DOIT (x); -- bfd_put_16 (abfd, (bfd_vma) x, addr); -- } -- break; -- -- case 2: -- { -- long x = bfd_get_32 (abfd, addr); -- DOIT (x); -- bfd_put_32 (abfd, (bfd_vma) x, addr); -- } -- break; -- -- default: -- abort (); -+ short x = bfd_get_16 (abfd, addr); -+ DOIT (x); -+ bfd_put_16 (abfd, (bfd_vma) x, addr); - } -- } -+ break; -+ -+ case 2: -+ { -+ long x = bfd_get_32 (abfd, addr); -+ DOIT (x); -+ bfd_put_32 (abfd, (bfd_vma) x, addr); -+ } -+ break; -+ -+ default: -+ abort (); -+ } -+ } - - /* Now let bfd_perform_relocation finish everything up. */ - return bfd_reloc_continue; -diff --git a/bfd/coff-x86_64.c b/bfd/coff-x86_64.c -index 4e6420a..9d7c845 100644 ---- a/bfd/coff-x86_64.c -+++ b/bfd/coff-x86_64.c -@@ -138,59 +138,61 @@ coff_amd64_reloc (bfd *abfd, - #define DOIT(x) \ - x = ((x & ~howto->dst_mask) | (((x & howto->src_mask) + diff) & howto->dst_mask)) - -- if (diff != 0) -- { -- reloc_howto_type *howto = reloc_entry->howto; -- unsigned char *addr = (unsigned char *) data + reloc_entry->address; -- -- /* FIXME: We do not have an end address for data, so we cannot -- accurately range check any addresses computed against it. -- cf: PR binutils/17512: file: 1085-1761-0.004. -- For now we do the best that we can. */ -- if (addr < (unsigned char *) data || addr > ((unsigned char *) data) + input_section->size) -+ if (diff != 0) -+ { -+ reloc_howto_type *howto = reloc_entry->howto; -+ unsigned char *addr = (unsigned char *) data + reloc_entry->address; -+ -+ /* FIXME: We do not have an end address for data, so we cannot -+ accurately range check any addresses computed against it. -+ cf: PR binutils/17512: file: 1085-1761-0.004. -+ For now we do the best that we can. */ -+ if (addr < (unsigned char *) data -+ || addr > ((unsigned char *) data) + input_section->size) -+ { -+ bfd_set_error (bfd_error_bad_value); -+ return bfd_reloc_notsupported; -+ } -+ -+ switch (howto->size) -+ { -+ case 0: -+ { -+ char x = bfd_get_8 (abfd, addr); -+ DOIT (x); -+ bfd_put_8 (abfd, x, addr); -+ } -+ break; -+ -+ case 1: -+ { -+ short x = bfd_get_16 (abfd, addr); -+ DOIT (x); -+ bfd_put_16 (abfd, (bfd_vma) x, addr); -+ } -+ break; -+ -+ case 2: - { -- bfd_set_error (bfd_error_bad_value); -- return bfd_reloc_notsupported; -+ long x = bfd_get_32 (abfd, addr); -+ DOIT (x); -+ bfd_put_32 (abfd, (bfd_vma) x, addr); - } -+ break; - -- switch (howto->size) -+ case 4: - { -- case 0: -- { -- char x = bfd_get_8 (abfd, addr); -- DOIT (x); -- bfd_put_8 (abfd, x, addr); -- } -- break; -- -- case 1: -- { -- short x = bfd_get_16 (abfd, addr); -- DOIT (x); -- bfd_put_16 (abfd, (bfd_vma) x, addr); -- } -- break; -- -- case 2: -- { -- long x = bfd_get_32 (abfd, addr); -- DOIT (x); -- bfd_put_32 (abfd, (bfd_vma) x, addr); -- } -- break; -- case 4: -- { -- long long x = bfd_get_64 (abfd, addr); -- DOIT (x); -- bfd_put_64 (abfd, (bfd_vma) x, addr); -- } -- break; -- -- default: -- bfd_set_error (bfd_error_bad_value); -- return bfd_reloc_notsupported; -+ long long x = bfd_get_64 (abfd, addr); -+ DOIT (x); -+ bfd_put_64 (abfd, (bfd_vma) x, addr); - } -- } -+ break; -+ -+ default: -+ bfd_set_error (bfd_error_bad_value); -+ return bfd_reloc_notsupported; -+ } -+ } + /* Arm to thumb. */ +diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c +index 56b143d..0f6c188 100644 +--- a/bfd/elf32-avr.c ++++ b/bfd/elf32-avr.c +@@ -3284,8 +3284,7 @@ avr_add_stub (const char *stub_name, + if (hsh == NULL) + { + /* xgettext:c-format */ +- _bfd_error_handler (_("%B: cannot create stub entry %s"), +- NULL, stub_name); ++ _bfd_error_handler (_("cannot create stub entry %s"), stub_name); + return NULL; + } - /* Now let bfd_perform_relocation finish everything up. */ - return bfd_reloc_continue; -diff --git a/bfd/cofflink.c b/bfd/cofflink.c -index 8d98fec..88eb2b3 100644 ---- a/bfd/cofflink.c -+++ b/bfd/cofflink.c -@@ -2977,6 +2977,12 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd, - else - { - sec = sections[symndx]; -+ -+ /* PR 19623: Relocations against symbols in -+ the absolute sections should ignored. */ -+ if (bfd_is_abs_section (sec)) -+ continue; -+ - val = (sec->output_section->vma - + sec->output_offset - + sym->n_value); -diff --git a/bfd/configure b/bfd/configure -index cf3c746..7411c6d 100755 ---- a/bfd/configure -+++ b/bfd/configure -@@ -1,6 +1,6 @@ - #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. --# Generated by GNU Autoconf 2.64 for bfd 2.26. -+# Generated by GNU Autoconf 2.64 for bfd 2.26.0. - # - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, - # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software -@@ -556,8 +556,8 @@ MAKEFLAGS= - # Identity of this package. - PACKAGE_NAME='bfd' - PACKAGE_TARNAME='bfd' --PACKAGE_VERSION='2.26' --PACKAGE_STRING='bfd 2.26' -+PACKAGE_VERSION='2.26.0' -+PACKAGE_STRING='bfd 2.26.0' - PACKAGE_BUGREPORT='' - PACKAGE_URL='' - -@@ -1351,7 +1351,7 @@ if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF --\`configure' configures bfd 2.26 to adapt to many kinds of systems. -+\`configure' configures bfd 2.26.0 to adapt to many kinds of systems. - - Usage: $0 [OPTION]... [VAR=VALUE]... - -@@ -1422,7 +1422,7 @@ fi - - if test -n "$ac_init_help"; then - case $ac_init_help in -- short | recursive ) echo "Configuration of bfd 2.26:";; -+ short | recursive ) echo "Configuration of bfd 2.26.0:";; - esac - cat <<\_ACEOF - -@@ -1543,7 +1543,7 @@ fi - test -n "$ac_init_help" && exit $ac_status - if $ac_init_version; then - cat <<\_ACEOF --bfd configure 2.26 -+bfd configure 2.26.0 - generated by GNU Autoconf 2.64 - - Copyright (C) 2009 Free Software Foundation, Inc. -@@ -2185,7 +2185,7 @@ cat >config.log <<_ACEOF - This file contains any messages produced by compilers while - running configure, to aid debugging if configure makes a mistake. - --It was created by bfd $as_me 2.26, which was -+It was created by bfd $as_me 2.26.0, which was - generated by GNU Autoconf 2.64. Invocation command line was - - $ $0 $@ -@@ -3993,7 +3993,7 @@ fi - - # Define the identity of the package. - PACKAGE='bfd' -- VERSION='2.26' -+ VERSION='2.26.0' - - - cat >>confdefs.h <<_ACEOF -@@ -16533,7 +16533,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - # report actual input values of CONFIG_FILES etc. instead of their - # values after options handling. - ac_log=" --This file was extended by bfd $as_me 2.26, which was -+This file was extended by bfd $as_me 2.26.0, which was - generated by GNU Autoconf 2.64. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES -@@ -16597,7 +16597,7 @@ Report bugs to the package provider." - _ACEOF - cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_cs_version="\\ --bfd config.status 2.26 -+bfd config.status 2.26.0 - configured by $0, generated by GNU Autoconf 2.64, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" - -diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c -index 176f018..64cfe9b 100644 ---- a/bfd/dwarf2.c -+++ b/bfd/dwarf2.c -@@ -3706,8 +3706,10 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd, - fail more quickly. */ - return FALSE; - -+ /* Set BFD_DECOMPRESS to decompress debug sections. */ - if ((debug_bfd = bfd_openr (debug_filename, NULL)) == NULL -- || ! bfd_check_format (debug_bfd, bfd_object) -+ || !(debug_bfd->flags |= BFD_DECOMPRESS, -+ bfd_check_format (debug_bfd, bfd_object)) - || (msec = find_debug_info (debug_bfd, - debug_sections, NULL)) == NULL - || !bfd_generic_link_read_symbols (debug_bfd)) -diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c -index ad40914..3fc1f57 100644 ---- a/bfd/elf32-hppa.c -+++ b/bfd/elf32-hppa.c -@@ -3245,6 +3245,8 @@ tpoff (struct bfd_link_info *info, bfd_vma address) - static bfd_boolean - elf32_hppa_final_link (bfd *abfd, struct bfd_link_info *info) - { -+ struct stat buf; -+ - /* Invoke the regular ELF linker to do all the work. */ - if (!bfd_elf_final_link (abfd, info)) - return FALSE; -@@ -3254,6 +3256,13 @@ elf32_hppa_final_link (bfd *abfd, struct bfd_link_info *info) - if (bfd_link_relocatable (info)) - return TRUE; +diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c +index 97b8cc3..d4bbceb 100644 +--- a/bfd/elf32-cris.c ++++ b/bfd/elf32-cris.c +@@ -2714,8 +2714,9 @@ elf_cris_adjust_gotplt_to_got (struct elf_cris_link_hash_entry *h, void * p) + struct bfd_link_info *info = (struct bfd_link_info *) p; + + /* A GOTPLT reloc, when activated, is supposed to be included into +- the PLT refcount. */ ++ the PLT refcount, when the symbol isn't set-or-forced local. */ + BFD_ASSERT (h->gotplt_refcount == 0 ++ || h->root.plt.refcount == -1 + || h->gotplt_refcount <= h->root.plt.refcount); + + /* If nobody wanted a GOTPLT with this symbol, we're done. */ +@@ -2741,6 +2742,7 @@ elf_cris_adjust_gotplt_to_got (struct elf_cris_link_hash_entry *h, void * p) + srelgot = elf_hash_table (info)->srelgot; + + /* Put accurate refcounts there. */ ++ BFD_ASSERT (h->root.got.refcount >= 0); + h->root.got.refcount += h->gotplt_refcount; + h->reg_got_refcount = h->gotplt_refcount; + +@@ -3476,7 +3478,10 @@ cris_elf_check_relocs (bfd *abfd, + continue; -+ /* Do not attempt to sort non-regular files. This is here -+ especially for configure scripts and kernel builds which run -+ tests with "ld [...] -o /dev/null". */ -+ if (stat (abfd->filename, &buf) != 0 -+ || !S_ISREG(buf.st_mode)) -+ return TRUE; + h->needs_plt = 1; +- h->plt.refcount++; + - return elf_hppa_sort_unwind (abfd); - } ++ /* If the symbol is forced local, the refcount is unavailable. */ ++ if (h->plt.refcount != -1) ++ h->plt.refcount++; + break; + case R_CRIS_8: diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c -index 300839b..79f339e 100644 +index 24beba3..f570253 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c -@@ -1830,7 +1830,8 @@ do_size: - && (sec->flags & SEC_ALLOC) != 0 - && (r_type != R_386_PC32 - || (h != NULL -- && (! SYMBOLIC_BIND (info, h) -+ && (! (bfd_link_pie (info) -+ || SYMBOLIC_BIND (info, h)) - || h->root.type == bfd_link_hash_defweak - || !h->def_regular)))) - || (ELIMINATE_COPY_RELOCS -@@ -2490,12 +2491,14 @@ elf_i386_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) - } - else - { -+ eh->plt_got.offset = (bfd_vma) -1; - h->plt.offset = (bfd_vma) -1; - h->needs_plt = 0; - } - } - else - { -+ eh->plt_got.offset = (bfd_vma) -1; - h->plt.offset = (bfd_vma) -1; - h->needs_plt = 0; - } -@@ -4016,10 +4019,12 @@ elf_i386_relocate_section (bfd *output_bfd, - - /* It is relative to .got.plt section. */ - if (h->got.offset != (bfd_vma) -1) -- /* Use GOT entry. */ -+ /* Use GOT entry. Mask off the least significant bit in -+ GOT offset which may be set by R_386_GOT32 processing -+ below. */ - relocation = (htab->elf.sgot->output_section->vma - + htab->elf.sgot->output_offset -- + h->got.offset - offplt); -+ + (h->got.offset & ~1) - offplt); - else - /* Use GOTPLT entry. */ - relocation = (h->plt.offset / plt_entry_size - 1 + 3) * 4; -@@ -4285,8 +4290,8 @@ r_386_got32: - else if (h != NULL - && h->dynindx != -1 - && (r_type == R_386_PC32 -- || !bfd_link_pic (info) -- || !SYMBOLIC_BIND (info, h) -+ || !(bfd_link_executable (info) -+ || SYMBOLIC_BIND (info, h)) - || !h->def_regular)) - outrel.r_info = ELF32_R_INFO (h->dynindx, r_type); - else -@@ -5355,19 +5360,23 @@ elf_i386_reloc_type_class (const struct bfd_link_info *info, - bfd *abfd = info->output_bfd; - const struct elf_backend_data *bed = get_elf_backend_data (abfd); - struct elf_link_hash_table *htab = elf_hash_table (info); -- unsigned long r_symndx = ELF32_R_SYM (rela->r_info); -- Elf_Internal_Sym sym; -- -- if (htab->dynsym == NULL -- || !bed->s->swap_symbol_in (abfd, -- (htab->dynsym->contents -- + r_symndx * sizeof (Elf32_External_Sym)), -- 0, &sym)) -- abort (); - -- /* Check relocation against STT_GNU_IFUNC symbol. */ -- if (ELF32_ST_TYPE (sym.st_info) == STT_GNU_IFUNC) -- return reloc_class_ifunc; -+ if (htab->dynsym != NULL -+ && htab->dynsym->contents != NULL) -+ { -+ /* Check relocation against STT_GNU_IFUNC symbol if there are -+ dynamic symbols. */ -+ unsigned long r_symndx = ELF32_R_SYM (rela->r_info); -+ Elf_Internal_Sym sym; -+ if (!bed->s->swap_symbol_in (abfd, -+ (htab->dynsym->contents -+ + r_symndx * sizeof (Elf32_External_Sym)), -+ 0, &sym)) -+ abort (); -+ -+ if (ELF32_ST_TYPE (sym.st_info) == STT_GNU_IFUNC) -+ return reloc_class_ifunc; -+ } - - switch (ELF32_R_TYPE (rela->r_info)) - { -diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c -index 3b628b4..aa9cfd2 100644 ---- a/bfd/elf64-hppa.c -+++ b/bfd/elf64-hppa.c -@@ -2945,7 +2945,7 @@ elf_hppa_record_segment_addrs (bfd *abfd, - static bfd_boolean - elf_hppa_final_link (bfd *abfd, struct bfd_link_info *info) - { -- bfd_boolean retval; -+ struct stat buf; - struct elf64_hppa_link_hash_table *hppa_info = hppa_link_hash_table (info); - - if (hppa_info == NULL) -@@ -3029,7 +3029,8 @@ elf_hppa_final_link (bfd *abfd, struct bfd_link_info *info) - info); - - /* Invoke the regular ELF backend linker to do all the work. */ -- retval = bfd_elf_final_link (abfd, info); -+ if (!bfd_elf_final_link (abfd, info)) -+ return FALSE; - - elf_link_hash_traverse (elf_hash_table (info), - elf_hppa_remark_useless_dynamic_symbols, -@@ -3037,10 +3038,17 @@ elf_hppa_final_link (bfd *abfd, struct bfd_link_info *info) - - /* If we're producing a final executable, sort the contents of the - unwind section. */ -- if (retval && !bfd_link_relocatable (info)) -- retval = elf_hppa_sort_unwind (abfd); -+ if (bfd_link_relocatable (info)) -+ return TRUE; -+ -+ /* Do not attempt to sort non-regular files. This is here -+ especially for configure scripts and kernel builds which run -+ tests with "ld [...] -o /dev/null". */ -+ if (stat (abfd->filename, &buf) != 0 -+ || !S_ISREG(buf.st_mode)) -+ return TRUE; - -- return retval; -+ return elf_hppa_sort_unwind (abfd); - } - - /* Relocate the given INSN. VALUE should be the actual value we want +@@ -6576,6 +6576,8 @@ elf32_i386_nacl_elf_object_p (bfd *abfd) + #undef TARGET_LITTLE_NAME + #define TARGET_LITTLE_NAME "elf32-i386-vxworks" + #undef ELF_OSABI ++#undef ELF_MAXPAGESIZE ++#define ELF_MAXPAGESIZE 0x1000 + #undef elf_backend_plt_alignment + #define elf_backend_plt_alignment 4 + +diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c +index 0f3eb68..10caa8a 100644 +--- a/bfd/elf32-ppc.c ++++ b/bfd/elf32-ppc.c +@@ -4921,7 +4921,7 @@ ppc_elf_vle_split16 (bfd *input_bfd, + unsigned int insn, opcode, top5; + + insn = bfd_get_32 (input_bfd, loc); +- opcode = insn & 0xf300f800; ++ opcode = insn & 0xfc00f800; + if (opcode == E_OR2I_INSN + || opcode == E_AND2I_DOT_INSN + || opcode == E_OR2IS_INSN +diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c +index fd1bc13..ddb6f5b 100644 +--- a/bfd/elf32-s390.c ++++ b/bfd/elf32-s390.c +@@ -3785,7 +3785,7 @@ elf_s390_finish_dynamic_symbol (bfd *output_bfd, + RELATIVE reloc. The entry in the global offset table + will already have been initialized in the + relocate_section function. */ +- if (!h->def_regular) ++ if (!(h->def_regular || ELF_COMMON_DEF_P (h))) + return FALSE; + BFD_ASSERT((h->got.offset & 1) != 0); + rela.r_info = ELF32_R_INFO (0, R_390_RELATIVE); diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c -index 162862c..ffe23e6 100644 +index e7d4792..765bc6b 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c -@@ -4344,14 +4344,20 @@ create_linkage_sections (bfd *dynobj, struct bfd_link_info *info) - - htab = ppc_hash_table (info); - -- /* Create .sfpr for code to save and restore fp regs. */ - flags = (SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_READONLY - | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED); -- htab->sfpr = bfd_make_section_anyway_with_flags (dynobj, ".sfpr", -- flags); -- if (htab->sfpr == NULL -- || ! bfd_set_section_alignment (dynobj, htab->sfpr, 2)) -- return FALSE; -+ if (htab->params->save_restore_funcs) -+ { -+ /* Create .sfpr for code to save and restore fp regs. */ -+ htab->sfpr = bfd_make_section_anyway_with_flags (dynobj, ".sfpr", -+ flags); -+ if (htab->sfpr == NULL -+ || ! bfd_set_section_alignment (dynobj, htab->sfpr, 2)) -+ return FALSE; -+ } -+ -+ if (bfd_link_relocatable (info)) -+ return TRUE; - - /* Create .glink for lazy dynamic linking support. */ - htab->glink = bfd_make_section_anyway_with_flags (dynobj, ".glink", -@@ -4429,9 +4435,6 @@ ppc64_elf_init_stub_bfd (struct bfd_link_info *info, - htab->elf.dynobj = params->stub_bfd; - htab->params = params; - -- if (bfd_link_relocatable (info)) -- return TRUE; -- - return create_linkage_sections (htab->elf.dynobj, info); - } - -@@ -6665,7 +6668,7 @@ sfpr_define (struct bfd_link_info *info, - sym[len + 0] = i / 10 + '0'; - sym[len + 1] = i % 10 + '0'; - h = (struct ppc_link_hash_entry *) -- elf_link_hash_lookup (&htab->elf, sym, FALSE, FALSE, TRUE); -+ elf_link_hash_lookup (&htab->elf, sym, writing, TRUE, TRUE); - if (stub_sec != NULL) - { - if (h != NULL -@@ -6706,6 +6709,7 @@ sfpr_define (struct bfd_link_info *info, - h->elf.root.u.def.value = htab->sfpr->size; - h->elf.type = STT_FUNC; - h->elf.def_regular = 1; -+ h->elf.non_elf = 0; - _bfd_elf_link_hash_hide_symbol (info, &h->elf, TRUE); - writing = TRUE; - if (htab->sfpr->contents == NULL) -@@ -7050,14 +7054,28 @@ ppc64_elf_func_desc_adjust (bfd *obfd ATTRIBUTE_UNUSED, - struct bfd_link_info *info) - { - struct ppc_link_hash_table *htab; -- unsigned int i; - - htab = ppc_hash_table (info); - if (htab == NULL) - return FALSE; - -- if (!bfd_link_relocatable (info) -- && htab->elf.hgot != NULL) -+ /* Provide any missing _save* and _rest* functions. */ -+ if (htab->sfpr != NULL) -+ { -+ unsigned int i; -+ -+ htab->sfpr->size = 0; -+ for (i = 0; i < ARRAY_SIZE (save_res_funcs); i++) -+ if (!sfpr_define (info, &save_res_funcs[i], NULL)) -+ return FALSE; -+ if (htab->sfpr->size == 0) -+ htab->sfpr->flags |= SEC_EXCLUDE; -+ } -+ -+ if (bfd_link_relocatable (info)) -+ return TRUE; -+ -+ if (htab->elf.hgot != NULL) +@@ -7627,7 +7627,7 @@ tocsave_find (struct ppc_link_hash_table *htab, + if (ent.sec == NULL || ent.sec->output_section == NULL) { - _bfd_elf_link_hash_hide_symbol (info, htab->elf.hgot, TRUE); - /* Make .TOC. defined so as to prevent it being made dynamic. -@@ -7076,22 +7094,8 @@ ppc64_elf_func_desc_adjust (bfd *obfd ATTRIBUTE_UNUSED, - | STV_HIDDEN); + _bfd_error_handler +- (_("%B: undefined symbol on R_PPC64_TOCSAVE relocation")); ++ (_("%B: undefined symbol on R_PPC64_TOCSAVE relocation"), ibfd); + return NULL; } -- if (htab->sfpr == NULL) -- /* We don't have any relocs. */ -- return TRUE; -- -- /* Provide any missing _save* and _rest* functions. */ -- htab->sfpr->size = 0; -- if (htab->params->save_restore_funcs) -- for (i = 0; i < ARRAY_SIZE (save_res_funcs); i++) -- if (!sfpr_define (info, &save_res_funcs[i], NULL)) -- return FALSE; -- - elf_link_hash_traverse (&htab->elf, func_desc_adjust, info); - -- if (htab->sfpr->size == 0) -- htab->sfpr->flags |= SEC_EXCLUDE; -- - return TRUE; - } - +@@ -14798,8 +14798,10 @@ ppc64_elf_relocate_section (bfd *output_bfd, + break; + + if (bfd_link_pic (info) +- ? ((h != NULL && pc_dynrelocs (h)) +- || must_be_dyn_reloc (info, r_type)) ++ ? ((h == NULL ++ || h->dyn_relocs != NULL) ++ && ((h != NULL && pc_dynrelocs (h)) ++ || must_be_dyn_reloc (info, r_type))) + : (h != NULL + ? h->dyn_relocs != NULL + : ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)) +diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c +index b5fd05f..fbbf8d6 100644 +--- a/bfd/elf64-s390.c ++++ b/bfd/elf64-s390.c +@@ -3582,7 +3582,7 @@ elf_s390_finish_dynamic_symbol (bfd *output_bfd, + RELATIVE reloc. The entry in the global offset table + will already have been initialized in the + relocate_section function. */ +- if (!h->def_regular) ++ if (!(h->def_regular || ELF_COMMON_DEF_P (h))) + return FALSE; + BFD_ASSERT((h->got.offset & 1) != 0); + rela.r_info = ELF64_R_INFO (0, R_390_RELATIVE); diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c -index 63957bb..e80fd20 100644 +index e0e6c16..e363eaf 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c -@@ -2029,7 +2029,8 @@ do_size: - && (sec->flags & SEC_ALLOC) != 0 - && (! IS_X86_64_PCREL_TYPE (r_type) - || (h != NULL -- && (! SYMBOLIC_BIND (info, h) -+ && (! (bfd_link_pie (info) -+ || SYMBOLIC_BIND (info, h)) - || h->root.type == bfd_link_hash_defweak - || !h->def_regular)))) - || (ELIMINATE_COPY_RELOCS -@@ -2723,12 +2724,14 @@ elf_x86_64_allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) - } - else - { -+ eh->plt_got.offset = (bfd_vma) -1; - h->plt.offset = (bfd_vma) -1; - h->needs_plt = 0; - } - } - else - { -+ eh->plt_got.offset = (bfd_vma) -1; - h->plt.offset = (bfd_vma) -1; - h->needs_plt = 0; - } -@@ -3190,35 +3193,43 @@ elf_x86_64_convert_load (bfd *abfd, asection *sec, - } - else - { -- asection *asect; -- bfd_size_type size; -+ bfd_signed_vma distance; - - /* At this point, we don't know the load addresses of TSEC - section nor SEC section. We estimate the distrance between -- SEC and TSEC. */ -- size = 0; -- for (asect = sec->output_section; -- asect != NULL && asect != tsec->output_section; -- asect = asect->next) -+ SEC and TSEC. We store the estimated distances in the -+ compressed_size field of the output section, which is only -+ used to decompress the compressed input section. */ -+ if (sec->output_section->compressed_size == 0) - { -- asection *i; -- for (i = asect->output_section->map_head.s; -- i != NULL; -- i = i->map_head.s) -+ asection *asect; -+ bfd_size_type size = 0; -+ for (asect = link_info->output_bfd->sections; -+ asect != NULL; -+ asect = asect->next) +@@ -4926,7 +4926,8 @@ do_ifunc_pointer: { -- size = align_power (size, i->alignment_power); -- size += i->size; -+ asection *i; -+ for (i = asect->map_head.s; -+ i != NULL; -+ i = i->map_head.s) -+ { -+ size = align_power (size, i->alignment_power); -+ size += i->size; -+ } -+ asect->compressed_size = size; + /* Symbol is referenced locally. Make sure it is + defined locally or for a branch. */ +- fail = !h->def_regular && !branch; ++ fail = (!(h->def_regular || ELF_COMMON_DEF_P (h)) ++ && !branch); } - } - - /* Don't convert GOTPCREL relocations if TSEC isn't placed - after SEC. */ -- if (asect == NULL) -+ distance = (tsec->output_section->compressed_size -+ - sec->output_section->compressed_size); -+ if (distance < 0) - continue; - - /* Take PT_GNU_RELRO segment into account by adding - maxpagesize. */ -- if ((toff + size + maxpagesize - roff + 0x80000000) -+ if ((toff + distance + maxpagesize - roff + 0x80000000) - > 0xffffffff) - continue; - } -@@ -4631,8 +4642,8 @@ direct: - else if (h != NULL - && h->dynindx != -1 - && (IS_X86_64_PCREL_TYPE (r_type) -- || ! bfd_link_pic (info) -- || ! SYMBOLIC_BIND (info, h) -+ || !(bfd_link_executable (info) -+ || SYMBOLIC_BIND (info, h)) - || ! h->def_regular)) - { - outrel.r_info = htab->r_info (h->dynindx, r_type); -@@ -5728,19 +5739,23 @@ elf_x86_64_reloc_type_class (const struct bfd_link_info *info, - bfd *abfd = info->output_bfd; - const struct elf_backend_data *bed = get_elf_backend_data (abfd); - struct elf_x86_64_link_hash_table *htab = elf_x86_64_hash_table (info); -- unsigned long r_symndx = htab->r_sym (rela->r_info); -- Elf_Internal_Sym sym; -- -- if (htab->elf.dynsym == NULL -- || !bed->s->swap_symbol_in (abfd, -- (htab->elf.dynsym->contents -- + r_symndx * bed->s->sizeof_sym), -- 0, &sym)) -- abort (); - -- /* Check relocation against STT_GNU_IFUNC symbol. */ -- if (ELF_ST_TYPE (sym.st_info) == STT_GNU_IFUNC) -- return reloc_class_ifunc; -+ if (htab->elf.dynsym != NULL -+ && htab->elf.dynsym->contents != NULL) -+ { -+ /* Check relocation against STT_GNU_IFUNC symbol if there are -+ dynamic symbols. */ -+ unsigned long r_symndx = htab->r_sym (rela->r_info); -+ Elf_Internal_Sym sym; -+ if (!bed->s->swap_symbol_in (abfd, -+ (htab->elf.dynsym->contents -+ + r_symndx * bed->s->sizeof_sym), -+ 0, &sym)) -+ abort (); -+ -+ if (ELF_ST_TYPE (sym.st_info) == STT_GNU_IFUNC) -+ return reloc_class_ifunc; -+ } - - switch ((int) ELF32_R_TYPE (rela->r_info)) - { + else if (!(bfd_link_pie (info) + && (h->needs_copy || eh->needs_copy))) diff --git a/bfd/elflink.c b/bfd/elflink.c -index 3d37bb4..842e85b 100644 +index 69b66f2..cd03a13 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c -@@ -555,6 +555,19 @@ bfd_elf_record_link_assignment (bfd *output_bfd, - if (h == NULL) - return provide; - -+ if (h->versioned == unknown) -+ { -+ /* Set versioned if symbol version is unknown. */ -+ char *version = strrchr (name, ELF_VER_CHR); -+ if (version) -+ { -+ if (version > name && version[-1] != ELF_VER_CHR) -+ h->versioned = versioned_hidden; -+ else -+ h->versioned = versioned; -+ } -+ } -+ - switch (h->root.type) - { - case bfd_link_hash_defined: -@@ -1472,13 +1485,16 @@ _bfd_elf_merge_symbol (bfd *abfd, +@@ -1543,16 +1543,13 @@ _bfd_elf_merge_symbol (bfd *abfd, represent variables; this can cause confusion in principle, but any such confusion would seem to indicate an erroneous program or shared library. We also permit a common symbol in a regular -- object to override a weak symbol in a shared object. */ -+ object to override a weak symbol in a shared object. A common -+ symbol in executable also overrides a symbol in a shared object. */ +- object to override a weak symbol in a shared object. A common +- symbol in executable also overrides a symbol in a shared object. */ ++ object to override a weak symbol in a shared object. */ if (newdyn && newdef && (olddef || (h->root.type == bfd_link_hash_common -- && (newweak || newfunc)))) -+ && (newweak -+ || newfunc -+ || (!olddyn && bfd_link_executable (info)))))) +- && (newweak +- || newfunc +- || (!olddyn && bfd_link_executable (info)))))) ++ && (newweak || newfunc)))) { *override = TRUE; newdef = FALSE; -@@ -4562,8 +4578,10 @@ error_free_dyn: - break; - } +@@ -6710,6 +6707,8 @@ bfd_boolean + bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) + { + const struct elf_backend_data *bed; ++ unsigned long section_sym_count; ++ bfd_size_type dynsymcount; -- /* Don't add DT_NEEDED for references from the dummy bfd. */ -+ /* Don't add DT_NEEDED for references from the dummy bfd nor -+ for unmatched symbol. */ - if (!add_needed -+ && matched - && definition - && ((dynsym - && h->ref_regular_nonweak -diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c -index 59c51cc..d83dc1b 100644 ---- a/bfd/elfnn-aarch64.c -+++ b/bfd/elfnn-aarch64.c -@@ -2655,7 +2655,7 @@ aarch64_type_of_stub (struct bfd_link_info *info, - bfd_boolean via_plt_p; - - if (st_type != STT_FUNC -- && (sym_sec != bfd_abs_section_ptr)) -+ && (sym_sec == input_sec)) - return stub_type; - - globals = elf_aarch64_hash_table (info); -@@ -4174,7 +4174,7 @@ elfNN_aarch64_size_stubs (bfd *output_bfd, - goto error_ret_free_internal; - } + if (!is_elf_hash_table (info->hash)) + return TRUE; +@@ -6717,24 +6716,30 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) + bed = get_elf_backend_data (output_bfd); + (*bed->elf_backend_init_index_section) (output_bfd, info); + ++ /* Assign dynsym indices. In a shared library we generate a section ++ symbol for each output section, which come first. Next come all ++ of the back-end allocated local dynamic syms, followed by the rest ++ of the global symbols. ++ ++ This is usually not needed for static binaries, however backends ++ can request to always do it, e.g. the MIPS backend uses dynamic ++ symbol counts to lay out GOT, which will be produced in the ++ presence of GOT relocations even in static binaries (holding fixed ++ data in that case, to satisfy those relocations). */ ++ ++ if (elf_hash_table (info)->dynamic_sections_created ++ || bed->always_renumber_dynsyms) ++ dynsymcount = _bfd_elf_link_renumber_dynsyms (output_bfd, info, ++ §ion_sym_count); ++ + if (elf_hash_table (info)->dynamic_sections_created) + { + bfd *dynobj; + asection *s; +- bfd_size_type dynsymcount; +- unsigned long section_sym_count; + unsigned int dtagcount; + + dynobj = elf_hash_table (info)->dynobj; + +- /* Assign dynsym indicies. In a shared library we generate a +- section symbol for each output section, which come first. +- Next come all of the back-end allocated local dynamic syms, +- followed by the rest of the global symbols. */ +- +- dynsymcount = _bfd_elf_link_renumber_dynsyms (output_bfd, info, +- §ion_sym_count); +- + /* Work out the size of the symbol version section. */ + s = bfd_get_linker_section (dynobj, ".gnu.version"); + BFD_ASSERT (s != NULL); +@@ -12986,7 +12991,12 @@ elf_gc_sweep (bfd *abfd, struct bfd_link_info *info) + elf_link_hash_traverse (elf_hash_table (info), elf_gc_sweep_symbol, + &sweep_info); + +- _bfd_elf_link_renumber_dynsyms (abfd, info, §ion_sym_count); ++ /* We need to reassign dynsym indices now that symbols may have ++ been removed. See the call in `bfd_elf_size_dynsym_hash_dynstr' ++ for the details of the conditions used here. */ ++ if (elf_hash_table (info)->dynamic_sections_created ++ || bed->always_renumber_dynsyms) ++ _bfd_elf_link_renumber_dynsyms (abfd, info, §ion_sym_count); + return TRUE; + } -- stub_entry->target_value = sym_value; -+ stub_entry->target_value = sym_value + irela->r_addend; - stub_entry->target_section = sym_sec; - stub_entry->stub_type = stub_type; - stub_entry->h = hash; -@@ -5280,15 +5280,28 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, - /* Check if a stub has to be inserted because the destination - is too far away. */ - struct elf_aarch64_stub_hash_entry *stub_entry = NULL; -- if (! aarch64_valid_branch_p (value, place)) +diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c +index ff25ebd..3c04507 100644 +--- a/bfd/elfnn-riscv.c ++++ b/bfd/elfnn-riscv.c +@@ -52,10 +52,6 @@ + #define ELF_MAXPAGESIZE 0x1000 + #define ELF_COMMONPAGESIZE 0x1000 + +-/* The global pointer's symbol name. */ +- +-#define GP_NAME "__global_pointer$" +- + /* The RISC-V linker needs to keep track of the number of relocs that it + decides to copy as dynamic relocs in check_relocs for each symbol. + This is so that it can later discard them if they are found to be +@@ -1467,7 +1463,7 @@ riscv_global_pointer_value (struct bfd_link_info *info) + { + struct bfd_link_hash_entry *h; + +- h = bfd_link_hash_lookup (info->hash, GP_NAME, FALSE, FALSE, TRUE); ++ h = bfd_link_hash_lookup (info->hash, RISCV_GP_SYMBOL, FALSE, FALSE, TRUE); + if (h == NULL || h->type != bfd_link_hash_defined) + return 0; + +@@ -2818,7 +2814,8 @@ _bfd_riscv_relax_lui (bfd *abfd, + /* If gp and the symbol are in the same output section, then + consider only that section's alignment. */ + struct bfd_link_hash_entry *h = +- bfd_link_hash_lookup (link_info->hash, GP_NAME, FALSE, FALSE, TRUE); ++ bfd_link_hash_lookup (link_info->hash, RISCV_GP_SYMBOL, FALSE, FALSE, ++ TRUE); + if (h->u.def.section->output_section == sym_sec->output_section) + max_alignment = (bfd_vma) 1 << sym_sec->output_section->alignment_power; + } +@@ -3205,6 +3202,19 @@ riscv_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) + return TRUE; + } + ++/* Set the right mach type. */ ++static bfd_boolean ++riscv_elf_object_p (bfd *abfd) ++{ ++ /* There are only two mach types in RISCV currently. */ ++ if (strcmp (abfd->xvec->name, "elf32-littleriscv") == 0) ++ bfd_default_set_arch_mach (abfd, bfd_arch_riscv, bfd_mach_riscv32); ++ else ++ bfd_default_set_arch_mach (abfd, bfd_arch_riscv, bfd_mach_riscv64); + -+ /* If the branch destination is directed to plt stub, "value" will be -+ the final destination, otherwise we should plus signed_addend, it may -+ contain non-zero value, for example call to local function symbol -+ which are turned into "sec_sym + sec_off", and sec_off is kept in -+ signed_addend. */ -+ if (! aarch64_valid_branch_p (via_plt_p ? value : value + signed_addend, -+ place)) - /* The target is out of reach, so redirect the branch to - the local stub for this function. */ - stub_entry = elfNN_aarch64_get_stub_entry (input_section, sym_sec, h, - rel, globals); - if (stub_entry != NULL) -- value = (stub_entry->stub_offset -- + stub_entry->stub_sec->output_offset -- + stub_entry->stub_sec->output_section->vma); -+ { -+ value = (stub_entry->stub_offset -+ + stub_entry->stub_sec->output_offset -+ + stub_entry->stub_sec->output_section->vma); ++ return TRUE; ++} + -+ /* We have redirected the destination to stub entry address, -+ so ignore any addend record in the original rela entry. */ -+ signed_addend = 0; -+ } - } - value = _bfd_aarch64_elf_resolve_relocation (bfd_r_type, place, value, - signed_addend, weak_undef_p); + + #define TARGET_LITTLE_SYM riscv_elfNN_vec + #define TARGET_LITTLE_NAME "elfNN-littleriscv" +@@ -3230,6 +3240,7 @@ riscv_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) + #define elf_backend_plt_sym_val riscv_elf_plt_sym_val + #define elf_backend_grok_prstatus riscv_elf_grok_prstatus + #define elf_backend_grok_psinfo riscv_elf_grok_psinfo ++#define elf_backend_object_p riscv_elf_object_p + #define elf_info_to_howto_rel NULL + #define elf_info_to_howto riscv_info_to_howto_rela + #define bfd_elfNN_bfd_relax_section _bfd_riscv_relax_section +diff --git a/bfd/elfxx-mips.h b/bfd/elfxx-mips.h +index fa5b5d2..274129b 100644 +--- a/bfd/elfxx-mips.h ++++ b/bfd/elfxx-mips.h +@@ -196,3 +196,4 @@ literal_reloc_p (int r_type) + #define elf_backend_post_process_headers _bfd_mips_post_process_headers + #define elf_backend_compact_eh_encoding _bfd_mips_elf_compact_eh_encoding + #define elf_backend_cant_unwind_opcode _bfd_mips_elf_cant_unwind_opcode ++#define elf_backend_always_renumber_dynsyms TRUE +diff --git a/bfd/elfxx-target.h b/bfd/elfxx-target.h +index d063fb7..d07600c 100644 +--- a/bfd/elfxx-target.h ++++ b/bfd/elfxx-target.h +@@ -126,6 +126,9 @@ + #ifndef elf_backend_extern_protected_data + #define elf_backend_extern_protected_data 0 + #endif ++#ifndef elf_backend_always_renumber_dynsyms ++#define elf_backend_always_renumber_dynsyms FALSE ++#endif + #ifndef elf_backend_stack_align + #define elf_backend_stack_align 16 + #endif +@@ -866,7 +869,8 @@ static struct elf_backend_data elfNN_bed = + elf_backend_no_page_alias, + elf_backend_default_execstack, + elf_backend_caches_rawsize, +- elf_backend_extern_protected_data ++ elf_backend_extern_protected_data, ++ elf_backend_always_renumber_dynsyms + }; + + /* Forward declaration for use when initialising alternative_target field. */ diff --git a/bfd/version.h b/bfd/version.h -index ed51cc9..d70b1dc 100644 +index eda06e4..a03012f 100644 --- a/bfd/version.h +++ b/bfd/version.h @@ -1,4 +1,4 @@ --#define BFD_VERSION_DATE 20160125 -+#define BFD_VERSION_DATE 20160321 +-#define BFD_VERSION_DATE 20170302 ++#define BFD_VERSION_DATE 20170510 #define BFD_VERSION @bfd_version@ #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@ #define REPORT_BUGS_TO @report_bugs_to@ -diff --git a/bfd/version.m4 b/bfd/version.m4 -index 9fb81c5..607d328 100644 ---- a/bfd/version.m4 -+++ b/bfd/version.m4 -@@ -1 +1 @@ --m4_define([BFD_VERSION], [2.26]) -+m4_define([BFD_VERSION], [2.26.0]) -diff --git a/binutils/ChangeLog b/binutils/ChangeLog -index 2250b30..0a8dcd8 100644 ---- a/binutils/ChangeLog -+++ b/binutils/ChangeLog -@@ -1,3 +1,34 @@ -+2016-03-14 H.J. Lu <hongjiu.lu@intel.com> -+ -+ Backport from master -+ 2016-01-28 H.J. Lu <hongjiu.lu@intel.com> -+ -+ PR binutils/19523 -+ * Makefile.am (check-DEJAGNU): Pass CC and CC_FOR_BUILD to -+ runtest. -+ * Makefile.in: Regenerated. -+ * testsuite/binutils-all/compress.exp (test_gnu_debuglink): New -+ proc. -+ Run test_gnu_debuglink for native ELF build. -+ -+2016-03-09 Nick Clifton <nickc@redhat.com> -+ -+ PR binutils/19775 -+ * testsuite/binutils-all/ar.exp (proc empty_archive): New proc. -+ Run the new proc. -+ * testsuite/binutils-all/empty: New, empty, file. -+ -+2016-02-12 H.J. Lu <hongjiu.lu@intel.com> -+ -+ Backport from master -+ 2016-02-12 H.J. Lu <hongjiu.lu@intel.com> -+ -+ * doc/binutils.texi: Fix a typo. -+ -+2016-01-25 Tristan Gingold <gingold@adacore.com> -+ -+ * configure: Regenerate. -+ - 2016-01-25 Tristan Gingold <gingold@adacore.com> - - * configure: Regenerate. -@@ -238,12 +269,12 @@ - - 2015-07-10 H.J. Lu <hongjiu.lu@intel.com> - -- PR binutils/18656 -- * objcopy.c (setup_section): Call bfd_convert_section_size -- to get the output section size. -- (copy_section): Get the section size from the output section -- and call bfd_get_full_section_contents to convert section -- contents for output. -+ PR binutils/18656 -+ * objcopy.c (setup_section): Call bfd_convert_section_size -+ to get the output section size. -+ (copy_section): Get the section size from the output section -+ and call bfd_get_full_section_contents to convert section -+ contents for output. - - 2015-07-10 H.J. Lu <hongjiu.lu@intel.com> - -diff --git a/binutils/Makefile.am b/binutils/Makefile.am -index 1735022..4f618ce 100644 ---- a/binutils/Makefile.am -+++ b/binutils/Makefile.am -@@ -192,6 +192,7 @@ check-DEJAGNU: site.exp - EXPECT=$(EXPECT); export EXPECT; \ - runtest=$(RUNTEST); \ - if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ -+ CC="$(CC)" CC_FOR_BUILD="$(CC_FOR_BUILD)" \ - CC_FOR_TARGET="$(CC_FOR_TARGET)" CFLAGS_FOR_TARGET="$(CFLAGS)" \ - $$runtest --tool $(DEJATOOL) --srcdir $${srcdir}/testsuite \ - $(RUNTESTFLAGS); \ -diff --git a/binutils/Makefile.in b/binutils/Makefile.in -index 5642925..eddd617 100644 ---- a/binutils/Makefile.in -+++ b/binutils/Makefile.in -@@ -1290,6 +1290,7 @@ check-DEJAGNU: site.exp - EXPECT=$(EXPECT); export EXPECT; \ - runtest=$(RUNTEST); \ - if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ -+ CC="$(CC)" CC_FOR_BUILD="$(CC_FOR_BUILD)" \ - CC_FOR_TARGET="$(CC_FOR_TARGET)" CFLAGS_FOR_TARGET="$(CFLAGS)" \ - $$runtest --tool $(DEJATOOL) --srcdir $${srcdir}/testsuite \ - $(RUNTESTFLAGS); \ -diff --git a/binutils/configure b/binutils/configure -index 6e1f21e..d4f3e1e 100755 ---- a/binutils/configure -+++ b/binutils/configure -@@ -1,6 +1,6 @@ - #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. --# Generated by GNU Autoconf 2.64 for binutils 2.26. -+# Generated by GNU Autoconf 2.64 for binutils 2.26.0. - # - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, - # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software -@@ -556,8 +556,8 @@ MAKEFLAGS= - # Identity of this package. - PACKAGE_NAME='binutils' - PACKAGE_TARNAME='binutils' --PACKAGE_VERSION='2.26' --PACKAGE_STRING='binutils 2.26' -+PACKAGE_VERSION='2.26.0' -+PACKAGE_STRING='binutils 2.26.0' - PACKAGE_BUGREPORT='' - PACKAGE_URL='' - -@@ -1335,7 +1335,7 @@ if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF --\`configure' configures binutils 2.26 to adapt to many kinds of systems. -+\`configure' configures binutils 2.26.0 to adapt to many kinds of systems. - - Usage: $0 [OPTION]... [VAR=VALUE]... - -@@ -1406,7 +1406,7 @@ fi - - if test -n "$ac_init_help"; then - case $ac_init_help in -- short | recursive ) echo "Configuration of binutils 2.26:";; -+ short | recursive ) echo "Configuration of binutils 2.26.0:";; - esac - cat <<\_ACEOF - -@@ -1527,7 +1527,7 @@ fi - test -n "$ac_init_help" && exit $ac_status - if $ac_init_version; then - cat <<\_ACEOF --binutils configure 2.26 -+binutils configure 2.26.0 - generated by GNU Autoconf 2.64 - - Copyright (C) 2009 Free Software Foundation, Inc. -@@ -2169,7 +2169,7 @@ cat >config.log <<_ACEOF - This file contains any messages produced by compilers while - running configure, to aid debugging if configure makes a mistake. - --It was created by binutils $as_me 2.26, which was -+It was created by binutils $as_me 2.26.0, which was - generated by GNU Autoconf 2.64. Invocation command line was - - $ $0 $@ -@@ -3977,7 +3977,7 @@ fi - - # Define the identity of the package. - PACKAGE='binutils' -- VERSION='2.26' -+ VERSION='2.26.0' - - - cat >>confdefs.h <<_ACEOF -@@ -15142,7 +15142,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - # report actual input values of CONFIG_FILES etc. instead of their - # values after options handling. - ac_log=" --This file was extended by binutils $as_me 2.26, which was -+This file was extended by binutils $as_me 2.26.0, which was - generated by GNU Autoconf 2.64. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES -@@ -15206,7 +15206,7 @@ Report bugs to the package provider." - _ACEOF - cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_cs_version="\\ --binutils config.status 2.26 -+binutils config.status 2.26.0 - configured by $0, generated by GNU Autoconf 2.64, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" - -diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi -index 7dc09c3..2e424ef 100644 ---- a/binutils/doc/binutils.texi -+++ b/binutils/doc/binutils.texi -@@ -1872,7 +1872,7 @@ ELF ABI. Note - if compression would actually make a section - @itemx --compress-debug-sections=zlib-gabi - For ELF files, these options control how DWARF debug sections are - compressed. @option{--compress-debug-sections=none} is equivalent --to @option{--nocompress-debug-sections}. -+to @option{--decompress-debug-sections}. - @option{--compress-debug-sections=zlib} and - @option{--compress-debug-sections=zlib-gabi} are equivalent to - @option{--compress-debug-sections}. -diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog -index c579c69..52ddadc 100644 ---- a/binutils/testsuite/ChangeLog -+++ b/binutils/testsuite/ChangeLog -@@ -90,7 +90,7 @@ - - * binutils-all/localize-hidden-1.d: Allow for extra symbols in the - output. -- * binutils-all/strip-11.d: Skip for the RL78. -+ * binutils-all/strip-11.d: Skip for the RL78. - - 2015-07-14 H.J. Lu <hongjiu.lu@intel.com> - -@@ -98,9 +98,9 @@ - - 2015-07-10 H.J. Lu <hongjiu.lu@intel.com> - -- PR binutils/18656 -- * binutils-all/compress.exp (convert_test): New proc. -- Run conversion tests between x86-64 and x32. -+ PR binutils/18656 -+ * binutils-all/compress.exp (convert_test): New proc. -+ Run conversion tests between x86-64 and x32. - - 2015-07-10 H.J. Lu <hongjiu.lu@intel.com> - -diff --git a/binutils/testsuite/binutils-all/ar.exp b/binutils/testsuite/binutils-all/ar.exp -index 4c33874..e971350 100644 ---- a/binutils/testsuite/binutils-all/ar.exp -+++ b/binutils/testsuite/binutils-all/ar.exp -@@ -555,6 +555,45 @@ proc move_an_element { } { - pass $testname - } - -+# PR 19775: Test creating and listing archives with an empty element. +diff --git a/gas/ChangeLog b/gas/ChangeLog +index fa9ecbe..d6ab8a1 100644 +--- a/gas/ChangeLog ++++ b/gas/ChangeLog +@@ -1,3 +1,68 @@ ++2017-04-03 Palmer Dabbelt <palmer@dabbelt.com> + -+proc empty_archive { } { -+ global AR -+ global srcdir -+ global subdir ++ * config/tc-riscv.c (riscv_clear_subsets): Cast argument to free to ++ avoid const warnings. + -+ set testname "archive with empty element" ++2017-03-30 Palmer Dabbelt <palmer@dabbelt.com> + -+ # FIXME: There ought to be a way to dynamically create an empty file. -+ set empty $srcdir/$subdir/empty -+ -+ if [is_remote host] { -+ set archive artest.a -+ set objfile [remote_download host $empty] -+ remote_file host delete $archive -+ } else { -+ set archive tmpdir/artest.a -+ set objfile $empty -+ } ++ * config/tc-riscv.c (riscv_clear_subsets): New function. ++ (riscv_add_subset): Call riscv_clear_subsets and riscv_set_rvc to ++ clear RVC when it's been previously set. + -+ remote_file build delete tmpdir/artest.a ++2017-03-21 Palmer Dabbbelt <palmer@dabbelt.com> + -+ set got [binutils_run $AR "-r -c $archive ${objfile}"] -+ if ![string match "" $got] { -+ fail $testname -+ return -+ } ++ * config/tc-riscv.c (md_show_usage): Remove defuct -m32, -m64, ++ -msoft-float, -mhard-float, -mno-rvc, and -mrvc options; and don't ++ print an invalid default ISA string. ++ * doc/c-riscv.texi (OPTIONS): Add -fpic and -fno-pic options. + -+ # This commmand used to fail with: "Malformed archive". -+ set got [binutils_run $AR "-t $archive"] -+ if ![string match "empty
" $got] { -+ fail $testname -+ return -+ } ++2017-03-14 Kito Cheng <kito.cheng@gmail.com> + -+ pass $testname -+} ++ * config/tc-riscv.c (validate_riscv_insn): Add 'o' RVC immediate ++ encoding format, which can accept 0-valued immediates. ++ (riscv_ip): Likewise. + - # Run the tests. - - # Only run the bfdtest checks if the programs exist. Since these -@@ -574,6 +613,7 @@ argument_parsing - deterministic_archive - delete_an_element - move_an_element -+empty_archive - - if { [is_elf_format] - && ![istarget "*-*-hpux*"] -diff --git a/binutils/testsuite/binutils-all/compress.exp b/binutils/testsuite/binutils-all/compress.exp -index 4dac503..ac24812 100644 ---- a/binutils/testsuite/binutils-all/compress.exp -+++ b/binutils/testsuite/binutils-all/compress.exp -@@ -667,4 +667,97 @@ if { ([istarget "x86_64-*-elf*"] - - set testname "Convert x32 object to x86-64 (3)" - convert_test "$testname" "--nocompress-debug-sections --x32" "-O elf64-x86-64 --compress-debug-sections=zlib-gnu" -- } -+} ++2017-03-02 Kuan-Lin Chen <rufus@andestech.com> + -+proc test_gnu_debuglink {} { -+ global srcdir -+ global subdir -+ global env -+ global CC_FOR_TARGET -+ global STRIP -+ global OBJCOPY -+ global OBJDUMP ++ * config/tc-riscv.h (HWARD2_USE_FIXED_ADVANCE_PC): New define. + -+ set test "gnu-debuglink" -+ if {![info exists CC_FOR_TARGET]} { -+ set CC_FOR_TARGET $env(CC) -+ } -+ if { $CC_FOR_TARGET == "" } { -+ unsupported $test -+ return -+ } ++2017-03-02 Kuan-Lin Chen <rufus@andestech.com> + -+ if { [target_compile $srcdir/$subdir/testprog.c tmpdir/testprog exectuable debug] != "" } { -+ fail "$test (build)" -+ return -+ } -+ set got [remote_exec host "$OBJDUMP -S tmpdir/testprog" "" "/dev/null" "tmpdir/testprog.dump"] -+ if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { -+ fail "$test (objcopy dump)" -+ return -+ } -+ if { [binutils_run $STRIP "--strip-debug --remove-section=.comment --remove-section=.note tmpdir/testprog -o tmpdir/testprog.strip"] != "" } { -+ fail "$test (strip)" -+ return -+ } -+ if { [binutils_run $OBJCOPY "--only-keep-debug --decompress-debug-sections tmpdir/testprog tmpdir/testprog.decompress"] != "" } { -+ fail "$test (objcopy decompress)" -+ return -+ } -+ if { [binutils_run $OBJCOPY "--only-keep-debug --compress-debug-sections tmpdir/testprog tmpdir/testprog.compress"] != "" } { -+ fail "$test (objcopy compress)" -+ return -+ } -+ if { [binutils_run $OBJCOPY "--add-gnu-debuglink=tmpdir/testprog.decompress tmpdir/testprog.strip tmpdir/testprog"] != "" } { -+ fail "$test (objcopy link decompress)" -+ return -+ } -+ set got [remote_exec host "$OBJDUMP -S tmpdir/testprog" "" "/dev/null" "tmpdir/testprog.decompress.dump"] -+ if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { -+ fail "$test (objcopy dump decompress)" -+ return -+ } -+ if { [binutils_run $OBJCOPY "--add-gnu-debuglink=tmpdir/testprog.compress tmpdir/testprog.strip tmpdir/testprog"] != "" } { -+ fail "$test (objcopy link compress)" -+ return -+ } -+ set got [remote_exec host "$OBJDUMP -S tmpdir/testprog" "" "/dev/null" "tmpdir/testprog.compress.dump"] -+ if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { -+ fail "$test (objcopy dump compress)" -+ return -+ } ++ * config/tc-riscv.c (md_apply_fix): Set fx_frag and ++ fx_next->fx_frag for CFA_advance_loc relocations. + -+ set src1 tmpdir/testprog.dump -+ set src2 tmpdir/testprog.compress.dump -+ send_log "cmp ${src1} ${src2}\n" -+ verbose "cmp ${src1} ${src2}" -+ set status [remote_exec build cmp "${src1} ${src2}"] -+ set exec_output [lindex $status 1] -+ set exec_output [prune_warnings $exec_output] -+ if ![string match "" $exec_output] then { -+ send_log "$exec_output\n" -+ verbose "$exec_output" 1 -+ fail "$test (objdump 1)" -+ } else { -+ pass "$test (objdump 1)" -+ } ++2017-03-02 Kuan-Lin Chen <rufus@andestech.com> + -+ set src1 tmpdir/testprog.decompress.dump -+ set src2 tmpdir/testprog.compress.dump -+ send_log "cmp ${src1} ${src2}\n" -+ verbose "cmp ${src1} ${src2}" -+ set status [remote_exec build cmp "${src1} ${src2}"] -+ set exec_output [lindex $status 1] -+ set exec_output [prune_warnings $exec_output] -+ if ![string match "" $exec_output] then { -+ send_log "$exec_output\n" -+ verbose "$exec_output" 1 -+ fail "$test (objdump 2)" -+ } else { -+ pass "$test (objdump 2)" -+ } -+} ++ * config/tc-riscv.c (md_apply_fix): Compute the correct offsets ++ for CFA relocations. + -+if {[isnative] && [is_elf_format]} then { -+ test_gnu_debuglink -+} -diff --git a/binutils/testsuite/binutils-all/empty b/binutils/testsuite/binutils-all/empty -new file mode 100644 -index 0000000..e69de29 -diff --git a/elfcpp/ChangeLog b/elfcpp/ChangeLog -index 0f54787..f95130a 100644 ---- a/elfcpp/ChangeLog -+++ b/elfcpp/ChangeLog -@@ -339,11 +339,11 @@ - - 2009-10-16 Doug Kwan <dougkwan@google.com> - -- * elfcpp/elfcpp.h (DT_PREINIT_ARRAY): Correct enum value. -+ * elfcpp.h (DT_PREINIT_ARRAY): Correct enum value. - - 2009-10-09 Andrew Pinski <andrew_pinski@playstation.sony.com> - -- * elfcpp/elfcpp_file.h (Elf_file::section_name): Change shstr_size -+ * elfcpp_file.h (Elf_file::section_name): Change shstr_size - to Elf_WXword. - - 2009-10-09 Mikolaj Zalewski <mikolajz@google.com> -diff --git a/gas/ChangeLog b/gas/ChangeLog -index 534a954..96a8822 100644 ---- a/gas/ChangeLog -+++ b/gas/ChangeLog -@@ -1,3 +1,70 @@ -+2016-02-20 H.J. Lu <hongjiu.lu@intel.com> -+ -+ Backport from master -+ 2016-02-20 H.J. Lu <hongjiu.lu@intel.com> -+ -+ * config/tc-i386.c (register_number): Check RegVRex. -+ * testsuite/gas/i386/x86-64-avx512f.s: Add a test for vgatherqpd -+ with %zmm19 and %zmm3. -+ * testsuite/gas/i386/x86-64-avx512f-intel.d: Updated. -+ * testsuite/gas/i386/x86-64-avx512f.d: Likewise. -+ -+2016-02-03 H.J. Lu <hongjiu.lu@intel.com> -+ -+ Backport from master -+ 2016-02-03 H.J. Lu <hongjiu.lu@intel.com> ++2017-03-27 Alan Modra <amodra@gmail.com> + -+ PR gas/19520 -+ * NEWS: Mention new command line option -mrelax-relocations and -+ new configure option --enable-x86-relax-relocations for x86 -+ target. -+ * config.in: Regenerated. -+ * configure.ac: Add --enable-x86-relax-relocations. -+ (ac_default_x86_relax_relocations): New. Default to 1 except -+ for x86 Solaris targets older than Solaris 12. -+ (DEFAULT_GENERATE_X86_RELAX_RELOCATIONS): Define. -+ * configure: Likewise. -+ * config/tc-i386.c (generate_relax_relocations): New. -+ (OPTION_MRELAX_RELOCATIONS): Likewise. -+ (output_disp): Don't generate relax relocations if -+ generate_relax_relocations is 0. -+ (md_longopts): Add -mrelax-relocations. -+ (md_show_usage): Likewise. -+ (md_parse_option): Handle OPTION_MRELAX_RELOCATIONS. -+ * doc/c-i386.texi: Document -mrelax-relocations=. -+ * testsuite/gas/i386/got-no-relax.d: New file. -+ * testsuite/gas/i386/x86-64-gotpcrel-no-relax.d: Likewise. -+ * testsuite/gas/i386/got.d: Pass -mrelax-relocations=yes to as. -+ * testsuite/gas/i386/localpic.d: Likewise. -+ * testsuite/gas/i386/mixed-mode-reloc32.d: Likewise. -+ * testsuite/gas/i386/reloc32.d: Likewise. -+ * testsuite/gas/i386/x86-64-gotpcrel.d: Likewise. -+ * testsuite/gas/i386/x86-64-localpic.d: Likewise. -+ * testsuite/gas/i386/ilp32/x86-64-gotpcrel.d: Likewise. -+ * testsuite/gas/i386/ilp32/x86-64-localpic.d: Likewise. -+ * testsuite/gas/i386/i386.exp: Run got-no-relax and -+ x86-64-gotpcrel-no-relax. ++ PR 21303 ++ * testsuite/gas/ppc/pr21303.d, ++ * testsuite/gas/ppc/pr21303.s: New test ++ * testsuite/gas/ppc/ppc.exp: Run it. + -+2016-02-03 H.J. Lu <hongjiu.lu@intel.com> ++2017-03-21 Andreas Krebbel <krebbel@linux.vnet.ibm.com> + -+ Backport from master -+ 2016-02-03 H.J. Lu <hongjiu.lu@intel.com> ++ Backport from mainline ++ 2017-03-21 Andreas Krebbel <krebbel@linux.vnet.ibm.com> + -+ * NEWS: Remove duplicated marker for 2.26. ++ * config/tc-s390.c (s390_parse_cpu): Remove S390_INSTR_FLAG_VX2 ++ from cpu_table. Remove vx2, and novx2 from cpu_flags. + -+2016-01-29 H.J. Lu <hongjiu.lu@intel.com> ++2017-03-08 Peter Bergner <bergner@vnet.ibm.com> + -+ Backport from master -+ 2016-01-29 H.J. Lu <hongjiu.lu@intel.com> ++ * testsuite/gas/ppc/altivec2.d (as): Use the -mpower8 option. ++ (objdump): Use the -Mpower8 option. + -+ PR gas/19532 -+ * configure.ac (compressed_debug_sections): Replace == with =. -+ * configure: Regenerated. ++2017-03-08 Peter Bergner <bergner@vnet.ibm.com> + -+2016-01-25 Tristan Gingold <gingold@adacore.com> -+ -+ * configure: Regenerate. ++ Apply from master. ++ 2017-03-08 Peter Bergner <bergner@vnet.ibm.com> ++ * testsuite/gas/ppc/power9.d <lnia> New test. ++ * testsuite/gas/ppc/power9.s: Likewise. + - 2016-01-25 Tristan Gingold <gingold@adacore.com> + 2017-03-02 Tristan Gingold <gingold@adacore.com> * configure: Regenerate. -@@ -8,12 +75,8 @@ - - 2015-12-17 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> - -- * gas/config/tc-arm.c (aeabi_set_public_attributes): Adjust -+ * config/tc-arm.c (aeabi_set_public_attributes): Adjust - TAG_ARCH_profile for armv8-a. -- * gas/testsuite/gas/arm/armv8a-automatic-hlt.d: New test. -- * gas/testsuite/gas/arm/armv8a-automatic-hlt.s: New test. -- * gas/testsuite/gas/arm/armv8a-automatic-lda.d: New test. -- * gas/testsuite/gas/arm/armv8a-automatic-lda.s: New test. - - 2015-12-15 Nick Clifton <nickc@redhat.com> - -@@ -320,10 +383,10 @@ - - 2015-10-07 Claudiu Zissulescu <claziss@synopsys.com> - -- * config/tc-arc.c: Revamped file for ARC support. -- * config/tc-arc.h: Likewise. -- * doc/as.texinfo: Add new ARC options. -- * doc/c-arc.texi: Likewise. -+ * config/tc-arc.c: Revamped file for ARC support. -+ * config/tc-arc.h: Likewise. -+ * doc/as.texinfo: Add new ARC options. -+ * doc/c-arc.texi: Likewise. - - 2015-10-02 Renlin Li <renlin.li@arm.com> - -@@ -572,9 +635,9 @@ - - 2015-08-17 Alan Modra <amodra@gmail.com> - -- * gas/config/tc-arm.c (s_align): Delete. -+ * config/tc-arm.c (s_align): Delete. - (md_pseudo_table): Use s_align_ptwo for "align". -- * gas/config/tc-arm.h (TC_ALIGN_ZERO_IS_DEFAULT): Define. -+ * config/tc-arm.h (TC_ALIGN_ZERO_IS_DEFAULT): Define. - * read.c (s_align): Modify for TC_ALIGN_ZERO_IS_DEFAULT. - - 2015-08-13 Alan Modra <amodra@gmail.com> -@@ -952,7 +1015,7 @@ - 2015-06-11 John David Anglin <danglin@gcc.gnu.org> - - PR gas/18427 -- * gas/config/tc-hppa.c (last_label_symbol): Declare. -+ * config/tc-hppa.c (last_label_symbol): Declare. - (pa_get_label): Return last label in current space/segment or NULL. - (pa_define_label): Record last label and add to root. - (pa_undefine_label): Remove last label from root. -@@ -1028,7 +1091,6 @@ - Bernd Schmidt <bernds@codesourcery.com> - Paul Brook <paul@codesourcery.com> - -- gas/ - * config/tc-alpha.c (all_cfi_sections): Declare. - (s_alpha_ent): Initialize all_cfi_sections. - (alpha_elf_md_end): Invoke cfi_set_sections. -@@ -1796,7 +1858,7 @@ - - 2015-01-12 Jan Beulich <jbeulich@suse.com> - -- * gas/dw2gencfi.c (cfi_add_label, dot_cfi_label): New. -+ * dw2gencfi.c (cfi_add_label, dot_cfi_label): New. - (cfi_pseudo_table): Add "cfi_label". - (output_cfi_insn): Handle CFI_label. - (select_cie_for_fde): Als terminate CIE when encountering -@@ -1809,7 +1871,7 @@ - - 2015-01-12 Jan Beulich <jbeulich@suse.com> - -- * gas/config/tc-arm.c (do_neon_shl_imm): Check immediate range. -+ * config/tc-arm.c (do_neon_shl_imm): Check immediate range. - (do_neon_qshl_imm): Likewise. - - 2015-01-12 Alan Modra <amodra@gmail.com> -diff --git a/gas/NEWS b/gas/NEWS -index 2cb2fab..e20a073 100644 ---- a/gas/NEWS -+++ b/gas/NEWS -@@ -1,5 +1,12 @@ - -*- text -*- - -+* Add a configure option --enable-x86-relax-relocations to decide whether -+ x86 assembler should generate relax relocations by default. Default to -+ yes, except for x86 Solaris targets older than Solaris 12. -+ -+* New command line option -mrelax-relocations= for x86 target to control -+ whether to generate relax relocations. -+ - Changes in 2.26: - - * Add a configure option --enable-compressed-debug-sections={all,gas} to -@@ -8,8 +15,6 @@ Changes in 2.26: - * Add support for the ARC EM/HS, and ARC600/700 architectures. Remove - assembler support for Argonaut RISC architectures. +diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c +index ec5b0bb..88457c6 100644 +--- a/gas/config/tc-riscv.c ++++ b/gas/config/tc-riscv.c +@@ -121,6 +121,18 @@ riscv_subset_supports (const char *feature) + } --Changes in 2.26: -- - * Symbol and label names can now be enclosed in double quotes (") which allows - them to contain characters that are not part of valid symbol names in high - level languages. -diff --git a/gas/config.in b/gas/config.in -index 35c8202..8b040fc 100644 ---- a/gas/config.in -+++ b/gas/config.in -@@ -39,6 +39,9 @@ - /* Define if you want compressed debug sections by default. */ - #undef DEFAULT_FLAG_COMPRESS_DEBUG - -+/* Define to 1 if you want to generate x86 relax relocations by default. */ -+#undef DEFAULT_GENERATE_X86_RELAX_RELOCATIONS -+ - /* Supported emulations. */ - #undef EMULATIONS - -diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c -index 1573043..8676c5f 100644 ---- a/gas/config/tc-i386.c -+++ b/gas/config/tc-i386.c -@@ -552,6 +552,10 @@ static int allow_index_reg = 0; - specified explicitly. */ - static int omit_lock_prefix = 0; - -+/* 1 if the assembler should generate relax relocations. */ -+static int generate_relax_relocations -+ = DEFAULT_GENERATE_X86_RELAX_RELOCATIONS; + static void ++riscv_clear_subsets (void) ++{ ++ while (riscv_subsets != NULL) ++ { ++ struct riscv_subset *next = riscv_subsets->next; ++ free ((void *) riscv_subsets->name); ++ free (riscv_subsets); ++ riscv_subsets = next; ++ } ++} + - static enum check_kind - { - check_none = 0, -@@ -1871,6 +1875,9 @@ register_number (const reg_entry *r) - if (r->reg_flags & RegRex) - nr += 8; ++static void + riscv_add_subset (const char *subset) + { + struct riscv_subset *s = xmalloc (sizeof *s); +@@ -139,6 +151,8 @@ riscv_set_arch (const char *s) + const char *extension = NULL; + const char *p = s; -+ if (r->reg_flags & RegVRex) -+ nr += 16; ++ riscv_clear_subsets(); + - return nr; - } - -@@ -7241,9 +7248,14 @@ output_disp (fragS *insn_start_frag, offsetT insn_start_off) - /* Check for "call/jmp *mem", "mov mem, %reg", - "test %reg, mem" and "binop mem, %reg" where binop - is one of adc, add, and, cmp, or, sbb, sub, xor -- instructions. */ -- if ((i.rm.mode == 2 -- || (i.rm.mode == 0 && i.rm.regmem == 5)) -+ instructions. Always generate R_386_GOT32X for -+ "sym*GOT" operand in 32-bit mode. */ -+ if ((generate_relax_relocations -+ || (!object_64bit -+ && i.rm.mode == 0 -+ && i.rm.regmem == 5)) -+ && (i.rm.mode == 2 -+ || (i.rm.mode == 0 && i.rm.regmem == 5)) - && ((i.operands == 1 - && i.tm.base_opcode == 0xff - && (i.rm.reg == 2 || i.rm.reg == 4)) -@@ -9616,6 +9628,7 @@ const char *md_shortopts = "qn"; - #define OPTION_MSHARED (OPTION_MD_BASE + 21) - #define OPTION_MAMD64 (OPTION_MD_BASE + 22) - #define OPTION_MINTEL64 (OPTION_MD_BASE + 23) -+#define OPTION_MRELAX_RELOCATIONS (OPTION_MD_BASE + 24) - - struct option md_longopts[] = + if (strncmp (p, "rv32", 4) == 0) + { + xlen = 32; +@@ -500,6 +514,7 @@ validate_riscv_insn (const struct riscv_opcode *opc) + case 'c': break; /* RS1, constrained to equal sp */ + case 'i': used_bits |= ENCODE_RVC_SIMM3(-1U); break; + case 'j': used_bits |= ENCODE_RVC_IMM (-1U); break; ++ case 'o': used_bits |= ENCODE_RVC_IMM (-1U); break; + case 'k': used_bits |= ENCODE_RVC_LW_IMM (-1U); break; + case 'l': used_bits |= ENCODE_RVC_LD_IMM (-1U); break; + case 'm': used_bits |= ENCODE_RVC_LWSP_IMM (-1U); break; +@@ -1321,6 +1336,13 @@ rvc_imm_done: + ip->insn_opcode |= + ENCODE_RVC_LDSP_IMM (imm_expr->X_add_number); + goto rvc_imm_done; ++ case 'o': ++ if (my_getSmallExpression (imm_expr, imm_reloc, s, p) ++ || imm_expr->X_op != O_constant ++ || !VALID_RVC_IMM (imm_expr->X_add_number)) ++ break; ++ ip->insn_opcode |= ENCODE_RVC_IMM (imm_expr->X_add_number); ++ goto rvc_imm_done; + case 'K': + if (my_getSmallExpression (imm_expr, imm_reloc, s, p) + || imm_expr->X_op != O_constant +@@ -1794,6 +1816,7 @@ riscv_after_parse_args (void) + riscv_set_arch (xlen == 64 ? "rv64g" : "rv32g"); + + /* Add the RVC extension, regardless of -march, to support .option rvc. */ ++ riscv_set_rvc (FALSE); + if (riscv_subset_supports ("c")) + riscv_set_rvc (TRUE); + else +@@ -1837,6 +1860,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) + unsigned int subtype; + bfd_byte *buf = (bfd_byte *) (fixP->fx_frag->fr_literal + fixP->fx_where); + bfd_boolean relaxable = FALSE; ++ offsetT loc; + + /* Remember value for tc_gen_reloc. */ + fixP->fx_addnumber = *valP; +@@ -1922,30 +1946,31 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) + + case BFD_RELOC_RISCV_CFA: + /* Load the byte to get the subtype. */ +- subtype = bfd_get_8 (NULL, &fixP->fx_frag->fr_literal[fixP->fx_where]); ++ subtype = bfd_get_8 (NULL, &((fragS *) (fixP->fx_frag->fr_opcode))->fr_literal[fixP->fx_where]); ++ loc = fixP->fx_frag->fr_fix - (subtype & 7); + switch (subtype) + { + case DW_CFA_advance_loc1: +- fixP->fx_where++; +- fixP->fx_next->fx_where++; ++ fixP->fx_where = loc + 1; ++ fixP->fx_next->fx_where = loc + 1; + fixP->fx_r_type = BFD_RELOC_RISCV_SET8; + fixP->fx_next->fx_r_type = BFD_RELOC_RISCV_SUB8; + break; + + case DW_CFA_advance_loc2: + fixP->fx_size = 2; +- fixP->fx_where++; + fixP->fx_next->fx_size = 2; +- fixP->fx_next->fx_where++; ++ fixP->fx_where = loc + 1; ++ fixP->fx_next->fx_where = loc + 1; + fixP->fx_r_type = BFD_RELOC_RISCV_SET16; + fixP->fx_next->fx_r_type = BFD_RELOC_RISCV_SUB16; + break; + + case DW_CFA_advance_loc4: + fixP->fx_size = 4; +- fixP->fx_where++; + fixP->fx_next->fx_size = 4; +- fixP->fx_next->fx_where++; ++ fixP->fx_where = loc; ++ fixP->fx_next->fx_where = loc; + fixP->fx_r_type = BFD_RELOC_RISCV_SET32; + fixP->fx_next->fx_r_type = BFD_RELOC_RISCV_SUB32; + break; +@@ -1954,6 +1979,8 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) + if (subtype < 0x80 && (subtype & 0x40)) + { + /* DW_CFA_advance_loc */ ++ fixP->fx_frag = (fragS *) fixP->fx_frag->fr_opcode; ++ fixP->fx_next->fx_frag = fixP->fx_frag; + fixP->fx_r_type = BFD_RELOC_RISCV_SET6; + fixP->fx_next->fx_r_type = BFD_RELOC_RISCV_SUB6; + } +@@ -2069,7 +2096,6 @@ riscv_pre_output_hook (void) + { + if (frag->fr_type == rs_cfa) + { +- fragS *loc4_frag; + expressionS exp; + + symbolS *add_symbol = frag->fr_symbol->sy_value.X_add_symbol; +@@ -2080,8 +2106,7 @@ riscv_pre_output_hook (void) + exp.X_add_number = 0; + exp.X_op_symbol = op_symbol; + +- loc4_frag = (fragS *) frag->fr_opcode; +- fix_new_exp (loc4_frag, (int) frag->fr_offset, 1, &exp, 0, ++ fix_new_exp (frag, (int) frag->fr_offset, 1, &exp, 0, + BFD_RELOC_RISCV_CFA); + } + } +@@ -2455,15 +2480,10 @@ md_show_usage (FILE *stream) { -@@ -9647,6 +9660,7 @@ struct option md_longopts[] = - {"mbig-obj", no_argument, NULL, OPTION_MBIG_OBJ}, - #endif - {"momit-lock-prefix", required_argument, NULL, OPTION_OMIT_LOCK_PREFIX}, -+ {"mrelax-relocations", required_argument, NULL, OPTION_MRELAX_RELOCATIONS}, - {"mevexrcig", required_argument, NULL, OPTION_MEVEXRCIG}, - {"mamd64", no_argument, NULL, OPTION_MAMD64}, - {"mintel64", no_argument, NULL, OPTION_MINTEL64}, -@@ -9966,6 +9980,15 @@ md_parse_option (int c, char *arg) - as_fatal (_("invalid -momit-lock-prefix= option: `%s'"), arg); - break; - -+ case OPTION_MRELAX_RELOCATIONS: -+ if (strcasecmp (arg, "yes") == 0) -+ generate_relax_relocations = 1; -+ else if (strcasecmp (arg, "no") == 0) -+ generate_relax_relocations = 0; -+ else -+ as_fatal (_("invalid -mrelax-relocations= option: `%s'"), arg); -+ break; -+ - case OPTION_MAMD64: - cpu_arch_flags.bitfield.cpuamd64 = 1; - cpu_arch_flags.bitfield.cpuintel64 = 0; -@@ -10146,6 +10169,9 @@ md_show_usage (FILE *stream) - -momit-lock-prefix=[no|yes]\n\ - strip all lock prefixes\n")); fprintf (stream, _("\ -+ -mrelax-relocations=[no|yes]\n\ -+ generate relax relocations\n")); -+ fprintf (stream, _("\ - -mamd64 accept only AMD64 ISA\n")); - fprintf (stream, _("\ - -mintel64 accept only Intel64 ISA\n")); -diff --git a/gas/configure b/gas/configure -index f959e95..dd9c953 100755 ---- a/gas/configure -+++ b/gas/configure -@@ -1,6 +1,6 @@ - #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. --# Generated by GNU Autoconf 2.64 for gas 2.26. -+# Generated by GNU Autoconf 2.64 for gas 2.26.0. - # - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, - # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software -@@ -556,8 +556,8 @@ MAKEFLAGS= - # Identity of this package. - PACKAGE_NAME='gas' - PACKAGE_TARNAME='gas' --PACKAGE_VERSION='2.26' --PACKAGE_STRING='gas 2.26' -+PACKAGE_VERSION='2.26.0' -+PACKAGE_STRING='gas 2.26.0' - PACKAGE_BUGREPORT='' - PACKAGE_URL='' - -@@ -765,6 +765,7 @@ enable_largefile - enable_targets - enable_checking - enable_compressed_debug_sections -+enable_x86_relax_relocations - enable_werror - enable_build_warnings - enable_nls -@@ -1323,7 +1324,7 @@ if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF --\`configure' configures gas 2.26 to adapt to many kinds of systems. -+\`configure' configures gas 2.26.0 to adapt to many kinds of systems. - - Usage: $0 [OPTION]... [VAR=VALUE]... - -@@ -1394,7 +1395,7 @@ fi - - if test -n "$ac_init_help"; then - case $ac_init_help in -- short | recursive ) echo "Configuration of gas 2.26:";; -+ short | recursive ) echo "Configuration of gas 2.26.0:";; - esac - cat <<\_ACEOF - -@@ -1415,6 +1416,8 @@ Optional Features: - --enable-checking enable run-time checks - --enable-compressed-debug-sections={all,gas,none} - compress debug sections by default] -+ --enable-x86-relax-relocations -+ generate x86 relax relocations by default - --enable-werror treat compile warnings as errors - --enable-build-warnings enable build-time compiler warnings - --disable-nls do not use Native Language Support -@@ -1510,7 +1513,7 @@ fi - test -n "$ac_init_help" && exit $ac_status - if $ac_init_version; then - cat <<\_ACEOF --gas configure 2.26 -+gas configure 2.26.0 - generated by GNU Autoconf 2.64 - - Copyright (C) 2009 Free Software Foundation, Inc. -@@ -1920,7 +1923,7 @@ cat >config.log <<_ACEOF - This file contains any messages produced by compilers while - running configure, to aid debugging if configure makes a mistake. - --It was created by gas $as_me 2.26, which was -+It was created by gas $as_me 2.26.0, which was - generated by GNU Autoconf 2.64. Invocation command line was - - $ $0 $@ -@@ -3728,7 +3731,7 @@ fi - - # Define the identity of the package. - PACKAGE='gas' -- VERSION='2.26' -+ VERSION='2.26.0' - - - cat >>confdefs.h <<_ACEOF -@@ -10972,7 +10975,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 10975 "configure" -+#line 10978 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11078,7 +11081,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 11081 "configure" -+#line 11084 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11680,6 +11683,17 @@ if test "${enable_compressed_debug_sections+set}" = set; then : - esac - fi - -+# PR gas/19520 -+# Decide if x86 assembler should generate relax relocations. -+ac_default_x86_relax_relocations=unset -+# Provide a configure time option to override our default. -+# Check whether --enable-x86_relax_relocations was given. -+if test "${enable_x86_relax_relocations+set}" = set; then : -+ enableval=$enable_x86_relax_relocations; case "${enableval}" in -+ no) ac_default_x86_relax_relocations=0 ;; -+esac -+fi -+ - using_cgen=no - - -@@ -12085,6 +12099,17 @@ $as_echo "#define STRICTCOFF 1" >>confdefs.h - - ;; - -+ i386-*-solaris2 \ -+ | x86_64-*-solaris2 \ -+ | i386-*-solaris2.[0-9] \ -+ | i386-*-solaris2.1[01] \ -+ | x86_64-*-solaris2.1[01]) -+ if test ${this_target} = $target \ -+ && test ${ac_default_x86_relax_relocations} = unset; then -+ ac_default_x86_relax_relocations=0 -+ fi -+ ;; -+ - i860-*-*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GAS support for ${generic_target} is preliminary and a work in progress" >&5 - $as_echo "$as_me: WARNING: GAS support for ${generic_target} is preliminary and a work in progress" >&2;} -@@ -12505,7 +12530,16 @@ _ACEOF - - done - --if test x$ac_default_compressed_debug_sections == xyes ; then -+if test ${ac_default_x86_relax_relocations} = unset; then -+ ac_default_x86_relax_relocations=1 -+fi -+ -+cat >>confdefs.h <<_ACEOF -+#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS $ac_default_x86_relax_relocations -+_ACEOF -+ -+ -+if test x$ac_default_compressed_debug_sections = xyes ; then - - $as_echo "#define DEFAULT_FLAG_COMPRESS_DEBUG 1" >>confdefs.h - -@@ -15029,7 +15063,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - # report actual input values of CONFIG_FILES etc. instead of their - # values after options handling. - ac_log=" --This file was extended by gas $as_me 2.26, which was -+This file was extended by gas $as_me 2.26.0, which was - generated by GNU Autoconf 2.64. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES -@@ -15093,7 +15127,7 @@ Report bugs to the package provider." - _ACEOF - cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_cs_version="\\ --gas config.status 2.26 -+gas config.status 2.26.0 - configured by $0, generated by GNU Autoconf 2.64, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" - -diff --git a/gas/configure.ac b/gas/configure.ac -index 07f825d..0e22593 100644 ---- a/gas/configure.ac -+++ b/gas/configure.ac -@@ -77,6 +77,17 @@ AC_ARG_ENABLE(compressed_debug_sections, - *) ac_default_compressed_debug_sections=unset ;; - esac])dnl - -+# PR gas/19520 -+# Decide if x86 assembler should generate relax relocations. -+ac_default_x86_relax_relocations=unset -+# Provide a configure time option to override our default. -+AC_ARG_ENABLE(x86_relax_relocations, -+ AS_HELP_STRING([--enable-x86-relax-relocations], -+ [generate x86 relax relocations by default]), -+[case "${enableval}" in -+ no) ac_default_x86_relax_relocations=0 ;; -+esac])dnl -+ - using_cgen=no - - AM_BINUTILS_WARNINGS -@@ -168,6 +179,17 @@ for this_target in $target $canon_targets ; do - AC_DEFINE(STRICTCOFF, 1, [Using strict COFF?]) - ;; - -+ i386-*-solaris2 \ -+ | x86_64-*-solaris2 \ -+ | i386-*-solaris2.[[0-9]] \ -+ | i386-*-solaris2.1[[01]] \ -+ | x86_64-*-solaris2.1[[01]]) -+ if test ${this_target} = $target \ -+ && test ${ac_default_x86_relax_relocations} = unset; then -+ ac_default_x86_relax_relocations=0 -+ fi -+ ;; -+ - i860-*-*) - AC_MSG_WARN(GAS support for ${generic_target} is preliminary and a work in progress) - ;; -@@ -549,7 +571,14 @@ changequote([,])dnl - - done - --if test x$ac_default_compressed_debug_sections == xyes ; then -+if test ${ac_default_x86_relax_relocations} = unset; then -+ ac_default_x86_relax_relocations=1 -+fi -+AC_DEFINE_UNQUOTED(DEFAULT_GENERATE_X86_RELAX_RELOCATIONS, -+ $ac_default_x86_relax_relocations, -+ [Define to 1 if you want to generate x86 relax relocations by default.]) -+ -+if test x$ac_default_compressed_debug_sections = xyes ; then - AC_DEFINE(DEFAULT_FLAG_COMPRESS_DEBUG, 1, [Define if you want compressed debug sections by default.]) - fi - -diff --git a/gas/doc/c-i386.texi b/gas/doc/c-i386.texi -index 4af05e3..7eb1fbc 100644 ---- a/gas/doc/c-i386.texi -+++ b/gas/doc/c-i386.texi -@@ -327,6 +327,18 @@ single-thread computers - @option{-momit-lock-prefix=@var{no}} will encode lock prefix as usual, - which is the default. - -+@cindex @samp{-mrelax-relocations=} option, i386 -+@cindex @samp{-mrelax-relocations=} option, x86-64 -+@item -mrelax-relocations=@var{no} -+@itemx -mrelax-relocations=@var{yes} -+These options control whether the assembler should generate relax -+relocations, R_386_GOT32X, in 32-bit mode, or R_X86_64_GOTPCRELX and -+R_X86_64_REX_GOTPCRELX, in 64-bit mode. -+@option{-mrelax-relocations=@var{yes}} will generate relax relocations. -+@option{-mrelax-relocations=@var{no}} will not generate relax -+relocations. The default can be controlled by a configure option -+@option{--enable-x86-relax-relocations}. -+ - @cindex @samp{-mevexrcig=} option, i386 - @cindex @samp{-mevexrcig=} option, x86-64 - @item -mevexrcig=@var{rne} -diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog -index 4c86c8c..2c01d7b 100644 ---- a/gas/testsuite/ChangeLog -+++ b/gas/testsuite/ChangeLog -@@ -15,6 +15,13 @@ - * gas/arm/armv8-a.d: <ldaexh>: Rename mismatched mnemonics ... - <ldah>: ... to this. - -+2015-12-17 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> -+ -+ * gas/arm/armv8a-automatic-hlt.d: New test. -+ * gas/arm/armv8a-automatic-hlt.s: New test. -+ * gas/arm/armv8a-automatic-lda.d: New test. -+ * gas/arm/armv8a-automatic-lda.s: New test. -+ - 2015-12-15 Matthew Wahab <matthew.wahab@arm.com> - - * gas/aarch64/advsimd-fp16.d: Update expected output. -@@ -153,7 +160,7 @@ - Apply from master. - 2015-11-19 Alan Modra <amodra@gmail.com> - * gas/ppc/altivec3.d: Allow for padding at end of section. -- * gas/testsuite/gas/ppc/power9.d: Likewise. -+ * gas/ppc/power9.d: Likewise. - - 2015-12-09 H.J. Lu <hongjiu.lu@intel.com> - -@@ -207,8 +214,8 @@ - - 2015-10-28 Andre Vieira <andre.simoesdiasvieira@arm.com> - -- * gas/arm/pinsn.s: New. -- * gas/arm/pinsn.d: Likewise. -+ * gas/arm/pinsn.s: New. -+ * gas/arm/pinsn.d: Likewise. - - 2015-10-27 Nick Clifton <nickc@redhat.com> - -@@ -385,8 +392,8 @@ - - 2015-10-02 Renlin Li <renlin.li@arm.com> - -- * gas/aarch64/reloc-tlsgd_g0_nc.d: New. -- * gas/aarch64/reloc-tlsgd_g0_nc.s: New. -+ * gas/aarch64/reloc-tlsgd_g0_nc.d: New. -+ * gas/aarch64/reloc-tlsgd_g0_nc.s: New. - - 2015-10-02 Renlin Li <renlin.li@arm.com> - -@@ -958,9 +965,7 @@ - 2015-05-28 Catherine Moore <clm@codesourcery.com> - Bernd Schmidt <bernds@codesourcery.com> + RISC-V options:\n\ +- -m32 assemble RV32 code\n\ +- -m64 assemble RV64 code (default)\n\ + -fpic generate position-independent code\n\ + -fno-pic don't generate position-independent code (default)\n\ +- -msoft-float don't use F registers for floating-point values\n\ +- -mhard-float use F registers for floating-point values (default)\n\ +- -mno-rvc disable the C extension for compressed instructions (default)\n\ +- -mrvc enable the C extension for compressed instructions\n\ +- -march=ISA set the RISC-V architecture, RV64IMAFD by default\n\ ++ -march=ISA set the RISC-V architecture\n\ ++ -mabi=ABI set the RISC-V ABI\n\ + ")); + } -- gas/testsuite/ - * gas/mips/mips.exp: Run new tests. -- - * gas/mips/compact-eh-1.s: New file. - * gas/mips/compact-eh-2.s: New file. - * gas/mips/compact-eh-3.s: New file. -diff --git a/gas/testsuite/gas/i386/got-no-relax.d b/gas/testsuite/gas/i386/got-no-relax.d +diff --git a/gas/config/tc-riscv.h b/gas/config/tc-riscv.h +index ae8d60e..e92b387 100644 +--- a/gas/config/tc-riscv.h ++++ b/gas/config/tc-riscv.h +@@ -112,4 +112,7 @@ extern int tc_riscv_regname_to_dw2regnum (char *); + #define elf_tc_final_processing riscv_elf_final_processing + extern void riscv_elf_final_processing (void); + ++/* Adjust debug_line after relaxation. */ ++#define DWARF2_USE_FIXED_ADVANCE_PC 1 ++ + #endif /* TC_RISCV */ +diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c +index 7c8087e..dccbe2c 100644 +--- a/gas/config/tc-s390.c ++++ b/gas/config/tc-s390.c +@@ -291,7 +291,7 @@ s390_parse_cpu (const char * arg, + { STRING_COMMA_LEN ("z13"), STRING_COMMA_LEN ("arch11"), + S390_INSTR_FLAG_HTM | S390_INSTR_FLAG_VX }, + { STRING_COMMA_LEN ("arch12"), STRING_COMMA_LEN (""), +- S390_INSTR_FLAG_HTM | S390_INSTR_FLAG_VX | S390_INSTR_FLAG_VX2 } ++ S390_INSTR_FLAG_HTM | S390_INSTR_FLAG_VX } + }; + static struct + { +@@ -303,9 +303,7 @@ s390_parse_cpu (const char * arg, + { "htm", S390_INSTR_FLAG_HTM, TRUE }, + { "nohtm", S390_INSTR_FLAG_HTM, FALSE }, + { "vx", S390_INSTR_FLAG_VX, TRUE }, +- { "novx", S390_INSTR_FLAG_VX, FALSE }, +- { "vx2", S390_INSTR_FLAG_VX2, TRUE }, +- { "novx2", S390_INSTR_FLAG_VX2, FALSE } ++ { "novx", S390_INSTR_FLAG_VX, FALSE } + }; + unsigned int icpu; + char *ilp_bak; +diff --git a/gas/doc/c-riscv.texi b/gas/doc/c-riscv.texi +index 0fa1b58..2efba4b 100644 +--- a/gas/doc/c-riscv.texi ++++ b/gas/doc/c-riscv.texi +@@ -26,6 +26,14 @@ The following table lists all availiable RISC-V specific options + @c man begin OPTIONS + @table @gcctabopt + ++@cindex @samp{-fpic} option, RISC-V ++@item -fpic ++Generate position-independent code ++ ++@cindex @samp{-fno-pic} option, RISC-V ++@item -fno-pic ++Don't generate position-independent code (default) ++ + @cindex @samp{-march=ISA} option, RISC-V + @item -march=ISA + Select the base isa, as specified by ISA. For example -march=rv32ima. +diff --git a/gas/testsuite/gas/ppc/altivec2.d b/gas/testsuite/gas/ppc/altivec2.d +index fc10fb5..26f9afa 100644 +--- a/gas/testsuite/gas/ppc/altivec2.d ++++ b/gas/testsuite/gas/ppc/altivec2.d +@@ -1,5 +1,5 @@ +-#as: -maltivec +-#objdump: -dr -Maltivec ++#as: -mpower8 ++#objdump: -dr -Mpower8 + #name: Altivec ISA 2.07 instructions + + .* +diff --git a/gas/testsuite/gas/ppc/power9.d b/gas/testsuite/gas/ppc/power9.d +index 9ba53d0..a67898f 100644 +--- a/gas/testsuite/gas/ppc/power9.d ++++ b/gas/testsuite/gas/ppc/power9.d +@@ -312,8 +312,9 @@ Disassembly of section \.text: + .*: (f1 31 9d 6f|6f 9d 31 f1) xscvdphp vs41,vs51 + .*: (f1 58 a7 6f|6f a7 58 f1) xvcvhpsp vs42,vs52 + .*: (f1 79 af 6f|6f af 79 f1) xvcvsphp vs43,vs53 +-.*: (4c 60 00 04|04 00 60 4c) addpcis r3,0 +-.*: (4c 60 00 04|04 00 60 4c) addpcis r3,0 ++.*: (4c 60 00 04|04 00 60 4c) lnia r3 ++.*: (4c 60 00 04|04 00 60 4c) lnia r3 ++.*: (4c 60 00 04|04 00 60 4c) lnia r3 + .*: (4c 80 00 05|05 00 80 4c) addpcis r4,1 + .*: (4c 80 00 05|05 00 80 4c) addpcis r4,1 + .*: (4c bf ff c4|c4 ff bf 4c) addpcis r5,-2 +diff --git a/gas/testsuite/gas/ppc/power9.s b/gas/testsuite/gas/ppc/power9.s +index 27f1122..4e3530f 100644 +--- a/gas/testsuite/gas/ppc/power9.s ++++ b/gas/testsuite/gas/ppc/power9.s +@@ -303,6 +303,7 @@ power9: + xscvdphp 41,51 + xvcvhpsp 42,52 + xvcvsphp 43,53 ++ lnia 3 + addpcis 3,0 + subpcis 3,0 + addpcis 4,1 +diff --git a/gas/testsuite/gas/ppc/ppc.exp b/gas/testsuite/gas/ppc/ppc.exp +index 86db455..55367ad 100644 +--- a/gas/testsuite/gas/ppc/ppc.exp ++++ b/gas/testsuite/gas/ppc/ppc.exp +@@ -50,6 +50,7 @@ if { [istarget powerpc*-*-*] } then { + run_dump_test "common" + run_dump_test "476" + run_dump_test "a2" ++ run_dump_test "pr21303" + if { ![istarget powerpc*le-*-*] } then { + run_dump_test "vle" + run_dump_test "vle-reloc" +diff --git a/gas/testsuite/gas/ppc/pr21303.d b/gas/testsuite/gas/ppc/pr21303.d new file mode 100644 -index 0000000..6bf138a +index 0000000..64761a4 --- /dev/null -+++ b/gas/testsuite/gas/i386/got-no-relax.d -@@ -0,0 +1,31 @@ -+#source: got.s -+#as: -mrelax-relocations=no -+#objdump: -dwr -+ -+.*: +file format .* ++++ b/gas/testsuite/gas/ppc/pr21303.d +@@ -0,0 +1,12 @@ ++#objdump: -d -Me200z4 ++#as: -a32 -mbig -me200z4 + ++.* + -+Disassembly of section .text: ++Disassembly of section \.text: + -+0+ <_start>: -+[ ]*[a-f0-9]+: b8 00 00 00 00 mov \$0x0,%eax 1: R_386_GOT32 foo -+[ ]*[a-f0-9]+: 8b 05 00 00 00 00 mov 0x0,%eax 7: R_386_GOT32X foo -+[ ]*[a-f0-9]+: 8b 80 00 00 00 00 mov 0x0\(%eax\),%eax d: R_386_GOT32 foo -+[ ]*[a-f0-9]+: 05 00 00 00 00 add \$0x0,%eax 12: R_386_GOT32 foo -+[ ]*[a-f0-9]+: 03 05 00 00 00 00 add 0x0,%eax 18: R_386_GOT32X foo -+[ ]*[a-f0-9]+: 03 80 00 00 00 00 add 0x0\(%eax\),%eax 1e: R_386_GOT32 foo -+[ ]*[a-f0-9]+: ff 15 00 00 00 00 call \*0x0 24: R_386_GOT32X foo -+[ ]*[a-f0-9]+: ff 90 00 00 00 00 call \*0x0\(%eax\) 2a: R_386_GOT32 foo -+[ ]*[a-f0-9]+: ff 25 00 00 00 00 jmp \*0x0 30: R_386_GOT32X foo -+[ ]*[a-f0-9]+: ff a0 00 00 00 00 jmp \*0x0\(%eax\) 36: R_386_GOT32 foo -+[ ]*[a-f0-9]+: b8 00 00 00 00 mov \$0x0,%eax 3b: R_386_GOT32 foo -+[ ]*[a-f0-9]+: 8b 05 00 00 00 00 mov 0x0,%eax 41: R_386_GOT32X foo -+[ ]*[a-f0-9]+: 8b 80 00 00 00 00 mov 0x0\(%eax\),%eax 47: R_386_GOT32 foo -+[ ]*[a-f0-9]+: 05 00 00 00 00 add \$0x0,%eax 4c: R_386_GOT32 foo -+[ ]*[a-f0-9]+: 03 05 00 00 00 00 add 0x0,%eax 52: R_386_GOT32X foo -+[ ]*[a-f0-9]+: 03 80 00 00 00 00 add 0x0\(%eax\),%eax 58: R_386_GOT32 foo -+[ ]*[a-f0-9]+: ff 90 00 00 00 00 call \*0x0\(%eax\) 5e: R_386_GOT32 foo -+[ ]*[a-f0-9]+: ff 15 00 00 00 00 call \*0x0 64: R_386_GOT32X foo -+[ ]*[a-f0-9]+: ff a0 00 00 00 00 jmp \*0x0\(%eax\) 6a: R_386_GOT32 foo -+[ ]*[a-f0-9]+: ff 25 00 00 00 00 jmp \*0x0 70: R_386_GOT32X foo -+#pass -diff --git a/gas/testsuite/gas/i386/got.d b/gas/testsuite/gas/i386/got.d -index f76ca47..7621cdf 100644 ---- a/gas/testsuite/gas/i386/got.d -+++ b/gas/testsuite/gas/i386/got.d -@@ -1,3 +1,4 @@ -+#as: -mrelax-relocations=yes - #objdump: -dwr - - .*: +file format .* -diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp -index d881cd8..9ad7a9e 100644 ---- a/gas/testsuite/gas/i386/i386.exp -+++ b/gas/testsuite/gas/i386/i386.exp -@@ -406,6 +406,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]] - run_dump_test "relax-4" - - run_dump_test "got" -+ run_dump_test "got-no-relax" - - if {![istarget "*-*-nacl*"]} then { - run_dump_test "iamcu-1" -@@ -784,6 +785,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t - run_list_test "x86-64-branch-3" "-al -mintel64" - - run_dump_test "x86-64-gotpcrel" -+ run_dump_test "x86-64-gotpcrel-no-relax" - } - - set ASFLAGS "$old_ASFLAGS" -diff --git a/gas/testsuite/gas/i386/ilp32/x86-64-gotpcrel.d b/gas/testsuite/gas/i386/ilp32/x86-64-gotpcrel.d -index e5a3b1c..1314e5b 100644 ---- a/gas/testsuite/gas/i386/ilp32/x86-64-gotpcrel.d -+++ b/gas/testsuite/gas/i386/ilp32/x86-64-gotpcrel.d -@@ -1,4 +1,5 @@ - #source: ../x86-64-gotpcrel.s -+#as: --x32 -mrelax-relocations=yes - #objdump: -dwr - #name: x86-64 (ILP32) gotpcrel - -diff --git a/gas/testsuite/gas/i386/ilp32/x86-64-localpic.d b/gas/testsuite/gas/i386/ilp32/x86-64-localpic.d -index 0ca69c7..a9528a2 100644 ---- a/gas/testsuite/gas/i386/ilp32/x86-64-localpic.d -+++ b/gas/testsuite/gas/i386/ilp32/x86-64-localpic.d -@@ -1,4 +1,5 @@ - #source: ../x86-64-localpic.s -+#as: --x32 -mrelax-relocations=yes - #readelf: -rsW - #name: x86-64 (ILP32) local PIC - -diff --git a/gas/testsuite/gas/i386/localpic.d b/gas/testsuite/gas/i386/localpic.d -index 04fb5ce..0a5eec5 100644 ---- a/gas/testsuite/gas/i386/localpic.d -+++ b/gas/testsuite/gas/i386/localpic.d -@@ -1,3 +1,4 @@ -+#as: -mrelax-relocations=yes - #readelf: -rs - #name: i386 local PIC - -diff --git a/gas/testsuite/gas/i386/mixed-mode-reloc32.d b/gas/testsuite/gas/i386/mixed-mode-reloc32.d -index 9affc36..a2ef6a0 100644 ---- a/gas/testsuite/gas/i386/mixed-mode-reloc32.d -+++ b/gas/testsuite/gas/i386/mixed-mode-reloc32.d -@@ -1,3 +1,4 @@ -+#as: -mrelax-relocations=yes - #objdump: -r - #source: mixed-mode-reloc.s - #name: x86 mixed mode relocs (32-bit object) -diff --git a/gas/testsuite/gas/i386/reloc32.d b/gas/testsuite/gas/i386/reloc32.d -index 45c9cd2..b6e1bbd 100644 ---- a/gas/testsuite/gas/i386/reloc32.d -+++ b/gas/testsuite/gas/i386/reloc32.d -@@ -1,3 +1,4 @@ -+#as: -mrelax-relocations=yes - #objdump: -Drw - #name: i386 relocs - -diff --git a/gas/testsuite/gas/i386/x86-64-avx512f-intel.d b/gas/testsuite/gas/i386/x86-64-avx512f-intel.d -index c6bdbc5..ff2a3d1 100644 ---- a/gas/testsuite/gas/i386/x86-64-avx512f-intel.d -+++ b/gas/testsuite/gas/i386/x86-64-avx512f-intel.d -@@ -3666,6 +3666,7 @@ Disassembly of section .text: - [ ]*[a-f0-9]+: 62 02 fd 41 93 b4 fe 7b 00 00 00 vgatherqpd zmm30\{k1\},ZMMWORD PTR \[r14\+zmm31\*8\+0x7b\] - [ ]*[a-f0-9]+: 62 02 fd 41 93 74 39 20 vgatherqpd zmm30\{k1\},ZMMWORD PTR \[r9\+zmm31\*1\+0x100\] - [ ]*[a-f0-9]+: 62 22 fd 41 93 b4 b9 00 04 00 00 vgatherqpd zmm30\{k1\},ZMMWORD PTR \[rcx\+zmm31\*4\+0x400\] -+[ ]*[a-f0-9]+: 62 d2 fd 41 93 9c de 7b 00 00 00 vgatherqpd zmm3\{k1\},ZMMWORD PTR \[r14\+zmm19\*8\+0x7b\] - [ ]*[a-f0-9]+: 62 02 7d 41 93 b4 fe 7b 00 00 00 vgatherqps ymm30\{k1\},YMMWORD PTR \[r14\+zmm31\*8\+0x7b\] - [ ]*[a-f0-9]+: 62 02 7d 41 93 b4 fe 7b 00 00 00 vgatherqps ymm30\{k1\},YMMWORD PTR \[r14\+zmm31\*8\+0x7b\] - [ ]*[a-f0-9]+: 62 02 7d 41 93 74 39 40 vgatherqps ymm30\{k1\},YMMWORD PTR \[r9\+zmm31\*1\+0x100\] -@@ -10686,6 +10687,7 @@ Disassembly of section .text: - [ ]*[a-f0-9]+: 62 02 fd 41 93 b4 fe 85 ff ff ff vgatherqpd zmm30\{k1\},ZMMWORD PTR \[r14\+zmm31\*8-0x7b\] - [ ]*[a-f0-9]+: 62 02 fd 41 93 74 39 20 vgatherqpd zmm30\{k1\},ZMMWORD PTR \[r9\+zmm31\*1\+0x100\] - [ ]*[a-f0-9]+: 62 22 fd 41 93 b4 b9 00 04 00 00 vgatherqpd zmm30\{k1\},ZMMWORD PTR \[rcx\+zmm31\*4\+0x400\] -+[ ]*[a-f0-9]+: 62 d2 fd 41 93 9c de 7b 00 00 00 vgatherqpd zmm3\{k1\},ZMMWORD PTR \[r14\+zmm19\*8\+0x7b\] - [ ]*[a-f0-9]+: 62 02 7d 41 93 b4 fe 85 ff ff ff vgatherqps ymm30\{k1\},YMMWORD PTR \[r14\+zmm31\*8-0x7b\] - [ ]*[a-f0-9]+: 62 02 7d 41 93 b4 fe 85 ff ff ff vgatherqps ymm30\{k1\},YMMWORD PTR \[r14\+zmm31\*8-0x7b\] - [ ]*[a-f0-9]+: 62 02 7d 41 93 74 39 40 vgatherqps ymm30\{k1\},YMMWORD PTR \[r9\+zmm31\*1\+0x100\] -diff --git a/gas/testsuite/gas/i386/x86-64-avx512f.d b/gas/testsuite/gas/i386/x86-64-avx512f.d -index d672fa5..2db0b3e 100644 ---- a/gas/testsuite/gas/i386/x86-64-avx512f.d -+++ b/gas/testsuite/gas/i386/x86-64-avx512f.d -@@ -3665,6 +3665,7 @@ Disassembly of section .text: - [ ]*[a-f0-9]+: 62 02 fd 41 93 b4 fe 7b 00 00 00 vgatherqpd 0x7b\(%r14,%zmm31,8\),%zmm30\{%k1\} - [ ]*[a-f0-9]+: 62 02 fd 41 93 74 39 20 vgatherqpd 0x100\(%r9,%zmm31,1\),%zmm30\{%k1\} - [ ]*[a-f0-9]+: 62 22 fd 41 93 b4 b9 00 04 00 00 vgatherqpd 0x400\(%rcx,%zmm31,4\),%zmm30\{%k1\} -+[ ]*[a-f0-9]+: 62 d2 fd 41 93 9c de 7b 00 00 00 vgatherqpd 0x7b\(%r14,%zmm19,8\),%zmm3\{%k1\} - [ ]*[a-f0-9]+: 62 02 7d 41 93 b4 fe 7b 00 00 00 vgatherqps 0x7b\(%r14,%zmm31,8\),%ymm30\{%k1\} - [ ]*[a-f0-9]+: 62 02 7d 41 93 b4 fe 7b 00 00 00 vgatherqps 0x7b\(%r14,%zmm31,8\),%ymm30\{%k1\} - [ ]*[a-f0-9]+: 62 02 7d 41 93 74 39 40 vgatherqps 0x100\(%r9,%zmm31,1\),%ymm30\{%k1\} -@@ -10685,6 +10686,7 @@ Disassembly of section .text: - [ ]*[a-f0-9]+: 62 02 fd 41 93 b4 fe 85 ff ff ff vgatherqpd -0x7b\(%r14,%zmm31,8\),%zmm30\{%k1\} - [ ]*[a-f0-9]+: 62 02 fd 41 93 74 39 20 vgatherqpd 0x100\(%r9,%zmm31,1\),%zmm30\{%k1\} - [ ]*[a-f0-9]+: 62 22 fd 41 93 b4 b9 00 04 00 00 vgatherqpd 0x400\(%rcx,%zmm31,4\),%zmm30\{%k1\} -+[ ]*[a-f0-9]+: 62 d2 fd 41 93 9c de 7b 00 00 00 vgatherqpd 0x7b\(%r14,%zmm19,8\),%zmm3\{%k1\} - [ ]*[a-f0-9]+: 62 02 7d 41 93 b4 fe 85 ff ff ff vgatherqps -0x7b\(%r14,%zmm31,8\),%ymm30\{%k1\} - [ ]*[a-f0-9]+: 62 02 7d 41 93 b4 fe 85 ff ff ff vgatherqps -0x7b\(%r14,%zmm31,8\),%ymm30\{%k1\} - [ ]*[a-f0-9]+: 62 02 7d 41 93 74 39 40 vgatherqps 0x100\(%r9,%zmm31,1\),%ymm30\{%k1\} -diff --git a/gas/testsuite/gas/i386/x86-64-avx512f.s b/gas/testsuite/gas/i386/x86-64-avx512f.s -index fa42326..e2cbb12 100644 ---- a/gas/testsuite/gas/i386/x86-64-avx512f.s -+++ b/gas/testsuite/gas/i386/x86-64-avx512f.s -@@ -3973,6 +3973,7 @@ _start: - vgatherqpd 123(%r14,%zmm31,8), %zmm30{%k1} # AVX512F - vgatherqpd 256(%r9,%zmm31), %zmm30{%k1} # AVX512F - vgatherqpd 1024(%rcx,%zmm31,4), %zmm30{%k1} # AVX512F -+ vgatherqpd 123(%r14,%zmm19,8), %zmm3{%k1} # AVX512F - - vgatherqps 123(%r14,%zmm31,8), %ymm30{%k1} # AVX512F - vgatherqps 123(%r14,%zmm31,8), %ymm30{%k1} # AVX512F -@@ -11630,6 +11631,7 @@ _start: - vgatherqpd zmm30{k1}, ZMMWORD PTR [r14+zmm31*8-123] # AVX512F - vgatherqpd zmm30{k1}, ZMMWORD PTR [r9+zmm31+256] # AVX512F - vgatherqpd zmm30{k1}, ZMMWORD PTR [rcx+zmm31*4+1024] # AVX512F -+ vgatherqpd zmm3{k1}, ZMMWORD PTR [r14+zmm19*8+123] # AVX512F - - vgatherqps ymm30{k1}, YMMWORD PTR [r14+zmm31*8-123] # AVX512F - vgatherqps ymm30{k1}, YMMWORD PTR [r14+zmm31*8-123] # AVX512F -diff --git a/gas/testsuite/gas/i386/x86-64-gotpcrel-no-relax.d b/gas/testsuite/gas/i386/x86-64-gotpcrel-no-relax.d ++0+ <\.text>: ++ 0: 70 00 00 00 e_li r0,0 ++ 4: 7c 01 14 04 lbdcbx r0,r1,r2 ++ 8: 7c 01 14 44 lhdcbx r0,r1,r2 ++ c: 7c 01 14 84 lwdcbx r0,r1,r2 +diff --git a/gas/testsuite/gas/ppc/pr21303.s b/gas/testsuite/gas/ppc/pr21303.s new file mode 100644 -index 0000000..a3f8943 +index 0000000..890ba94 --- /dev/null -+++ b/gas/testsuite/gas/i386/x86-64-gotpcrel-no-relax.d -@@ -0,0 +1,27 @@ -+#source: x86-64-gotpcrel.s -+#as: -mrelax-relocations=no -+#objdump: -dwr -+ -+.*: +file format .* -+ -+ -+Disassembly of section .text: -+ -+0+ <_start>: -+[ ]*[a-f0-9]+: 48 c7 c0 00 00 00 00 mov \$0x0,%rax 3: R_X86_64_GOTPCREL foo -+[ ]*[a-f0-9]+: 48 8b 04 25 00 00 00 00 mov 0x0,%rax b: R_X86_64_GOTPCREL foo -+[ ]*[a-f0-9]+: 48 8b 05 00 00 00 00 mov 0x0\(%rip\),%rax # 16 <_start\+0x16> 12: R_X86_64_GOTPCREL foo-0x4 -+[ ]*[a-f0-9]+: 48 8b 81 00 00 00 00 mov 0x0\(%rcx\),%rax 19: R_X86_64_GOTPCREL foo -+[ ]*[a-f0-9]+: ff 15 00 00 00 00 callq \*0x0\(%rip\) # 23 <_start\+0x23> 1f: R_X86_64_GOTPCREL foo-0x4 -+[ ]*[a-f0-9]+: ff 90 00 00 00 00 callq \*0x0\(%rax\) 25: R_X86_64_GOTPCREL foo -+[ ]*[a-f0-9]+: ff 25 00 00 00 00 jmpq \*0x0\(%rip\) # 2f <_start\+0x2f> 2b: R_X86_64_GOTPCREL foo-0x4 -+[ ]*[a-f0-9]+: ff a1 00 00 00 00 jmpq \*0x0\(%rcx\) 31: R_X86_64_GOTPCREL foo -+[ ]*[a-f0-9]+: 48 c7 c0 00 00 00 00 mov \$0x0,%rax 38: R_X86_64_GOTPCREL foo -+[ ]*[a-f0-9]+: 48 8b 04 25 00 00 00 00 mov 0x0,%rax 40: R_X86_64_GOTPCREL foo -+[ ]*[a-f0-9]+: 48 8b 05 00 00 00 00 mov 0x0\(%rip\),%rax # 4b <_start\+0x4b> 47: R_X86_64_GOTPCREL foo-0x4 -+[ ]*[a-f0-9]+: 48 8b 81 00 00 00 00 mov 0x0\(%rcx\),%rax 4e: R_X86_64_GOTPCREL foo -+[ ]*[a-f0-9]+: ff 15 00 00 00 00 callq \*0x0\(%rip\) # 58 <_start\+0x58> 54: R_X86_64_GOTPCREL foo-0x4 -+[ ]*[a-f0-9]+: ff 90 00 00 00 00 callq \*0x0\(%rax\) 5a: R_X86_64_GOTPCREL foo -+[ ]*[a-f0-9]+: ff 25 00 00 00 00 jmpq \*0x0\(%rip\) # 64 <_start\+0x64> 60: R_X86_64_GOTPCREL foo-0x4 -+[ ]*[a-f0-9]+: ff a1 00 00 00 00 jmpq \*0x0\(%rcx\) 66: R_X86_64_GOTPCREL foo -+#pass -diff --git a/gas/testsuite/gas/i386/x86-64-gotpcrel.d b/gas/testsuite/gas/i386/x86-64-gotpcrel.d -index 6ca3fc7..fbe5e47 100644 ---- a/gas/testsuite/gas/i386/x86-64-gotpcrel.d -+++ b/gas/testsuite/gas/i386/x86-64-gotpcrel.d -@@ -1,3 +1,4 @@ -+#as: -mrelax-relocations=yes - #objdump: -dwr - - .*: +file format .* -diff --git a/gas/testsuite/gas/i386/x86-64-localpic.d b/gas/testsuite/gas/i386/x86-64-localpic.d -index 0a07149..bafaa9c 100644 ---- a/gas/testsuite/gas/i386/x86-64-localpic.d -+++ b/gas/testsuite/gas/i386/x86-64-localpic.d -@@ -1,3 +1,4 @@ -+#as: -mrelax-relocations=yes - #readelf: -rsW - #name: x86-64 local PIC - -diff --git a/gold/ChangeLog b/gold/ChangeLog -index b283a88..92b26ba 100644 ---- a/gold/ChangeLog -+++ b/gold/ChangeLog -@@ -33,7 +33,7 @@ - 2015-11-11 Alan Modra <amodra@gmail.com> - Peter Bergner <bergner@vnet.ibm.com> - -- * gold/powerpc.cc (Powerpc_relocate_functions::addr16_dq): New function. -+ * powerpc.cc (Powerpc_relocate_functions::addr16_dq): New function. - (Powerpc_relocate_functions::addr16dx_ha): Likewise. - (Target_powerpc::Scan::local): Handle R_POWERPC_REL16DX_HA. - (Target_powerpc::Scan::global): Likewise. -@@ -339,7 +339,7 @@ - 2015-07-26 Doug Kwan <dougkwan@google.com> - - * testsuite/arm_unaligned_reloc.{s,sh}: Make test less sensitive to -- disassembler output format. -+ disassembler output format. - - 2015-07-23 Ian Coolidge <icoolidge@google.com> - Plumb --pic-veneer option for gold. -@@ -566,7 +566,7 @@ - 2015-06-29 Doug Kwan <dougkwan@google.com> - - * testsuite/arm_bl_out_of_range.s: Align stub table so that it appears -- at address expected by test. -+ at address expected by test. - * testsuite/arm_cortex_a8_b.s: Ditto. - * testsuite/arm_cortex_a8_b_cond.s: Ditto. - * testsuite/arm_cortex_a8_bl.s: Ditto. -@@ -940,7 +940,6 @@ - 2015-04-07 HC Yen <hc.yen@mediatek.com> - - Add AArch32 support for gold linker. -- gold/ - * arm.cc: Add V8 arch combine table. - - 2015-04-06 Rafael Ãvila de EspÃndola <rafael.espindola@gmail.com> -@@ -1455,7 +1454,6 @@ - (Output_data_plt_arm::entry_count): Modified. - (Output_data_plt_arm::address_for_global): New method. - (Output_data_plt_arm::address_for_local): New method. --gold/ - (Output_data_plt_arm::set_final_data_size): Add irelative_count_. - (Output_data_plt_arm::insert_irelative_data): New method. - (Output_data_plt_arm::irelative_rel_): New member. -@@ -2490,7 +2488,7 @@ gold/ - - Add .gdb_index version 7 support. - -- * gold/dwarf_reader.cc: include <utility> (for make_pair). -+ * dwarf_reader.cc: include <utility> (for make_pair). - (Dwarf_abbrev_table::do_read_abbrevs): Check for compressed - debug sections. - (Dwarf_ranges_table::read_ranges_table): Likewise. -@@ -2501,21 +2499,21 @@ gold/ - for end of list by offset, not by offset == 0. - (Dwarf_info_reader::do_read_string_table): Check for compressed - debug sections. -- * gold/dwarf_reader.h (Dwarf_pubnames_table::Dwarf_pubnames_table): -+ * dwarf_reader.h (Dwarf_pubnames_table::Dwarf_pubnames_table): - Initialize new data members. - (Dwarf_pubnames_table::next_name): return flag_byte. - (Dwarf_pubnames_table::end_of_table_): New data member. - (Dwarf_pubnames_table::is_gnu_style_): New data member. -- * gold/gdb-index.cc (gdb_index_version): Update to version 7. -+ * gdb-index.cc (gdb_index_version): Update to version 7. - (Gdb_index_info_reader::read_pubtable): Read flag_byte. - (Gdb_index_info_reader::read_pubnames_and_pubtypes): Don't - read skeleton type unit DIEs. - (Gdb_index::add_symbol): Add flag_byte; adjust all callers. - (Gdb_index::do_write): Write flag_byte. -- * gold/gdb-index.h (Gdb_index::add_symbol): Add flags parameter. -+ * gdb-index.h (Gdb_index::add_symbol): Add flags parameter. - (Gdb_index::Cu_vector): Store flags along with cu indexes. -- * gold/testsuite/gdb_index_test_3.sh: Allow versions 4-7. -- * gold/testsuite/gdb_index_test_comm.sh: Likewise. -+ * testsuite/gdb_index_test_3.sh: Allow versions 4-7. -+ * testsuite/gdb_index_test_comm.sh: Likewise. - - 2014-01-08 H.J. Lu <hongjiu.lu@intel.com> - -@@ -5554,15 +5552,15 @@ gold/ - - 2012-01-03 Cary Coutant <ccoutant@google.com> - -- * gold/incremental.cc (Sized_incremental_binary::do_process_got_plt): -+ * incremental.cc (Sized_incremental_binary::do_process_got_plt): - Use abstract base class for GOT. -- * gold/output.h (class Output_data_got_base): New abstract base class. -+ * output.h (class Output_data_got_base): New abstract base class. - (class Output_data_got): Derive from new base class, adjust ctors. - (Output_data_got::reserve_slot): Make virtual; rename to - do_reserve_slot; Adjust callers. -- * gold/target.h (Sized_target::init_got_plt_for_update): Return -+ * target.h (Sized_target::init_got_plt_for_update): Return - pointer to abstract base class. -- * gold/x86_64.cc (Target_x86_64::init_got_plt_for_update): Likewise. -+ * x86_64.cc (Target_x86_64::init_got_plt_for_update): Likewise. - - 2011-12-18 Ian Lance Taylor <iant@google.com> - -@@ -6073,10 +6071,10 @@ gold/ - - 2011-08-01 Cary Coutant <ccoutant@google.com> - -- * gold/testsuite/Makefile.am (justsyms_exec): New testcase. -- * gold/testsuite/Makefile.in: Regenerate. -- * gold/testsuite/justsyms_exec.c: New source file. -- * gold/testsuite/justsyms_lib.c: New source file. -+ * testsuite/Makefile.am (justsyms_exec): New testcase. -+ * testsuite/Makefile.in: Regenerate. -+ * testsuite/justsyms_exec.c: New source file. -+ * testsuite/justsyms_lib.c: New source file. - - 2011-08-01 Cary Coutant <ccoutant@google.com> - -@@ -6402,7 +6400,7 @@ gold/ - - 2011-07-06 Cary Coutant <ccoutant@google.com> - -- * gold/incremental.cc -+ * incremental.cc - (Output_section_incremental_inputs::write_info_blocks): Check for - hidden and internal symbols. - -@@ -6943,9 +6941,9 @@ gold/ - 2011-06-09 Cary Coutant <ccoutant@google.com> - - PR gold/12804 -- * gold/gold.cc (queue_initial_tasks): Warn if --incremental is -+ * gold.cc (queue_initial_tasks): Warn if --incremental is - used with --compress-debug-sections. -- * gold/object.cc (Sized_relobj_file::do_layout): Report -+ * object.cc (Sized_relobj_file::do_layout): Report - uncompressed size of compressed input sections. - - 2011-06-08 Cary Coutant <ccoutant@google.com> -@@ -7073,10 +7071,10 @@ gold/ - 2011-06-02 Cary Coutant <ccoutant@google.com> - - PR gold/12163 -- * gold/archive.cc (Archive::Archive): Initialize new data member. -+ * archive.cc (Archive::Archive): Initialize new data member. - (Archive::include_all_members): Return if archive has already been - included. -- * gold/archive.h (Archive::include_all_members_): New data member. -+ * archive.h (Archive::include_all_members_): New data member. - - 2011-06-02 Nick Clifton <nickc@redhat.com> - -@@ -7593,9 +7591,9 @@ gold/ - - 2011-04-14 Cary Coutant <ccoutant@google.com> - -- * gold/layout.cc (Layout::symtab_section_offset): New function. -- * gold/layout.h (Layout::symtab_section_offset): New function. -- * gold/reloc.cc (Sized_relobj::do_relocate): Call it. -+ * layout.cc (Layout::symtab_section_offset): New function. -+ * layout.h (Layout::symtab_section_offset): New function. -+ * reloc.cc (Sized_relobj::do_relocate): Call it. - - 2011-04-12 Ian Lance Taylor <iant@google.com> - -@@ -8706,7 +8704,7 @@ gold/ - - 2010-10-17 Doug Kwan <dougkwan@google.com> - -- * gold/arm.cc (Target_arm::got_section): Use correct order and set -+ * arm.cc (Target_arm::got_section): Use correct order and set - GOT output section to be writable. - - 2010-10-14 Cary Coutant <ccoutant@google.com> -@@ -8858,7 +8856,7 @@ gold/ - - 2010-09-30 Doug Kwan <dougkwan@google.com> - -- * gold/testsuite/arm_branch_out_of_range.sh: Fix broken tests. -+ * testsuite/arm_branch_out_of_range.sh: Fix broken tests. - - 2010-09-28 Sriraman Tallam <tmsriram@google.com> - -@@ -8902,13 +8900,13 @@ gold/ - - 2010-09-15 Doug Kwan <dougkwan@google.com> - -- * gold/testsuite/script_test_3.t: Add ARM special sections. -- * gold/testsuite/script_test_4.t: Same. -- * gold/testsuite/script_test_5.t: Same. -- * gold/testsuite/script_test_6.t: Same. -- * gold/testsuite/script_test_7.t: Same. -- * gold/testsuite/script_test_7.t: Same. -- * gold/testsuite/thumb_blx_out_of_range.s: Fix instruction alignment. -+ * testsuite/script_test_3.t: Add ARM special sections. -+ * testsuite/script_test_4.t: Same. -+ * testsuite/script_test_5.t: Same. -+ * testsuite/script_test_6.t: Same. -+ * testsuite/script_test_7.t: Same. -+ * testsuite/script_test_7.t: Same. -+ * testsuite/thumb_blx_out_of_range.s: Fix instruction alignment. - - 2010-09-14 Cary Coutant <ccoutant@google.com> - -@@ -9041,7 +9039,7 @@ gold/ - - 2010-08-27 Doug Kwan <dougkwan@google.com> - -- * gold/resolve.cc (Symbol_table::should_override): Let a weak -+ * resolve.cc (Symbol_table::should_override): Let a weak - reference override an existing dynamic weak reference. - * testsuite/Makefile.am: Add new test dyn_weak_ref. - * testsuite/Makefile.in: Regenerate. -@@ -9133,11 +9131,11 @@ gold/ - 2010-08-19 Neil Vachharajani <nvachhar@google.com> - Cary Coutant <ccoutant@google.com> - -- * gold/archive.h (Add_lib_group_symbols): Add readsyms_blocker_, adjust -+ * archive.h (Add_lib_group_symbols): Add readsyms_blocker_, adjust - constructor, and set_blocker. -- * gold/archive.cc (Add_lib_group_symbols::is_runnable): Also check -+ * archive.cc (Add_lib_group_symbols::is_runnable): Also check - readsyms_blocker_. -- * gold/readsyms.cc (Read_symbols::do_lib_group): Also pass -+ * readsyms.cc (Read_symbols::do_lib_group): Also pass - this->this_blocker_ to Add_lib_group_symbols::set_blocker. - * testsuite/Makefile.am (start_lib_test): New test case. - * testsuite/Makefile.in: Regenerate. -@@ -9740,9 +9738,9 @@ gold/ - 2010-07-27 Jeffrey Yasskin <jyasskin@google.com> - - * testsuite/debug_msg.sh: Test mixed weak/strong symbol behavior. -- * gold/testsuite/debug_msg.cc: Likewise. -- * gold/testsuite/odr_violation1.cc -- * gold/testsuite/odr_violation2.cc -+ * testsuite/debug_msg.cc: Likewise. -+ * testsuite/odr_violation1.cc -+ * testsuite/odr_violation2.cc - - 2010-07-21 Cary Coutant <ccoutant@google.com> - -@@ -10087,13 +10085,13 @@ gold/ - 2010-05-26 Rafael Espindola <espindola@google.com> - - PR 11604 -- * gold/object.cc(Sized_relobj::do_layout_deferred_sections): Avoid -+ * object.cc(Sized_relobj::do_layout_deferred_sections): Avoid - adding sections the garbage collector removed. -- * gold/testsuite/Makefile.am: Add test. -- * gold/testsuite/Makefile.in: Regenerate. -- * gold/testsuite/plugin_test_7.sh: New. -- * gold/testsuite/plugin_test_7_1.c: New. -- * gold/testsuite/plugin_test_7_2.c: New. -+ * testsuite/Makefile.am: Add test. -+ * testsuite/Makefile.in: Regenerate. -+ * testsuite/plugin_test_7.sh: New. -+ * testsuite/plugin_test_7_1.c: New. -+ * testsuite/plugin_test_7_2.c: New. - - 2010-05-26 Rafael Espindola <espindola@google.com> - -@@ -10577,7 +10575,7 @@ gold/ - - 2010-03-25 Doug Kwan <dougkwan@google.com> - -- * gold/arm.cc (Arm_exidx_fixup::update_offset_map): Rearrange code -+ * arm.cc (Arm_exidx_fixup::update_offset_map): Rearrange code - to avoid a conversion warning on a 32-bit host. - - 2010-03-24 Ian Lance Taylor <iant@google.com> -@@ -10781,7 +10779,7 @@ gold/ - - 2010-03-08 Doug Kwan <dougkwan@google.com> - -- * gold/arm.cc (Arm_exidx_fixup::update_offset_map): Fix build breakage -+ * arm.cc (Arm_exidx_fixup::update_offset_map): Fix build breakage - due to a conversion warning. - (Arm_relobj::update_output_local_symbol_count): Check for local - symbol with unset output index. -@@ -11403,7 +11401,7 @@ gold/ - - 2010-01-29 Viktor Kutuzov <vkutuzov@accesssoftek.com> - -- * gold/arm.cc: Added support for the ARM relocations: R_ARM_THM_PC8, -+ * arm.cc: Added support for the ARM relocations: R_ARM_THM_PC8, - R_ARM_THM_PC12, R_ARM_THM_ALU_PREL_11_0. - (Arm_relocate_functions::thm_alu11): New Method. - (Arm_relocate_functions::thm_pc8): New Method. -@@ -11553,12 +11551,12 @@ gold/ - - 2010-01-22 Viktor Kutuzov <vkutuzov@accesssoftek.com> - -- * gold/arm.cc (Target_arm): Updated fix_v4bx method and usage of -+ * arm.cc (Target_arm): Updated fix_v4bx method and usage of - Fix_v4bx enum values . -- * gold/options.h (General_options): New option definitions. -+ * options.h (General_options): New option definitions. - (General_options::fix_v4bx): New method. - (General_options::Fix_v4bx): New enum. -- * gold/options.cc (General_options::parse_fix_v4bx): New method. -+ * options.cc (General_options::parse_fix_v4bx): New method. - (General_options::parse_fix_v4bx_interworking): New method. - - 2010-01-22 Doug Kwan <dougkwan@google.com> -@@ -11618,7 +11616,7 @@ gold/ - - 2010-01-20 Viktor Kutuzov <vkutuzov@accesssoftek.com> - -- * gold/arm.cc: Added support for R_ARM_V4BX relocation -+ * arm.cc: Added support for R_ARM_V4BX relocation - (class Arm_v4bx_stub): New class. - (DEF_STUBS): Updated definition to support v4_veneer_bx. - (Stub_factory::make_arm_v4bx_stub): New method. -@@ -12675,7 +12673,7 @@ gold/ - attributes_section and attributes_vendor. - * i386.cc (Target_i386::i386_info): Same. - * object.cc (Sized_relobj::do_layout): Skip attribute section. -- * gold/powerpc.cc (Target_powerpc::powerpc_info): Initialize new -+ * powerpc.cc (Target_powerpc::powerpc_info): Initialize new - fields attributes_section and attributes_vendor. - * sparc.cc (Target_sparc::sparc_info): Same. - * target.h (Target::attributes_section, Target::attributes_vendor, -@@ -13322,7 +13320,7 @@ gold/ - (Segment_start_expression::value): New method definition. - (script_exp_function_segment_start): Return a new - Segment_start_expression. -- * gold/script-c.h (script_saw_segment_start_expression): New function -+ * script-c.h (script_saw_segment_start_expression): New function - prototype. - * script-sections.cc (Script_sections::Script_sections): Initialize - SAW_SEGMENT_START_EXPRESSION_ to false. -@@ -14113,9 +14111,9 @@ gold/ - (Script_sections::attach_sections_using_phdrs_clause): Do not modify - segment list. - (Script_sections::release_segments): New method definition. -- * gold/script-sections.h (Script_sections::release_segments): New -+ * script-sections.h (Script_sections::release_segments): New - method declaration. -- * gold/target.h (Target::may_relax, Target::relax, -+ * target.h (Target::may_relax, Target::relax, - Target::do_may_relax, Target::do_relax): New method definitions. - - 2009-09-17 Viktor Kutuzov <vkutuzov@accesssoftek.com> -@@ -14689,7 +14687,7 @@ gold/ - - 2009-06-03 Doug Kwan <dougkwan@google.com> - -- * gold/arm.cc (namespace utils): New. -+ * arm.cc (namespace utils): New. - (Target_arm::reloc_is_non_pic): Define new method. - (class Arm_relocate_functions): New. - (Target_arm::Relocate::relocate): Handle relocation types used by -@@ -14701,7 +14699,7 @@ gold/ - - 2009-06-02 Doug Kwan <dougkwan@google.com> - -- * gold/arm.cc (Target_arm::Scan::Scan): Initialize -+ * arm.cc (Target_arm::Scan::Scan): Initialize - issued_non_pic_error_. - (class Target_arm::Scan): Declare new method check_non_pic. - Define new method symbol_needs_plt_entry. -@@ -14722,7 +14720,7 @@ gold/ - - 2009-05-29 Doug Kwan <dougkwan@google.com> - -- * gold/arm.cc (Output_data_plt_arm): Forward declaration for new -+ * arm.cc (Output_data_plt_arm): Forward declaration for new - template class. - (class Target_arm): Update comment. - (Target_arm::Target_arm): Initialize new data members GOT_, -diff --git a/gprof/ChangeLog b/gprof/ChangeLog -index 9fa2109..cb3b0c3 100644 ---- a/gprof/ChangeLog -+++ b/gprof/ChangeLog -@@ -2,6 +2,10 @@ - - * configure: Regenerate. - -+2016-01-25 Tristan Gingold <gingold@adacore.com> -+ -+ * configure: Regenerate. -+ - 2015-11-13 Tristan Gingold <gingold@adacore.com> - - * configure: Regenerate. -diff --git a/gprof/configure b/gprof/configure -index 8ea2c70..693b927 100755 ---- a/gprof/configure -+++ b/gprof/configure -@@ -1,6 +1,6 @@ - #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. --# Generated by GNU Autoconf 2.64 for gprof 2.26. -+# Generated by GNU Autoconf 2.64 for gprof 2.26.0. - # - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, - # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software -@@ -556,8 +556,8 @@ MAKEFLAGS= - # Identity of this package. - PACKAGE_NAME='gprof' - PACKAGE_TARNAME='gprof' --PACKAGE_VERSION='2.26' --PACKAGE_STRING='gprof 2.26' -+PACKAGE_VERSION='2.26.0' -+PACKAGE_STRING='gprof 2.26.0' - PACKAGE_BUGREPORT='' - PACKAGE_URL='' - -@@ -1299,7 +1299,7 @@ if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF --\`configure' configures gprof 2.26 to adapt to many kinds of systems. -+\`configure' configures gprof 2.26.0 to adapt to many kinds of systems. - - Usage: $0 [OPTION]... [VAR=VALUE]... - -@@ -1370,7 +1370,7 @@ fi - - if test -n "$ac_init_help"; then - case $ac_init_help in -- short | recursive ) echo "Configuration of gprof 2.26:";; -+ short | recursive ) echo "Configuration of gprof 2.26.0:";; - esac - cat <<\_ACEOF - -@@ -1476,7 +1476,7 @@ fi - test -n "$ac_init_help" && exit $ac_status - if $ac_init_version; then - cat <<\_ACEOF --gprof configure 2.26 -+gprof configure 2.26.0 - generated by GNU Autoconf 2.64 - - Copyright (C) 2009 Free Software Foundation, Inc. -@@ -1841,7 +1841,7 @@ cat >config.log <<_ACEOF - This file contains any messages produced by compilers while - running configure, to aid debugging if configure makes a mistake. - --It was created by gprof $as_me 2.26, which was -+It was created by gprof $as_me 2.26.0, which was - generated by GNU Autoconf 2.64. Invocation command line was - - $ $0 $@ -@@ -3649,7 +3649,7 @@ fi - - # Define the identity of the package. - PACKAGE='gprof' -- VERSION='2.26' -+ VERSION='2.26.0' - - - cat >>confdefs.h <<_ACEOF -@@ -12706,7 +12706,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - # report actual input values of CONFIG_FILES etc. instead of their - # values after options handling. - ac_log=" --This file was extended by gprof $as_me 2.26, which was -+This file was extended by gprof $as_me 2.26.0, which was - generated by GNU Autoconf 2.64. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES -@@ -12770,7 +12770,7 @@ Report bugs to the package provider." - _ACEOF - cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_cs_version="\\ --gprof config.status 2.26 -+gprof config.status 2.26.0 - configured by $0, generated by GNU Autoconf 2.64, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" - ++++ b/gas/testsuite/gas/ppc/pr21303.s +@@ -0,0 +1,5 @@ ++ .text ++ e_li 0, 0 ++ lbdcbx 0, 1, 2 ++ lhdcbx 0, 1, 2 ++ lwdcbx 0, 1, 2 diff --git a/include/ChangeLog b/include/ChangeLog -index 01a25de..0ceba89 100644 +index af39f33..dddecfb 100644 --- a/include/ChangeLog +++ b/include/ChangeLog -@@ -30,10 +30,6 @@ - * dwarf2.def (DW_AT_GNU_numerator, DW_AT_GNU_denominator): New - attributes. - --2015-09-26 James Bowman <james.bowman@ftdichip.com> -- -- * opcode/ft32.h: Add instruction macros FT32_*() -- - 2015-09-20 Rich Felker <dalias@libc.org> - - * bfdlink.h (struct bfd_link_info): Add "nointerp" field. -@@ -55,7 +51,7 @@ - - 2015-08-18 H.J. Lu <hongjiu.lu@intel.com> - -- * include/bfdlink.h (output_type): New enum. -+ * bfdlink.h (output_type): New enum. - (bfd_link_executable): New macro. - (bfd_link_dll): Likewise. - (bfd_link_relocatable): Likewise. -@@ -71,10 +67,6 @@ - - * ansidecl.h (GCC_FINAL): New macro. - --2015-07-16 Jiong Wang <jiong.wang@arm.com> -- -- * elf/aarch64.h (R_AARCH64_P32_TLSLD_ADR_PREL21): New enumeration. -- - 2015-07-14 H.J. Lu <hongjiu.lu@intel.com> - - Sync with GCC -@@ -97,25 +89,12 @@ - PR target/65261 - * ansidecl.h (ATTRIBUTE_NO_SANITIZE_UNDEFINED): New macro. - --2015-07-09 Catherine Moore <clm@codesourcery.com> -- -- * elf/mips/mips.h (Val_GNU_MIPS_ABI_FP_NAN2008): New. -- --2015-07-08 Pitchumani Sivanupandi <pitchumani.s@atmel.com> -- -- * elf/avr.h: Add new 32 bit PC relative relocation. -- --2015-06-26 Matthew Fortune <matthew.fortune@imgtec.com> -- -- * elf/mips.h (DT_MIPS_RLD_MAP_REL): New macro. -- - 2015-06-22 Nick Clifton <nickc@redhat.com> - - * dis-asm.h (struct disassemble_info): Add stop_vma field. - - 2015-05-28 Catherine Moore <clm@codesourcery.com> - -- include/ - * bfdlink.h: Rename eh_frame_hdr to eh_frame_hdr_type. - - 2015-05-22 Yunlian Jiang <yunlian@google.com> -@@ -123,10 +102,6 @@ - * libiberty.h (asprintf): Don't declare if HAVE_DECL_ASPRINTF is - not defined. - --2015-05-12 Jiong Wang <jiong.wang@arm.com> -- -- * elf/aarch64.h (R_AARCH64_P32_LD32_GOTPAGE_LO14): New enumeration. -- - 2015-05-01 H.J. Lu <hongjiu.lu@intel.com> - - Merge with gcc: -@@ -160,11 +135,6 @@ - PR ld/pr17709 - * bfdlink.h (bfd_link_info): Add extern_protected_data. - --2015-03-10 Matthew Wahab <matthew.wahab@arm.com> -- -- PR ld/16572 -- * elf/arm.h (EF_ARM_HASENTRY): Remove. -- - 2015-02-19 Pedro Alves <palves@redhat.com> - - * floatformat.h [__cplusplus]: Wrap in extern "C". -@@ -247,31 +217,14 @@ - PR debug/63239 - * dwarf2.def (DW_AT_GNU_deleted): New attribute. - --2014-11-21 Terry Guo <terry.guo@arm.com> -- -- * opcode/arm.h (FPU_VFP_EXT_ARMV8xD): New macro. -- (FPU_VFP_V5D16): Likewise. -- (FPU_VFP_V5_SP_D16): Likewise. -- (FPU_ARCH_VFP_V5D16): Likewise. -- (FPU_ARCH_VFP_V5_SP_D16): Likewise. -- - 2014-11-18 Igor Zamyatin <igor.zamyatin@intel.com> - - * bfdlink.h (struct bfd_link_info): Add bndplt. - --2014-10-30 Andrew Pinski <apinski@cavium.com> -- -- * elf/mips.h (AFL_EXT_OCTEON3): Define. -- INSN_OCTEON3, CPU_OCTEON3): Define. -- - 2014-10-28 Yury Gribov <y.gribov@samsung.com> - - * libiberty.h (strtol, strtoul, strtoll, strtoull): New prototypes. - --2014-10-22 Matthew Fortune <matthew.fortune@imgtec.com> -- -- * elf/mips.h (AFL_ASE_MASK): Define. -- - 2014-10-15 David Malcolm <dmalcolm@redhat.com> - - * libiberty.h (choose_tmpdir): New prototype. -@@ -303,28 +256,6 @@ - - * bfdlink.h (struct bfd_link_info): Add lto_plugin_active. - --2014-07-29 Matthew Fortune <matthew.fortune@imgtec.com> -- -- * elf/mips.h (PT_MIPS_ABIFLAGS, SHT_MIPS_ABIFLAGS): Define. -- (Val_GNU_MIPS_ABI_FP_OLD_64): Rename from Val_GNU_MIPS_ABI_FP_64. -- (Val_GNU_MIPS_ABI_FP_64): Redefine. -- (Val_GNU_MIPS_ABI_FP_XX): Define. -- (Elf_External_ABIFlags_v0, Elf_Internal_ABIFlags_v0): New structures. -- (AFL_REG_NONE, AFL_REG_32, AFL_REG_64, AFL_REG_128): Define. -- (AFL_ASE_DSP, AFL_ASE_DSPR2, AFL_ASE_EVA, AFL_ASE_MCU): Likewise. -- (AFL_ASE_MDMX, AFL_ASE_MIPS3D, AFL_ASE_MT, AFL_ASE_SMARTMIPS): Likewise. -- (AFL_ASE_VIRT, AFL_ASE_MSA, AFL_ASE_MIPS16): Likewise. -- (AFL_ASE_MICROMIPS, AFL_ASE_XPA): Likewise. -- (AFL_EXT_XLR, AFL_EXT_OCTEON2, AFL_EXT_OCTEONP): Likewise. -- (AFL_EXT_LOONGSON_3A, AFL_EXT_OCTEON, AFL_EXT_5900): Likewise. -- (AFL_EXT_4650, AFL_EXT_4010, AFL_EXT_4100, AFL_EXT_3900): Likewise. -- (AFL_EXT_10000, AFL_EXT_SB1, AFL_EXT_4111, AFL_EXT_4120): Likewise. -- (AFL_EXT_5400, AFL_EXT_5500, AFL_EXT_LOONGSON_2E): Likewise. -- (AFL_EXT_LOONGSON_2F): Likewise. -- (bfd_mips_elf_swap_abiflags_v0_in): Prototype. -- (bfd_mips_elf_swap_abiflags_v0_out): Likewise. -- (bfd_mips_isa_ext): Likewise. -- - 2014-06-13 Alan Modra <amodra@gmail.com> - - * bfdlink.h (struct bfd_link_hash_table): Add hash_table_free field. -@@ -340,20 +271,12 @@ - - 2014-05-01 Steve Ellcey <sellcey@mips.com> - -- * include/longlong.h: Import latest version from GCC tree. -- --2014-04-23 Andrew Bennett <andrew.bennett@imgtec.com> -- -- * opcode/mips.h (ASE_XPA): New define. -+ * longlong.h: Import latest version from GCC tree. - - 2014-04-22 Christian Svensson <blue@cmd.nu> - - * dis-asm.h: Remove openrisc and or32 support. Add support for or1k. - --2014-04-10 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com> -- -- * elf/avr.h: Add new DIFF relocs. -- - 2014-03-05 Alan Modra <amodra@gmail.com> - - Update copyright years. -@@ -386,11 +309,6 @@ - - * longlong.h: New file. - --2013-11-11 Catherine Moore <clm@codesourcery.com> -- -- * opcode/mips.h (INSN_LOAD_MEMORY_DELAY): Rename to... -- (INSN_LOAD_MEMORY): ...this. -- - 2013-10-29 Marc Glisse <marc.glisse@inria.fr> +@@ -1,3 +1,58 @@ ++2017-04-03 Palmer Dabbelt <palmer@dabbelt.com> ++ ++ * elf/riscv.h (RISCV_GP_SYMBOL): New define. ++ ++2017-03-27 Andrew Waterman <andrew@sifive.com> ++ ++ * opcode/riscv-opc.h (CSR_PMPCFG0): New define. ++ (CSR_PMPCFG1): Likewise. ++ (CSR_PMPCFG2): Likewise. ++ (CSR_PMPCFG3): Likewise. ++ (CSR_PMPADDR0): Likewise. ++ (CSR_PMPADDR1): Likewise. ++ (CSR_PMPADDR2): Likewise. ++ (CSR_PMPADDR3): Likewise. ++ (CSR_PMPADDR4): Likewise. ++ (CSR_PMPADDR5): Likewise. ++ (CSR_PMPADDR6): Likewise. ++ (CSR_PMPADDR7): Likewise. ++ (CSR_PMPADDR8): Likewise. ++ (CSR_PMPADDR9): Likewise. ++ (CSR_PMPADDR10): Likewise. ++ (CSR_PMPADDR11): Likewise. ++ (CSR_PMPADDR12): Likewise. ++ (CSR_PMPADDR13): Likewise. ++ (CSR_PMPADDR14): Likewise. ++ (CSR_PMPADDR15): Likewise. ++ (pmpcfg0): Declare register. ++ (pmpcfg1): Likewise. ++ (pmpcfg2): Likewise. ++ (pmpcfg3): Likewise. ++ (pmpaddr0): Likewise. ++ (pmpaddr1): Likewise. ++ (pmpaddr2): Likewise. ++ (pmpaddr3): Likewise. ++ (pmpaddr4): Likewise. ++ (pmpaddr5): Likewise. ++ (pmpaddr6): Likewise. ++ (pmpaddr7): Likewise. ++ (pmpaddr8): Likewise. ++ (pmpaddr9): Likewise. ++ (pmpaddr10): Likewise. ++ (pmpaddr11): Likewise. ++ (pmpaddr12): Likewise. ++ (pmpaddr13): Likewise. ++ (pmpaddr14): Likewise. ++ (pmpaddr15): Likewise. ++ ++2017-03-21 Andreas Krebbel <krebbel@linux.vnet.ibm.com> ++ ++ Backport from mainline ++ 2017-03-21 Andreas Krebbel <krebbel@linux.vnet.ibm.com> ++ ++ * opcode/s390.h (S390_INSTR_FLAG_VX2): Remove. ++ (S390_INSTR_FLAG_FACILITY_MASK): Adjust value. ++ + 2017-02-28 Alan Modra <amodra@gmail.com> + + * elf/ppc64.h (R_PPC64_16DX_HA): New. Expand fake reloc comment. +diff --git a/include/elf/riscv.h b/include/elf/riscv.h +index 526bc11..daa4463 100644 +--- a/include/elf/riscv.h ++++ b/include/elf/riscv.h +@@ -109,4 +109,7 @@ END_RELOC_NUMBERS (R_RISCV_max) + /* File uses the quad-float ABI. */ + #define EF_RISCV_FLOAT_ABI_QUAD 0x0006 + ++/* The name of the global pointer symbol. */ ++#define RISCV_GP_SYMBOL "__global_pointer$" ++ + #endif /* _ELF_RISCV_H */ +diff --git a/include/opcode/riscv-opc.h b/include/opcode/riscv-opc.h +index 9269c6b..f80037b 100644 +--- a/include/opcode/riscv-opc.h ++++ b/include/opcode/riscv-opc.h +@@ -556,6 +556,26 @@ + #define CSR_MCAUSE 0x342 + #define CSR_MBADADDR 0x343 + #define CSR_MIP 0x344 ++#define CSR_PMPCFG0 0x3a0 ++#define CSR_PMPCFG1 0x3a1 ++#define CSR_PMPCFG2 0x3a2 ++#define CSR_PMPCFG3 0x3a3 ++#define CSR_PMPADDR0 0x3b0 ++#define CSR_PMPADDR1 0x3b1 ++#define CSR_PMPADDR2 0x3b2 ++#define CSR_PMPADDR3 0x3b3 ++#define CSR_PMPADDR4 0x3b4 ++#define CSR_PMPADDR5 0x3b5 ++#define CSR_PMPADDR6 0x3b6 ++#define CSR_PMPADDR7 0x3b7 ++#define CSR_PMPADDR8 0x3b8 ++#define CSR_PMPADDR9 0x3b9 ++#define CSR_PMPADDR10 0x3ba ++#define CSR_PMPADDR11 0x3bb ++#define CSR_PMPADDR12 0x3bc ++#define CSR_PMPADDR13 0x3bd ++#define CSR_PMPADDR14 0x3be ++#define CSR_PMPADDR15 0x3bf + #define CSR_TSELECT 0x7a0 + #define CSR_TDATA1 0x7a1 + #define CSR_TDATA2 0x7a2 +@@ -1014,6 +1034,26 @@ DECLARE_CSR(mepc, CSR_MEPC) + DECLARE_CSR(mcause, CSR_MCAUSE) + DECLARE_CSR(mbadaddr, CSR_MBADADDR) + DECLARE_CSR(mip, CSR_MIP) ++DECLARE_CSR(pmpcfg0, CSR_PMPCFG0) ++DECLARE_CSR(pmpcfg1, CSR_PMPCFG1) ++DECLARE_CSR(pmpcfg2, CSR_PMPCFG2) ++DECLARE_CSR(pmpcfg3, CSR_PMPCFG3) ++DECLARE_CSR(pmpaddr0, CSR_PMPADDR0) ++DECLARE_CSR(pmpaddr1, CSR_PMPADDR1) ++DECLARE_CSR(pmpaddr2, CSR_PMPADDR2) ++DECLARE_CSR(pmpaddr3, CSR_PMPADDR3) ++DECLARE_CSR(pmpaddr4, CSR_PMPADDR4) ++DECLARE_CSR(pmpaddr5, CSR_PMPADDR5) ++DECLARE_CSR(pmpaddr6, CSR_PMPADDR6) ++DECLARE_CSR(pmpaddr7, CSR_PMPADDR7) ++DECLARE_CSR(pmpaddr8, CSR_PMPADDR8) ++DECLARE_CSR(pmpaddr9, CSR_PMPADDR9) ++DECLARE_CSR(pmpaddr10, CSR_PMPADDR10) ++DECLARE_CSR(pmpaddr11, CSR_PMPADDR11) ++DECLARE_CSR(pmpaddr12, CSR_PMPADDR12) ++DECLARE_CSR(pmpaddr13, CSR_PMPADDR13) ++DECLARE_CSR(pmpaddr14, CSR_PMPADDR14) ++DECLARE_CSR(pmpaddr15, CSR_PMPADDR15) + DECLARE_CSR(tselect, CSR_TSELECT) + DECLARE_CSR(tdata1, CSR_TDATA1) + DECLARE_CSR(tdata2, CSR_TDATA2) +diff --git a/include/opcode/s390.h b/include/opcode/s390.h +index 7ce5616..2e07664 100644 +--- a/include/opcode/s390.h ++++ b/include/opcode/s390.h +@@ -51,8 +51,7 @@ enum s390_opcode_cpu_val + + #define S390_INSTR_FLAG_HTM 0x2 + #define S390_INSTR_FLAG_VX 0x4 +-#define S390_INSTR_FLAG_VX2 0x8 +-#define S390_INSTR_FLAG_FACILITY_MASK 0xe ++#define S390_INSTR_FLAG_FACILITY_MASK 0x6 + + /* The opcode table is an array of struct s390_opcode. */ - PR tree-optimization/58689 -@@ -401,10 +319,6 @@ - xmalloc, xrealloc, xcalloc, xstrdup, xstrndup, xmemdup, pex_init): - Mark with attribute returns_nonnull. - --2013-10-22 Sterling Augustine <saugustine@google.com> -- -- * gdb/gdb-index.h: Merge from gdb tree. -- - 2013-10-10 Sean Keys <skeys@ipdatasys.com> - - * xgate.h : Cleanup after opcode -@@ -424,31 +338,6 @@ - - * vtv-change-permission.h: New file. - --2013-08-05 Eric Botcazou <ebotcazou@adacore.com> -- Konrad Eisele <konrad@gaisler.com> -- -- * opcode/sparc.h (sparc_opcode_arch_val): Add SPARC_OPCODE_ARCH_LEON. -- --2013-06-08 Catherine Moore <clm@codesourcery.com> -- -- * opcode/mips.h (mips_opcode): Add ase field. -- (INSN_ASE_MASK): Delete. -- (INSN_DSP): Rename to ASE_DSP. Provide new value. -- (INSN_DSPR2): Rename to ASE_DSPR2. Provide new value. -- (INSN_MCU): Rename to ASE_MCU. Provide new value. -- (INSN_MDMX): Rename to ASE_MDMX. Provide new value. -- (INSN_MIPS3d): Rename to ASE_MIPS3D. Provide new value. -- (INSN_MT): Rename to ASE_MT. Provide new value. -- (INSN_SMARTMIPS): Rename to ASE_SMARTMIPS. Provide new value. -- (INSN_VIRT): Rename to ASE_VIRT. Provide new value. -- (INSN_VIRT64): Rename to ASE_VIRT64. Provide new value. -- (opcode_is_member): Add ase argument. Check ase. -- --2013-05-06 Paul Brook <paul@codesourcery.com> -- -- include/elf/ -- * mips.h (R_MIPS_PC32): Update comment. -- - 2013-04-03 Jason Merrill <jason@redhat.com> - - Demangle C++11 ref-qualifier. -@@ -456,20 +345,6 @@ - DEMANGLE_COMPONENT_REFERENCE_THIS, - DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS. - --2013-03-12 Sebastian Huber <sebastian.huber@embedded-brains.de> -- -- * opcode/nios2.h: Edit comment. -- --2013-03-11 Sebastian Huber <sebastian.huber@embedded-brains.de> -- -- * opcode/nios2.h (OPX_WRPRS): New define. -- (OP_MATCH_WRPRS): Likewise. -- --2013-03-11 Sebastian Huber <sebastian.huber@embedded-brains.de> -- -- * opcode/nios2.h (OP_RDPRS): New define. -- (OP_MATCH_RDPRS): Likewise. -- - 2013-03-01 Cary Coutant <ccoutant@google.com> - - * dwarf2.h (enum dwarf_sect): New enum type. -@@ -516,12 +391,6 @@ - * fopen-bin.h: Likewise. - * fopen-same.h: Likewise. - * fopen-vms.h: Likewise. -- * aout/hppa.h: Likewise. -- * opcode/tahoe.h: Likewise. -- --2012-12-11 Edgar E. Iglesias <edgar.iglesias@gmail.com> -- -- * elf/microblaze.h: Add TLS relocs to START_RELOC_NUMBERS - - 2012-11-09 Jason Merrill <jason@redhat.com> - -@@ -570,14 +439,6 @@ - PR other/54411 - * objalloc.h (objalloc_alloc): Do not use fast path on wraparound. - --2012-09-27 Anthony Green <green@moxielogic.com> -- -- * opcode/moxie.h (MOXIE_BAD): New define. -- --2012-09-12 Chris Schlumberger-Socha <chris.schlumberger-socha@arm.com> -- -- * elf/aarch64.h (R_AARCH64_GOT_LD_PREL19): New reloc. -- - 2012-09-06 Cary Coutant <ccoutant@google.com> - - * dwarf2.def: Edit comment. -@@ -592,30 +453,6 @@ - (tv_allow_unique_segment_for_sections): New member. - (tv_unique_segment_for_sections): New member. - --2012-08-24 Matthew Gretton-Dann <matthew.gretton-dann@arm.com> -- -- * opcode/arm.h (ARM_CPU_IS_ANY): New define. -- --2012-08-24 Matthew Gretton-Dann <matthew.gretton-dann@arm.com> -- -- * elf/arm.h (TAG_CPU_ARCH_V8): New define. -- (MAX_TAG_CPU_ARCH): Update. -- * opcode/arm.h (ARM_EXT_V8): New define. -- (FPU_VFP_EXT_ARMV8): Likewise. -- (FPU_NEON_EXT_ARMV8): Likewise. -- (FPU_CRYPTO_EXT_ARMV8): Likewise. -- (ARM_AEXT_V8A): Likewise. -- (FPU_VFP_ARMV8): Likwise. -- (FPU_NEON_ARMV8): Likewise. -- (FPU_CRYPTO_ARMV8): Likewise. -- (FPU_ARCH_VFP_ARMV8): Likewise. -- (FPU_ARCH_NEON_VFP_ARMV8): Likewise. -- (FPU_ARCH_CRYPTO_NEON_VFP_ARMV8): Likewise. -- (ARM_ARCH_V8A): Likwise. -- (ARM_ARCH_V8A_FP): Likewise. -- (ARM_ARCH_V8A_SIMD): Likewise. -- (ARM_ARCH_V8A_CRYPTO): Likewise. -- - 2012-08-13 Ian Bolton <ian.bolton@arm.com> - Laurent Desnogues <laurent.desnogues@arm.com> - Jim MacArthur <jim.macarthur@arm.com> -@@ -631,10 +468,6 @@ - (print_aarch64_disassembler_options): New declaration. - (aarch64_symbol_is_valid): New declaration. - --2012-08-02 Sean Keys <skeys@ipdatasys.com> -- -- * elf/m68hc11.h: #define E_M68HC11_NO_BANK_WARNING 0x000000200 -- - 2012-07-24 Stephan McCamant <smcc@cs.berkeley.edu> - Dr David Alan Gilbert <dave@treblig.org> - -@@ -646,15 +479,6 @@ - * filenames.h: #include "hashtab.h". - (filename_hash, filename_eq): Declare. - --2012-07-13 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> -- -- * elf/s390.h (START_RELOC_NUMBERS): Define R_390_IRELATIVE reloc. -- --2012-07-05 Sean Keys <skeys@ipdatasys.com> -- -- * opcode/xgate.h: Changed the format string for mode -- XGATE_OP_DYA_MON. -- - 2012-06-18 Doug Evans <dje@google.com> - - * dwarf2.def (DW_OP): Add DW_OP_GNU_const_index. -@@ -724,11 +548,6 @@ - (get_DW_OP_name, get_DW_ATE_name): Declare. - * dwarf2.def: New file, from dwarf2.h. - --2012-04-12 David S. Miller <davem@davemloft.net> -- -- * elf/sparc.h (R_SPARC_WDISP10): New reloc. -- * opcode/sparc.h: Define '=' as generating R_SPARC_WDISP10. -- - 2012-04-10 Tristan Gingold <gingold@adacore.com> - - * splay-tree.h: Conditionnaly includes stdint.h and inttypes.h -@@ -746,7 +565,7 @@ - - Add DWARF attribute value for the "Borland fastcall" calling - convention. -- * elf/dwarf2.h: Add DW_CC_GNU_borland_fastcall_i386 constant. -+ * dwarf2.h: Add DW_CC_GNU_borland_fastcall_i386 constant. - - 2012-01-31 H.J. Lu <hongjiu.lu@intel.com> - -@@ -1049,14 +868,6 @@ - - * libiberty.h (setproctitle): Add prototype. - --2010-09-29 Bernd Schmidt <bernds@codesourcery.com> -- -- * opcode/tic6x-control-registers.h (tscl): Now read_write. -- --2010-09-27 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> -- -- * opcode/s390.h: Add S390_OPCODE_Z196 to enum s390_opcode_cpu_val. -- - 2010-09-23 Matthew Gretton-Dann <matthew.gretton-dann@arm.com> - - * arm.h (ARM_EXT_V6Z): Remove. -@@ -1259,7 +1070,7 @@ - - 2009-10-15 Jakub Jelinek <jakub@redhat.com> - -- * include/dwarf2.h (DW_LANG_Python): Add comment that it is -+ * dwarf2.h (DW_LANG_Python): Add comment that it is - a DWARF 4 addition. - - 2009-10-14 Alan Modra <amodra@bigpond.net.au> -@@ -1348,16 +1159,6 @@ - * bfdlink.h (struct bfd_link_hash_common_entry): Move to top - level. - --2009-09-04 Jie Zhang <jie.zhang@analog.com> -- -- * opcode/bfin.h (PseudoDbg_Assert): Add bits_grp and mask_grp. -- (PseudoDbg_Assert_grp_bits, PseudoDbg_Assert_grp_mask): Define. -- (PseudoDbg_Assert_dbgop_bits, PseudoDbg_Assert_dbgop_mask, -- PseudoDbg_Assert_dontcare_bits, PseudoDbg_Assert_dontcare_mask): -- Adjust accordingly. -- (init_PseudoDbg_Assert): Add PseudoDbg_Assert_grp_bits and -- PseudoDbg_Assert_grp_mask. -- - 2009-08-06 Michael Eager <eager@eagercon.com> - - * dis-asm.h: Decl print_insn_microblaze(). -@@ -1518,10 +1319,6 @@ - * demangle.h (enum demangle_component_type): Add - DEMANGLE_COMPONENT_PACK_EXPANSION. - --2008-09-24 Richard Henderson <rth@redhat.com> -- -- * elf/dwarf2.h (DW_OP_GNU_encoded_addr): New. -- - 2008-09-22 Rafael Espindola <espindola@google.com> - - * plugin-api.h (ld_plugin_status): Remove comma from the last item. -@@ -1550,32 +1347,17 @@ - - * bfdlink.h (bfd_generic_link_read_symbols): Declare. - --2008-08-08 Anatoly Sokolov <aesok@post.ru> -- -- * elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31, -- E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define. -- (EF_AVR_MACH): Redefine to 0x7F. -- * opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove. -- (AVR_ISA_AVR3): Redefine. -- (AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35, -- AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51, -- AVR_ISA_AVR6): Define. -- - 2008-07-12 Jie Zhang <jie.zhang@analog.com> - - Revert - 2008-07-12 Jie Zhang <jie.zhang@analog.com> - * bfdlink.h (struct bfd_link_info): Add sep_code member - variable. -- * elf/bfin.h (EF_BFIN_CODE_IN_L1): Define. -- (EF_BFIN_DATA_IN_L1): Define. - - 2008-07-12 Jie Zhang <jie.zhang@analog.com> - - * bfdlink.h (struct bfd_link_info): Add sep_code member - variable. -- * elf/bfin.h (EF_BFIN_CODE_IN_L1): Define. -- (EF_BFIN_DATA_IN_L1): Define. - - 2008-07-07 Stan Shebs <stan@codesourcery.com> - -@@ -1938,10 +1720,6 @@ - - * libiberty.h (strverscmp): Prototype. - --2005-06-17 Jakub Jelinek <jakub@redhat.com> -- -- * elf/external.h (GRP_ENTRY_SIZE): Define. -- - 2005-06-08 Zack Weinberg <zack@codesourcery.com> - - * dis-asm.h (get_arm_regnames): Update prototype. -diff --git a/include/aout/ChangeLog b/include/aout/ChangeLog -index 790763b..7caa35b 100644 ---- a/include/aout/ChangeLog -+++ b/include/aout/ChangeLog -@@ -6,6 +6,10 @@ - - Update copyright years. - -+2012-12-17 Nick Clifton <nickc@redhat.com> -+ -+ * hppa.h: Add copyright notice. -+ - 2010-04-15 Nick Clifton <nickc@redhat.com> - - * adobe.h: Update copyright notice to use GPLv3. -diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog -index 3c6eddc..c10e95e 100644 ---- a/include/elf/ChangeLog -+++ b/include/elf/ChangeLog -@@ -58,6 +58,18 @@ - - * aarch64.h (R_AARCH64_P32_TLSLD_ADR_PAGE21): Define. - -+2015-07-16 Jiong Wang <jiong.wang@arm.com> -+ -+ * aarch64.h (R_AARCH64_P32_TLSLD_ADR_PREL21): New enumeration. -+ -+2015-07-09 Catherine Moore <clm@codesourcery.com> -+ -+ * mips.h (Val_GNU_MIPS_ABI_FP_NAN2008): New. -+ -+2015-07-08 Pitchumani Sivanupandi <pitchumani.s@atmel.com> -+ -+ * avr.h: Add new 32 bit PC relative relocation. -+ - 2015-07-01 Sandra Loosemore <sandra@codesourcery.com> - Cesar Philippidis <cesar@codesourcery.com> - -@@ -81,11 +93,19 @@ - - * nios2.h (EF_NIOS2_ARCH_R1, EF_NIOS2_ARCH_R2): Define. - -+2015-06-26 Matthew Fortune <matthew.fortune@imgtec.com> -+ -+ * mips.h (DT_MIPS_RLD_MAP_REL): New macro. -+ - 2015-05-29 Roland McGrath <mcgrathr@google.com> - - * common.h (GNU_ABI_TAG_SYLLABLE): New macro. - (GNU_ABI_TAG_NACL): New macro. - -+2015-05-12 Jiong Wang <jiong.wang@arm.com> -+ -+ * aarch64.h (R_AARCH64_P32_LD32_GOTPAGE_LO14): New enumeration. -+ - 2015-05-11 H.J. Lu <hongjiu.lu@intel.com> - - * common.h (EM_486): Renamed to ... -@@ -133,6 +153,11 @@ - (E_FLAG_RL78_CPU_MASK, E_FLAG_RL78_ANY_CPU, E_FLAG_RL78_G13 - E_FLAG_RL78_G14): New flags. - -+2015-03-10 Matthew Wahab <matthew.wahab@arm.com> -+ -+ PR ld/16572 -+ * arm.h (EF_ARM_HASENTRY): Remove. -+ - 2015-02-19 Marcus Shawcroft <marcus.shawcroft@arm.com> - - * aarch64.h (R_AARCH64_P32_TLSGD_ADR_PREL21): Add. -@@ -188,6 +213,15 @@ - - * x86-64.h (R_X86_64_GOTPLT64): Mark it obsolete. - -+2014-10-30 Andrew Pinski <apinski@cavium.com> -+ -+ * mips.h (AFL_EXT_OCTEON3): Define. -+ (INSN_OCTEON3, CPU_OCTEON3): Define. -+ -+2014-10-22 Matthew Fortune <matthew.fortune@imgtec.com> -+ -+ * mips.h (AFL_ASE_MASK): Define. -+ - 2014-10-17 Jose E. Marchesi <jose.marchesi@oracle.com> - - * sparc.h (ELF_SPARC_HWCAP2_VIS3B): Documentation improved. -@@ -227,6 +261,28 @@ - - * rl78.h (RL78_RELAXA_MASK): New. Relax types are enums, not bits - -+2014-07-29 Matthew Fortune <matthew.fortune@imgtec.com> -+ -+ * mips.h (PT_MIPS_ABIFLAGS, SHT_MIPS_ABIFLAGS): Define. -+ (Val_GNU_MIPS_ABI_FP_OLD_64): Rename from Val_GNU_MIPS_ABI_FP_64. -+ (Val_GNU_MIPS_ABI_FP_64): Redefine. -+ (Val_GNU_MIPS_ABI_FP_XX): Define. -+ (Elf_External_ABIFlags_v0, Elf_Internal_ABIFlags_v0): New structures. -+ (AFL_REG_NONE, AFL_REG_32, AFL_REG_64, AFL_REG_128): Define. -+ (AFL_ASE_DSP, AFL_ASE_DSPR2, AFL_ASE_EVA, AFL_ASE_MCU): Likewise. -+ (AFL_ASE_MDMX, AFL_ASE_MIPS3D, AFL_ASE_MT, AFL_ASE_SMARTMIPS): Likewise. -+ (AFL_ASE_VIRT, AFL_ASE_MSA, AFL_ASE_MIPS16): Likewise. -+ (AFL_ASE_MICROMIPS, AFL_ASE_XPA): Likewise. -+ (AFL_EXT_XLR, AFL_EXT_OCTEON2, AFL_EXT_OCTEONP): Likewise. -+ (AFL_EXT_LOONGSON_3A, AFL_EXT_OCTEON, AFL_EXT_5900): Likewise. -+ (AFL_EXT_4650, AFL_EXT_4010, AFL_EXT_4100, AFL_EXT_3900): Likewise. -+ (AFL_EXT_10000, AFL_EXT_SB1, AFL_EXT_4111, AFL_EXT_4120): Likewise. -+ (AFL_EXT_5400, AFL_EXT_5500, AFL_EXT_LOONGSON_2E): Likewise. -+ (AFL_EXT_LOONGSON_2F): Likewise. -+ (bfd_mips_elf_swap_abiflags_v0_in): Prototype. -+ (bfd_mips_elf_swap_abiflags_v0_out): Likewise. -+ (bfd_mips_isa_ext): Likewise. -+ - 2014-07-07 Barney Stratford <barney_stratford@fastmail.fm> - - * avr.h: Add R_AVR_PORT5 and R_AVR_PORT6. -@@ -252,6 +308,10 @@ - * openrisc.h: Delete. - * or32.h: Delete. - -+2014-04-10 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com> -+ -+ * avr.h: Add new DIFF relocs. -+ - 2014-03-05 Alan Modra <amodra@gmail.com> - - Update copyright years. -@@ -395,6 +455,10 @@ - (EM_INTEL208): Likewise. - (EM_INTEL209): Likewise. - -+2013-05-06 Paul Brook <paul@codesourcery.com> -+ -+ * mips.h (R_MIPS_PC32): Update comment. -+ - 2013-05-02 Nick Clifton <nickc@redhat.com> - - * msp430.h: Add MSP430X relocs. -@@ -443,6 +507,10 @@ - * mips.h: Add MIPS machine variant number for r5900 which is - compatible with old Playstation 2 software. - -+2012-12-11 Edgar E. Iglesias <edgar.iglesias@gmail.com> -+ -+ * microblaze.h: Add TLS relocs to START_RELOC_NUMBERS -+ - 2012-11-16 H.J. Lu <hongjiu.lu@intel.com> - - * common.h (DF_1_CONLFAT): Renamed to ... -@@ -477,13 +545,17 @@ - - 2012-10-30 Steve McIntyre <steve.mcintyre@linaro.org> - -- * elf/arm.h (EF_ARM_ABI_FLOAT_SOFT): New define. -+ * arm.h (EF_ARM_ABI_FLOAT_SOFT): New define. - (EF_ARM_ABI_FLOAT_HARD): Likewise. - - 2012-10-23 Tom Tromey <tromey@redhat.com> - - * common.h (NT_SIGINFO, NT_FILE): New defines. - -+2012-09-12 Chris Schlumberger-Socha <chris.schlumberger-socha@arm.com> -+ -+ * aarch64.h (R_AARCH64_GOT_LD_PREL19): New reloc. -+ - 2012-08-27 Walter Lee <walt@tilera.com> - - * tilegx.h (R_TILEGX_IMM16_X0_HW0_PLT_PCREL): New relocation. -@@ -501,6 +573,11 @@ - (R_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL ): Ditto. - (R_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL): Ditto. - -+2012-08-24 Matthew Gretton-Dann <matthew.gretton-dann@arm.com> +diff --git a/ld/ChangeLog b/ld/ChangeLog +index fd3e232..682ac6c 100644 +--- a/ld/ChangeLog ++++ b/ld/ChangeLog +@@ -1,3 +1,30 @@ ++2017-04-24 H.J. Lu <hongjiu.lu@intel.com> + -+ * arm.h (TAG_CPU_ARCH_V8): New define. -+ (MAX_TAG_CPU_ARCH): Update. ++ PR ld/20815 ++ * testsuite/ld-i386/vxworks2.sd: Add space for program headers. + - 2012-08-13 Ian Bolton <ian.bolton@arm.com> - Laurent Desnogues <laurent.desnogues@arm.com> - Jim MacArthur <jim.macarthur@arm.com> -@@ -516,6 +593,14 @@ - * common.h (EM_res183): Rename to EM_AARCH64. - (EM_res184): Rename to EM_ARM184. - -+2012-08-02 Sean Keys <skeys@ipdatasys.com> ++2017-03-28 Hans-Peter Nilsson <hp@axis.com> + -+ * m68hc11.h: #define E_M68HC11_NO_BANK_WARNING 0x000000200 ++ PR ld/16044 ++ * testsuite/ld-cris/pr16044.d, testsuite/ld-cris/dso-1c.s, ++ testsuite/ld-cris/dso-2b.s, testsuite/ld-cris/dso-4.s: New test. + -+2012-07-13 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> ++2017-04-10 H.J. Lu <hongjiu.lu@intel.com> + -+ * s390.h (START_RELOC_NUMBERS): Define R_390_IRELATIVE reloc. ++ PR ld/19579 ++ PR ld/21306 ++ * testsuite/ld-elf/pr19579a.c (main): Updated. + - 2012-06-28 Iain Sandoe <iain@codesourcery.com> - - * common.h (AT_L1I_CACHESHAPE, AT_L1D_CACHESHAPE, -@@ -565,7 +650,7 @@ - 2012-05-11 Georg-Johann Lay <avr@gjlay.de - - PR target/13503 -- * elf/avr.h (RELOC_NUMBERS): Add values for R_AVR_8_LO8, -+ * avr.h (RELOC_NUMBERS): Add values for R_AVR_8_LO8, - R_AVR_8_HI8, R_AVR_8_HHI8. - - 2012-05-03 Sean Keys <skeys@ipdatasys.com> -@@ -577,6 +662,10 @@ - * sparc.h: Add new ELF_SPARC_HWCAP_* defines for crypto, - pause, and compare-and-branch instructions. - -+2012-04-12 David S. Miller <davem@davemloft.net> ++2017-04-05 Maciej W. Rozycki <macro@imgtec.com> + -+ * sparc.h (R_SPARC_WDISP10): New reloc. ++ PR ld/21233 ++ * ldlang.c (insert_undefined): Set `mark' for ELF symbols. + - 2012-03-07 Nick Clifton <nickc@redhat.com> - - * mn10300.h (elf_mn10300_reloc_type): Add R_MN10300_TLS_GD, -@@ -1096,13 +1185,13 @@ - - 2009-08-09 Michael Eager <eager@eagercon.com> - -- * elf/common.h: Define EM_resnnn reserved values. Add EM_AVR32, -+ * common.h: Define EM_resnnn reserved values. Add EM_AVR32, - EM_STM8, EM_TILE64, EM_TILEPRO. Change EM_MICROBLAZE. - - 2009-08-06 Michael Eager <eager@eagercon.com> - -- * elf/common.h: Define EM_MICROBLAZE & EM_MICROBLAZE_OLD. -- * elf/microblaze.h: New reloc definitions. -+ * common.h: Define EM_MICROBLAZE & EM_MICROBLAZE_OLD. -+ * microblaze.h: New reloc definitions. - - 2009-07-30 Alan Modra <amodra@bigpond.net.au> - -@@ -1171,7 +1260,7 @@ - - 2009-04-24 Cary Coutant <ccoutant@google.com> - -- * dwarf2.h (DW_LNE_set_discriminator): New enum value. -+ * dwarf2.h (DW_LNE_set_discriminator): New enum value. - - 2009-04-15 Anthony Green <green@moxielogic.com> - -@@ -1303,12 +1392,22 @@ - (R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL, R_CRIS_32_TPREL) - (R_CRIS_16_TPREL): New relocations. - -+2008-09-24 Richard Henderson <rth@redhat.com> ++2017-03-07 Alan Modra <amodra@gmail.com> + -+ * dwarf2.h (DW_OP_GNU_encoded_addr): New. ++ * ldlang.c (open_input_bfds): Check that lang_assignment_statement ++ is not an assert before referencing defsym. + - 2008-08-20 Bob Wilson <bob.wilson@acm.org> + 2017-03-02 Tristan Gingold <gingold@adacore.com> - * xtensa.h (R_XTENSA_TLSDESC_FN, R_XTENSA_TLSDESC_ARG) - (R_XTENSA_TLS_DTPOFF, R_XTENSA_TLS_TPOFF, R_XTENSA_TLS_FUNC) - (R_XTENSA_TLS_ARG, R_XTENSA_TLS_CALL): New. + * configure: Regenerate. +diff --git a/ld/ldlang.c b/ld/ldlang.c +index dafc348..a8ff0a4 100644 +--- a/ld/ldlang.c ++++ b/ld/ldlang.c +@@ -3377,7 +3377,8 @@ open_input_bfds (lang_statement_union_type *s, enum open_bfd_mode mode) + #endif + break; + case lang_assignment_statement_enum: +- if (s->assignment_statement.exp->assign.defsym) ++ if (s->assignment_statement.exp->type.node_class != etree_assert ++ && s->assignment_statement.exp->assign.defsym) + /* This is from a --defsym on the command line. */ + exp_fold_tree_no_dot (s->assignment_statement.exp); + break; +@@ -3431,6 +3432,8 @@ insert_undefined (const char *name) + { + h->type = bfd_link_hash_undefined; + h->u.undef.abfd = NULL; ++ if (is_elf_hash_table (link_info.hash)) ++ ((struct elf_link_hash_entry *) h)->mark = 1; + bfd_link_add_undef (link_info.hash, h); + } + } +diff --git a/ld/testsuite/ld-cris/dso-1c.s b/ld/testsuite/ld-cris/dso-1c.s +new file mode 100644 +index 0000000..92ad4ee +--- /dev/null ++++ b/ld/testsuite/ld-cris/dso-1c.s +@@ -0,0 +1,2 @@ ++ .include "dso-1.s" ++ .hidden dsofn +diff --git a/ld/testsuite/ld-cris/dso-2b.s b/ld/testsuite/ld-cris/dso-2b.s +new file mode 100644 +index 0000000..f1fbf14 +--- /dev/null ++++ b/ld/testsuite/ld-cris/dso-2b.s +@@ -0,0 +1,2 @@ ++ .include "dso-2.s" ++ .hidden dsofn +diff --git a/ld/testsuite/ld-cris/dso-4.s b/ld/testsuite/ld-cris/dso-4.s +new file mode 100644 +index 0000000..767a0d8 +--- /dev/null ++++ b/ld/testsuite/ld-cris/dso-4.s +@@ -0,0 +1,6 @@ ++ .text ++ .global export_2 ++ .type export_2,@function ++export_2: ++ .hidden dsofn ++ move.d dsofn:GOTOFF,$r4 +diff --git a/ld/testsuite/ld-cris/pr16044.d b/ld/testsuite/ld-cris/pr16044.d +new file mode 100644 +index 0000000..e5d373d +--- /dev/null ++++ b/ld/testsuite/ld-cris/pr16044.d +@@ -0,0 +1,43 @@ ++#source: dso-4.s ++#source: dso-2b.s ++#source: dso-1c.s ++#as: --pic --no-underscore --em=criself -I$srcdir/$subdir ++#ld: --shared -m crislinux ++#readelf: -s -r ++ ++# PR 16044 is about a (compile-time-non-local) hidden function symbol, ++# entered as an undef reference with a R_CRIS_32_PLT_GOTREL relocation ++# referring to a hidden symbol, later defined. Here, we invalidly ++# incremented the h->plt.refcount (from -1) as part of that relocation ++# processing. There are some PLTGOT relocations. As there are no ++# circumstances requiring a PLT entry for this symbol, its PLT entry ++# can be eliminated and the PLTGOT relocations can be made to a static ++# element in the GOT, relocated with the absolute-to-relative ++# R_CRIS_RELATIVE relocation without symbol lookup. As part of ++# eliminating unneeded PLT entries (and PLTGOT to "static" GOT ++# elimination), a later pass noticed the inconsistency through an ++# assert. ++# ++# The key points in this dump that may need future adjustments are the ++# single dynamic relocation, that the dsofn symbol it points to, is ++# local, its absence from the dynamic symbol table and that the ++# relocation and symbol values match. ++ ++Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 1 entries: ++ Offset[ ]+Info[ ]+Type[ ]+Sym\.Value Sym\. Name \+ Addend ++[0-9a-f]+ 0+[0-9a-f]+ R_CRIS_RELATIVE[ ]+184 ++ ++Symbol table '\.dynsym' contains 7 entries: ++ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name ++ +0: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND ++ +1: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +5 ++ +2: [0-9a-f]+ +0 +FUNC +GLOBAL +DEFAULT +5 export_1 ++ +3: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +7 __bss_start ++ +4: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +7 _edata ++ +5: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +7 _end ++ +6: [0-9a-f]+ +0 +FUNC +GLOBAL +DEFAULT +5 export_2 ++ ++Symbol table '\.symtab' contains [0-9]+ entries: ++#... ++ +[0-9]+: 0+184 +2 FUNC + LOCAL + DEFAULT + 5 dsofn ++#... +diff --git a/ld/testsuite/ld-elf/pr19579a.c b/ld/testsuite/ld-elf/pr19579a.c +index e4a6eb1..69d0f35 100644 +--- a/ld/testsuite/ld-elf/pr19579a.c ++++ b/ld/testsuite/ld-elf/pr19579a.c +@@ -9,7 +9,7 @@ extern int *bar_p (void); + int + main () + { +- if (foo[0] == 0 && foo == foo_p () && bar[0] == 0 && bar == bar_p ()) ++ if (foo[0] == 0 && foo == foo_p () && bar[0] == -1 && bar == bar_p ()) + printf ("PASS\n"); + return 0; + } +diff --git a/ld/testsuite/ld-i386/vxworks2.sd b/ld/testsuite/ld-i386/vxworks2.sd +index 5ff87d3..4f56f2a 100644 +--- a/ld/testsuite/ld-i386/vxworks2.sd ++++ b/ld/testsuite/ld-i386/vxworks2.sd +@@ -6,7 +6,7 @@ Program Headers: + Type .* + PHDR .* + #... +- LOAD .* 0x00080000 0x00080000 .* R E 0x1000 ++ LOAD .* 0x0007f000 0x0007f000 .* R E 0x1000 + LOAD .* 0x00081000 0x00081000 .* RW 0x1000 + DYNAMIC .* -+2008-08-08 Anatoly Sokolov <aesok@post.ru> +diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog +index 1ea126a..5dfe166 100644 +--- a/opcodes/ChangeLog ++++ b/opcodes/ChangeLog +@@ -1,3 +1,67 @@ ++2017-05-01 Michael Clark <michaeljclark@mac.com> + -+ * avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31, -+ E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define. -+ (EF_AVR_MACH): Redefine to 0x7F. ++ * riscv-opc.c (riscv_opcodes) <call>: Use RA not T1 as a temporary ++ register. + - 2008-08-08 Richard Sandiford <rdsandiford@googlemail.com> - Daniel Jacobowitz <dan@codesourcery.com> - Catherine Moore <clm@codesourcery.com> -@@ -1329,6 +1428,18 @@ - - * common.h: Define NT_PPC_VSX. - -+2008-07-12 Jie Zhang <jie.zhang@analog.com> ++2017-04-03 Palmer Dabbelt <palmer@dabbelt.com> + -+ Revert -+ 2008-07-12 Jie Zhang <jie.zhang@analog.com> -+ * bfin.h (EF_BFIN_CODE_IN_L1): Define. -+ (EF_BFIN_DATA_IN_L1): Define. ++ * riscv-dis.c (riscv_disassemble_insn): Change "_gp" to ++ RISCV_GP_SYMBOL. + -+2008-07-12 Jie Zhang <jie.zhang@analog.com> ++2017-03-14 Kito Cheng <kito.cheng@gmail.com> + -+ * bfin.h (EF_BFIN_CODE_IN_L1): Define. -+ (EF_BFIN_DATA_IN_L1): Define. ++ * riscv-opc.c (riscv_opcodes> <c.li>: Use the 'o' immediate encoding. ++ <c.andi>: Likewise. ++ <c.addiw> Likewise. + - 2008-07-10 Richard Sandiford <rdsandiford@googlemail.com> - - * mips.h (ELF_ST_IS_MIPS16, ELF_ST_SET_MIPS16): New macros. -@@ -1366,7 +1477,7 @@ - - 2008-04-16 David S. Miller <davem@davemloft.net> - -- * elf/sparc.h (R_SPARC_GOTDATA_HIX22, -+ * sparc.h (R_SPARC_GOTDATA_HIX22, - R_SPARC_GOTDATA_LOX10, R_SPARC_GOTDATA_OP_HIX22, - R_SPARC_GOTDATA_OP_LOX10, R_SPARC_GOTDATA_OP, - R_SPARC_H34, R_SPARC_SIZE32, R_SPARC_SIZE64): New relocs. -@@ -1689,6 +1800,7 @@ - - 2006-05-24 Carlos O'Donell <carlos@systemhalted.org> - Randolph Chung <randolph@tausq.org> ++2017-03-14 Kito Cheng <kito.cheng@gmail.com> + - * hppa.h (R_PARISC_TLS_GD21L, R_PARISC_TLS_GD14R, R_PARISC_TLS_GDCALL, - R_PARISC_TLS_LDM21L, R_PARISC_TLS_LDM14R, R_PARISC_TLS_LDMCALL, - R_PARISC_TLS_LDO21L, R_PARISC_TLS_LDO14R, R_PARISC_TLS_DTPMOD32, -diff --git a/include/gdb/ChangeLog b/include/gdb/ChangeLog -index 57a83ce..5a3ecee 100644 ---- a/include/gdb/ChangeLog -+++ b/include/gdb/ChangeLog -@@ -51,9 +51,13 @@ - - * section-scripts.h: New file. - -+2013-10-22 Sterling Augustine <saugustine@google.com> ++ * riscv-opc.c (riscv_opcodes) <c.addi>: Use match_opcode. + -+ * gdb-index.h: Merge from gdb tree. ++2017-03-13 Andrew Waterman <andrew@sifive.com> + - 2013-03-15 Steve Ellcey <sellcey@mips.com> - -- * gdb/remote-sim.h (sim_command_completer): Make char arguments const. -+ * remote-sim.h (sim_command_completer): Make char arguments const. - - 2013-01-01 Joel Brobecker <brobecker@adacore.com> - -@@ -218,7 +222,7 @@ - - 2003-06-10 Corinna Vinschen <vinschen@redhat.com> - -- * gdb/fileio.h: New file. -+ * fileio.h: New file. - - 2003-05-07 Andrew Cagney <cagney@redhat.com> - -@@ -256,7 +260,7 @@ - 2002-07-29 Andrey Volkov <avolkov@transas.com> - - * sim-h8300.h: Rename all enums from H8300_ to SIM_H8300_ -- prefix. -+ prefix. - - 2002-07-23 Andrey Volkov <avolkov@transas.com> - -diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog -index 0aee194..87d4653 100644 ---- a/include/opcode/ChangeLog -+++ b/include/opcode/ChangeLog -@@ -95,10 +95,10 @@ - * aarch64.h [__cplusplus]: Wrap in extern "C". - - 2015-10-07 Claudiu Zissulescu <claziss@synopsys.com> -- Cupertino Miranda <cmiranda@synopsys.com> -+ Cupertino Miranda <cmiranda@synopsys.com> - -- * arc-func.h: New file. -- * arc.h: Likewise. -+ * arc-func.h: New file. -+ * arc.h: Likewise. - - 2015-10-02 Yao Qi <yao.qi@linaro.org> - -@@ -115,6 +115,10 @@ - (S390_INSTR_FLAG_VX): New flag. - (S390_INSTR_FLAG_FACILITY_MASK): New flag mask. - -+2015-09-26 James Bowman <james.bowman@ftdichip.com> ++ * riscv-opc.c (riscv_opcodes) <srli/C>: Use match_opcode. ++ <srl> Likewise. ++ <srai> Likewise. ++ <sra> Likewise. + -+ * ft32.h: Add instruction macros FT32_*() ++2017-03-27 Alan Modra <amodra@gmail.com> + - 2015-09-23 Nick Clifton <nickc@redhat.com> - - * ppc.h (PPC_OPSHIFT_INV): Use an unsigned constant when left -@@ -258,6 +262,14 @@ - (NIOS2_INSN_ORI, NIOS2_INSN_XORI): Delete. - (NIOS2_INSN_OPTARG): Renumber. - -+2014-11-21 Terry Guo <terry.guo@arm.com> ++ PR 21303 ++ * ppc-dis.c (struct ppc_mopt): Comment. ++ (ppc_opts <e200z4>): Move PPC_OPCODE_VLE from .sticky to .cpu. + -+ * arm.h (FPU_VFP_EXT_ARMV8xD): New macro. -+ (FPU_VFP_V5D16): Likewise. -+ (FPU_VFP_V5_SP_D16): Likewise. -+ (FPU_ARCH_VFP_V5D16): Likewise. -+ (FPU_ARCH_VFP_V5_SP_D16): Likewise. ++2017-03-21 Andreas Krebbel <krebbel@linux.vnet.ibm.com> + - 2014-11-06 Sandra Loosemore <sandra@codesourcery.com> - - * nios2.h (nios2_find_opcode_hash): Add mach parameter to -@@ -347,7 +359,7 @@ - * mips.h (mips_operand_type): Add new entries: OP_SAME_RS_RT, - OP_CHECK_PREV and OP_NON_ZERO_REG. Add descriptions for the MIPS R6 - instruction arguments: -a, -b, -d, -s, -t, -u, -v, -w, -x, -y, -A, -B, -- +I, +O, +R, +:, +\, +", +; -+ +I, +O, +R, +:, +\, +", +; - (mips_check_prev_operand): New struct. - (INSN2_FORBIDDEN_SLOT): New define. - (INSN_ISA32R6): New define. -@@ -425,6 +437,10 @@ - - * mips.h (mips_isa_table): Avoid hard-coding INSN_ISA* values. - -+2014-04-23 Andrew Bennett <andrew.bennett@imgtec.com> ++ Backport from mainline ++ 2017-03-21 Andreas Krebbel <krebbel@linux.vnet.ibm.com> + -+ * mips.h (ASE_XPA): New define. ++ * s390-mkopc.c (main): Remove vx2 check. ++ * s390-opc.txt: Remove vx2 instruction flags. + - 2014-04-22 Christian Svensson <blue@cmd.nu> - - * or32.h: Delete. -@@ -472,6 +488,11 @@ - * aarch64.h (aarch64_sys_reg_readonly_p): New declaration. - (aarch64_sys_reg_writeonly_p): Ditto. - -+2013-11-11 Catherine Moore <clm@codesourcery.com> ++2017-03-08 Peter Bergner <bergner@vnet.ibm.com> + -+ * mips.h (INSN_LOAD_MEMORY_DELAY): Rename to... -+ (INSN_LOAD_MEMORY): ...this. ++ * ppc-dis.c (ppc_opts) <altivec>: Do not use PPC_OPCODE_ALTIVEC2; ++ <vsx>: Do not use PPC_OPCODE_VSX3; + - 2013-11-05 Yufeng Zhang <yufeng.zhang@arm.com> - - * aarch64.h (aarch64_sys_reg): New typedef. -@@ -514,6 +535,11 @@ - * mips.h (OP_OPTIONAL_REG): New mips_operand_type. - (mips_optional_operand_p): New function. - -+2013-08-05 Eric Botcazou <ebotcazou@adacore.com> -+ Konrad Eisele <konrad@gaisler.com> ++2017-03-08 Peter Bergner <bergner@vnet.ibm.com> + -+ * sparc.h (sparc_opcode_arch_val): Add SPARC_OPCODE_ARCH_LEON. ++ Apply from master. ++ 2017-03-08 Peter Bergner <bergner@vnet.ibm.com> ++ * ppc-opc.c (powerpc_opcodes) <lnia>: New extended mnemonic. + - 2013-08-04 Jürgen Urban <JuergenUrban@gmx.de> - Richard Sandiford <rdsandiford@googlemail.com> - -@@ -677,6 +703,21 @@ - - * nios2.h (OP_MATCH_ERET): Correct eret encoding. - -+2013-06-08 Catherine Moore <clm@codesourcery.com> ++2017-03-07 Alan Modra <amodra@gmail.com> + -+ * mips.h (mips_opcode): Add ase field. -+ (INSN_ASE_MASK): Delete. -+ (INSN_DSP): Rename to ASE_DSP. Provide new value. -+ (INSN_DSPR2): Rename to ASE_DSPR2. Provide new value. -+ (INSN_MCU): Rename to ASE_MCU. Provide new value. -+ (INSN_MDMX): Rename to ASE_MDMX. Provide new value. -+ (INSN_MIPS3d): Rename to ASE_MIPS3D. Provide new value. -+ (INSN_MT): Rename to ASE_MT. Provide new value. -+ (INSN_SMARTMIPS): Rename to ASE_SMARTMIPS. Provide new value. -+ (INSN_VIRT): Rename to ASE_VIRT. Provide new value. -+ (INSN_VIRT64): Rename to ASE_VIRT64. Provide new value. -+ (opcode_is_member): Add ase argument. Check ase. ++ Apply from master ++ 2017-03-06 Alan Modra <amodra@gmail.com> ++ PR 21124 ++ * ppc-opc.c (extract_esync, extract_ls, extract_ral, extract_ram) ++ (extract_raq, extract_ras, extract_rbx): New functions. ++ (powerpc_operands): Use opposite corresponding insert function. ++ (Q_MASK): Define. ++ (powerpc_opcodes): Apply Q_MASK to all quad insns with even ++ register restriction. + - 2013-05-22 Jürgen Urban <JuergenUrban@gmx.de> + 2017-03-02 Tristan Gingold <gingold@adacore.com> - * mips.h (M_LQC2_AB, M_SQC2_AB): New macros. -@@ -741,6 +782,20 @@ - * tic6x-opcode-table.h: Modify absdp, dpint, dpsp, dptrunc, rcpdp - and rsqrdp opcodes to use the new field coding types. + * configure: Regenerate. +diff --git a/opcodes/ppc-dis.c b/opcodes/ppc-dis.c +index e0eff7a..baa7388 100644 +--- a/opcodes/ppc-dis.c ++++ b/opcodes/ppc-dis.c +@@ -45,8 +45,19 @@ struct dis_private + (((struct dis_private *) ((INFO)->private_data))->dialect) + + struct ppc_mopt { ++ /* Option string, without -m or -M prefix. */ + const char *opt; ++ /* CPU option flags. */ + ppc_cpu_t cpu; ++ /* Flags that should stay on, even when combined with another cpu ++ option. This should only be used for generic options like ++ "-many" or "-maltivec" where it is reasonable to add some ++ capability to another cpu selection. The added flags are sticky ++ so that, for example, "-many -me500" and "-me500 -many" result in ++ the same assembler or disassembler behaviour. Do not use ++ "sticky" for specific cpus, as this will prevent that cpu's flags ++ from overriding the defaults set in powerpc_init_dialect or a ++ prior -m option. */ + ppc_cpu_t sticky; + }; + +@@ -93,7 +104,7 @@ struct ppc_mopt ppc_opts[] = { + | PPC_OPCODE_A2), + 0 }, + { "altivec", PPC_OPCODE_PPC, +- PPC_OPCODE_ALTIVEC | PPC_OPCODE_ALTIVEC2 }, ++ PPC_OPCODE_ALTIVEC }, + { "any", 0, + PPC_OPCODE_ANY }, + { "booke", PPC_OPCODE_PPC | PPC_OPCODE_BOOKE, +@@ -108,8 +119,8 @@ struct ppc_mopt ppc_opts[] = { + { "e200z4", (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE| PPC_OPCODE_SPE + | PPC_OPCODE_ISEL | PPC_OPCODE_EFS | PPC_OPCODE_BRLOCK + | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI +- | PPC_OPCODE_E500 | PPC_OPCODE_E200Z4), +- PPC_OPCODE_VLE }, ++ | PPC_OPCODE_E500 | PPC_OPCODE_VLE | PPC_OPCODE_E200Z4), ++ 0 }, + { "e300", PPC_OPCODE_PPC | PPC_OPCODE_E300, + 0 }, + { "e500", (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_SPE +@@ -221,7 +232,7 @@ struct ppc_mopt ppc_opts[] = { + | PPC_OPCODE_E500), + PPC_OPCODE_VLE }, + { "vsx", PPC_OPCODE_PPC, +- PPC_OPCODE_VSX | PPC_OPCODE_VSX3 }, ++ PPC_OPCODE_VSX }, + { "htm", PPC_OPCODE_PPC, + PPC_OPCODE_HTM }, + }; +diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c +index 9ac779c..f7d1dcd 100644 +--- a/opcodes/ppc-opc.c ++++ b/opcodes/ppc-opc.c +@@ -54,6 +54,7 @@ static long extract_bo (unsigned long, ppc_cpu_t, int *); + static unsigned long insert_boe (unsigned long, long, ppc_cpu_t, const char **); + static long extract_boe (unsigned long, ppc_cpu_t, int *); + static unsigned long insert_esync (unsigned long, long, ppc_cpu_t, const char **); ++static long extract_esync (unsigned long, ppc_cpu_t, int *); + static unsigned long insert_dcmxs (unsigned long, long, ppc_cpu_t, const char **); + static long extract_dcmxs (unsigned long, ppc_cpu_t, int *); + static unsigned long insert_dxd (unsigned long, long, ppc_cpu_t, const char **); +@@ -65,6 +66,7 @@ static long extract_fxm (unsigned long, ppc_cpu_t, int *); + static unsigned long insert_li20 (unsigned long, long, ppc_cpu_t, const char **); + static long extract_li20 (unsigned long, ppc_cpu_t, int *); + static unsigned long insert_ls (unsigned long, long, ppc_cpu_t, const char **); ++static long extract_ls (unsigned long, ppc_cpu_t, int *); + static unsigned long insert_mbe (unsigned long, long, ppc_cpu_t, const char **); + static long extract_mbe (unsigned long, ppc_cpu_t, int *); + static unsigned long insert_mb6 (unsigned long, long, ppc_cpu_t, const char **); +@@ -76,12 +78,17 @@ static long extract_nsi (unsigned long, ppc_cpu_t, int *); + static unsigned long insert_oimm (unsigned long, long, ppc_cpu_t, const char **); + static long extract_oimm (unsigned long, ppc_cpu_t, int *); + static unsigned long insert_ral (unsigned long, long, ppc_cpu_t, const char **); ++static long extract_ral (unsigned long, ppc_cpu_t, int *); + static unsigned long insert_ram (unsigned long, long, ppc_cpu_t, const char **); ++static long extract_ram (unsigned long, ppc_cpu_t, int *); + static unsigned long insert_raq (unsigned long, long, ppc_cpu_t, const char **); ++static long extract_raq (unsigned long, ppc_cpu_t, int *); + static unsigned long insert_ras (unsigned long, long, ppc_cpu_t, const char **); ++static long extract_ras (unsigned long, ppc_cpu_t, int *); + static unsigned long insert_rbs (unsigned long, long, ppc_cpu_t, const char **); + static long extract_rbs (unsigned long, ppc_cpu_t, int *); + static unsigned long insert_rbx (unsigned long, long, ppc_cpu_t, const char **); ++static long extract_rbx (unsigned long, ppc_cpu_t, int *); + static unsigned long insert_rx (unsigned long, long, ppc_cpu_t, const char **); + static long extract_rx (unsigned long, ppc_cpu_t, int *); + static unsigned long insert_ry (unsigned long, long, ppc_cpu_t, const char **); +@@ -462,7 +469,7 @@ const struct powerpc_operand powerpc_operands[] = + /* The LS or WC field in an X (sync or wait) form instruction. */ + #define LS LIA + 1 + #define WC LS +- { 0x3, 21, insert_ls, NULL, PPC_OPERAND_OPTIONAL }, ++ { 0x3, 21, insert_ls, extract_ls, PPC_OPERAND_OPTIONAL }, + + /* The ME field in an M form instruction. */ + #define ME LS + 1 +@@ -519,24 +526,24 @@ const struct powerpc_operand powerpc_operands[] = + value restrictions. */ + #define RAQ RA0 + 1 + #define RAX RAQ +- { 0x1f, 16, insert_raq, NULL, PPC_OPERAND_GPR_0 }, ++ { 0x1f, 16, insert_raq, extract_raq, PPC_OPERAND_GPR_0 }, + + /* The RA field in a D or X form instruction which is an updating + load, which means that the RA field may not be zero and may not + equal the RT field. */ + #define RAL RAQ + 1 +- { 0x1f, 16, insert_ral, NULL, PPC_OPERAND_GPR_0 }, ++ { 0x1f, 16, insert_ral, extract_ral, PPC_OPERAND_GPR_0 }, + + /* The RA field in an lmw instruction, which has special value + restrictions. */ + #define RAM RAL + 1 +- { 0x1f, 16, insert_ram, NULL, PPC_OPERAND_GPR_0 }, ++ { 0x1f, 16, insert_ram, extract_ram, PPC_OPERAND_GPR_0 }, + + /* The RA field in a D or X form instruction which is an updating + store or an updating floating point load, which means that the RA + field may not be zero. */ + #define RAS RAM + 1 +- { 0x1f, 16, insert_ras, NULL, PPC_OPERAND_GPR_0 }, ++ { 0x1f, 16, insert_ras, extract_ras, PPC_OPERAND_GPR_0 }, + + /* The RA field of the tlbwe, dccci and iccci instructions, + which are optional. */ +@@ -557,7 +564,7 @@ const struct powerpc_operand powerpc_operands[] = + /* The RB field in an lswx instruction, which has special value + restrictions. */ + #define RBX RBS + 1 +- { 0x1f, 11, insert_rbx, NULL, PPC_OPERAND_GPR }, ++ { 0x1f, 11, insert_rbx, extract_rbx, PPC_OPERAND_GPR }, + + /* The RB field of the dccci and iccci instructions, which are optional. */ + #define RBOPT RBX + 1 +@@ -580,6 +587,7 @@ const struct powerpc_operand powerpc_operands[] = + which have special value restrictions. */ + #define RSQ RS + 1 + #define RTQ RSQ ++#define Q_MASK (1 << 21) + { 0x1e, 21, NULL, NULL, PPC_OPERAND_GPR }, + + /* The RS field of the tlbwe instruction, which is optional. */ +@@ -694,7 +702,7 @@ const struct powerpc_operand powerpc_operands[] = + + /* The ESYNC field in an X (sync) form instruction. */ + #define ESYNC STRM + 1 +- { 0xf, 16, insert_esync, NULL, PPC_OPERAND_OPTIONAL }, ++ { 0xf, 16, insert_esync, extract_esync, PPC_OPERAND_OPTIONAL }, + + /* The SV field in a POWER SC form instruction. */ + #define SV ESYNC + 1 +@@ -1533,6 +1541,22 @@ insert_ls (unsigned long insn, + return insn | ((value & 0x3) << 21); + } -+2013-03-12 Sebastian Huber <sebastian.huber@embedded-brains.de> -+ -+ * nios2.h: Edit comment. -+ -+2013-03-11 Sebastian Huber <sebastian.huber@embedded-brains.de> -+ -+ * nios2.h (OPX_WRPRS): New define. -+ (OP_MATCH_WRPRS): Likewise. -+ -+2013-03-11 Sebastian Huber <sebastian.huber@embedded-brains.de> ++static long ++extract_ls (unsigned long insn, ++ ppc_cpu_t dialect, ++ int *invalid) ++{ ++ unsigned long lvalue = (insn >> 21) & 3; + -+ * nios2.h (OP_RDPRS): New define. -+ (OP_MATCH_RDPRS): Likewise. ++ if (((insn >> 1) & 0x3ff) == 598) ++ { ++ unsigned long max_lvalue = (dialect & PPC_OPCODE_POWER4) ? 2 : 1; ++ if (lvalue > max_lvalue) ++ *invalid = 1; ++ } ++ return lvalue; ++} + - 2013-03-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com> - - * arm.h (CRC_EXT_ARMV8): New constant. -@@ -798,6 +853,10 @@ - (make_instruction,match_opcode): Added function prototypes. - (cr16_words,cr16_allWords,cr16_currInsn): Declare as extern. + /* The 4-bit E field in a sync instruction that accepts 2 operands. + If ESYNC is non-zero, then the L field must be either 0 or 1 and + the complement of ESYNC-bit2. */ +@@ -1560,6 +1584,27 @@ insert_esync (unsigned long insn, + return insn | ((value & 0xf) << 16); + } -+2012-12-17 Nick Clifton <nickc@redhat.com> -+ -+ * tahoe.h: Add copyright notice. ++static long ++extract_esync (unsigned long insn, ++ ppc_cpu_t dialect, ++ int *invalid) ++{ ++ unsigned long ls = (insn >> 21) & 0x3; ++ unsigned long lvalue = (insn >> 16) & 0xf; + - 2012-11-23 Alan Modra <amodra@gmail.com> - - * ppc.h (ppc_parse_cpu): Update prototype. -@@ -811,10 +870,36 @@ - - * s390.h (s390_opcode_cpu_val): Add S390_OPCODE_ZEC12. - -+2012-09-27 Anthony Green <green@moxielogic.com> ++ if (lvalue == 0) ++ { ++ if (((dialect & PPC_OPCODE_E6500) != 0 && ls > 1) ++ || ((dialect & PPC_OPCODE_POWER9) != 0 && ls > 2)) ++ *invalid = 1; ++ } ++ else if ((ls & ~0x1) ++ || (((lvalue >> 1) & 0x1) ^ ls) == 0) ++ *invalid = 1; + -+ * moxie.h (MOXIE_BAD): New define. ++ return lvalue; ++} + - 2012-09-04 Sergey A. Guriev <sergey.a.guriev@intel.com> - - * ia64.h (ia64_opnd): Add new operand types. + /* The MB and ME fields in an M form instruction expressed as a single + operand which is itself a bitmask. The extraction function always + marks it as invalid, since we never want to recognize an +@@ -1743,6 +1788,19 @@ insert_ral (unsigned long insn, + return insn | ((value & 0x1f) << 16); + } -+2012-08-24 Matthew Gretton-Dann <matthew.gretton-dann@arm.com> -+ -+ * arm.h (ARM_CPU_IS_ANY): New define. -+ -+2012-08-24 Matthew Gretton-Dann <matthew.gretton-dann@arm.com> ++static long ++extract_ral (unsigned long insn, ++ ppc_cpu_t dialect ATTRIBUTE_UNUSED, ++ int *invalid) ++{ ++ long rtvalue = (insn >> 21) & 0x1f; ++ long ravalue = (insn >> 16) & 0x1f; + -+ * arm.h (ARM_EXT_V8): New define. -+ (FPU_VFP_EXT_ARMV8): Likewise. -+ (FPU_NEON_EXT_ARMV8): Likewise. -+ (FPU_CRYPTO_EXT_ARMV8): Likewise. -+ (ARM_AEXT_V8A): Likewise. -+ (FPU_VFP_ARMV8): Likwise. -+ (FPU_NEON_ARMV8): Likewise. -+ (FPU_CRYPTO_ARMV8): Likewise. -+ (FPU_ARCH_VFP_ARMV8): Likewise. -+ (FPU_ARCH_NEON_VFP_ARMV8): Likewise. -+ (FPU_ARCH_CRYPTO_NEON_VFP_ARMV8): Likewise. -+ (ARM_ARCH_V8A): Likwise. -+ (ARM_ARCH_V8A_FP): Likewise. -+ (ARM_ARCH_V8A_SIMD): Likewise. -+ (ARM_ARCH_V8A_CRYPTO): Likewise. ++ if (rtvalue == ravalue || ravalue == 0) ++ *invalid = 1; ++ return ravalue; ++} + - 2012-08-21 David S. Miller <davem@davemloft.net> - - * sparc.h (F3F4): New macro. -@@ -859,6 +944,10 @@ + /* The RA field in an lmw instruction, which has special value + restrictions. */ - * mips.h: Fix a typo in description. +@@ -1757,6 +1815,19 @@ insert_ram (unsigned long insn, + return insn | ((value & 0x1f) << 16); + } -+2012-07-05 Sean Keys <skeys@ipdatasys.com> ++static long ++extract_ram (unsigned long insn, ++ ppc_cpu_t dialect ATTRIBUTE_UNUSED, ++ int *invalid) ++{ ++ unsigned long rtvalue = (insn >> 21) & 0x1f; ++ unsigned long ravalue = (insn >> 16) & 0x1f; + -+ * xgate.h: Changed the format string for mode XGATE_OP_DYA_MON. ++ if (ravalue >= rtvalue) ++ *invalid = 1; ++ return ravalue; ++} + - 2012-06-07 Georg-Johann Lay <avr@gjlay.de> + /* The RA field in the DQ form lq or an lswx instruction, which have special + value restrictions. */ - * avr.h: (AVR_ISA_XCH): New define. -@@ -906,6 +995,10 @@ - HWCAP_SHA256, HWCAP_SHA512, HWCAP_MPMUL, HWCAP_MONT, HWCAP_PAUSE, - HWCAP_CBCOND, HWCAP_CRC32): New defines. +@@ -1773,6 +1844,19 @@ insert_raq (unsigned long insn, + return insn | ((value & 0x1f) << 16); + } -+2012-04-12 David S. Miller <davem@davemloft.net> ++static long ++extract_raq (unsigned long insn, ++ ppc_cpu_t dialect ATTRIBUTE_UNUSED, ++ int *invalid) ++{ ++ unsigned long rtvalue = (insn >> 21) & 0x1f; ++ unsigned long ravalue = (insn >> 16) & 0x1f; + -+ * sparc.h: Define '=' as generating R_SPARC_WDISP10. ++ if (ravalue == rtvalue) ++ *invalid = 1; ++ return ravalue; ++} + - 2012-03-10 Edmar Wienskoski <edmar@freescale.com> - - * ppc.h: Add PPC_OPCODE_ALTIVEC2, PPC_OPCODE_E6500, PPC_OPCODE_TMR. -@@ -1275,6 +1368,14 @@ - * cgen.h (CGEN_ATTR, CGEN_ATTR_TYPE): Rename bool attribute to bool_. - (CGEN_ATTR_BOOLS, CGEN_ATTR_CGEN_INSN_ALIAS_VALUE): Likewise. + /* The RA field in a D or X form instruction which is an updating + store or an updating floating point load, which means that the RA + field may not be zero. */ +@@ -1788,6 +1872,18 @@ insert_ras (unsigned long insn, + return insn | ((value & 0x1f) << 16); + } -+2010-09-29 Bernd Schmidt <bernds@codesourcery.com> -+ -+ * tic6x-control-registers.h (tscl): Now read_write. -+ -+2010-09-27 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> ++static long ++extract_ras (unsigned long insn, ++ ppc_cpu_t dialect ATTRIBUTE_UNUSED, ++ int *invalid) ++{ ++ unsigned long ravalue = (insn >> 16) & 0x1f; + -+ * s390.h: Add S390_OPCODE_Z196 to enum s390_opcode_cpu_val. ++ if (ravalue == 0) ++ *invalid = 1; ++ return ravalue; ++} + - 2010-09-23 Matthew Gretton-Dann <matthew.gretton-dann@arm.com> - - * arm.h (ARM_EXT_VIRT): New define. -@@ -1306,6 +1407,16 @@ - - * bfin.h: Strip trailing whitespace. + /* The RB field in an X form instruction when it must be the same as + the RS field in the instruction. This is used for extended + mnemonics like mr. This operand is marked FAKE. The insertion +@@ -1829,6 +1925,19 @@ insert_rbx (unsigned long insn, + return insn | ((value & 0x1f) << 11); + } -+2009-09-04 Jie Zhang <jie.zhang@analog.com> ++static long ++extract_rbx (unsigned long insn, ++ ppc_cpu_t dialect ATTRIBUTE_UNUSED, ++ int *invalid) ++{ ++ unsigned long rtvalue = (insn >> 21) & 0x1f; ++ unsigned long rbvalue = (insn >> 11) & 0x1f; + -+ * bfin.h (PseudoDbg_Assert): Add bits_grp and mask_grp. -+ (PseudoDbg_Assert_grp_bits, PseudoDbg_Assert_grp_mask): Define. -+ (PseudoDbg_Assert_dbgop_bits, PseudoDbg_Assert_dbgop_mask, -+ PseudoDbg_Assert_dontcare_bits, PseudoDbg_Assert_dontcare_mask): -+ Adjust accordingly. -+ (init_PseudoDbg_Assert): Add PseudoDbg_Assert_grp_bits and -+ PseudoDbg_Assert_grp_mask. ++ if (rbvalue == rtvalue) ++ *invalid = 1; ++ return rbvalue; ++} + - 2010-07-29 DJ Delorie <dj@redhat.com> - - * rx.h (RX_Operand_Type): Add TwoReg. -@@ -1358,7 +1469,7 @@ - - 2010-05-26 Catherine Moore <clm@codesourcery.com> - -- * opcode/mips.h (INSN_MIPS16): Remove. -+ * mips.h (INSN_MIPS16): Remove. - - 2010-04-21 Joseph Myers <joseph@codesourcery.com> - -@@ -1428,7 +1539,7 @@ + /* The SCI8 field is made up of SCL and {U,N}I8 fields. */ + static unsigned long + insert_sci8 (unsigned long insn, +@@ -2443,6 +2552,8 @@ extract_vleil (unsigned long insn, + /* An DX form instruction. */ + #define DX(op, xop) (OP (op) | ((((unsigned long)(xop)) & 0x1f) << 1)) + #define DX_MASK DX (0x3f, 0x1f) ++/* An DX form instruction with the D bits specified. */ ++#define NODX_MASK (DX_MASK | 0x1fffc1) - 2010-02-08 Philipp Tomsich <philipp.tomsich@theobroma-systems.com> + /* An EVSEL form instruction. */ + #define EVSEL(op, xop) (OP (op) | (((unsigned long)(xop)) & 0xff) << 3) +@@ -4155,6 +4266,7 @@ const struct powerpc_opcode powerpc_opcodes[] = { -- * opcode/ppc.h (PPC_OPCODE_TITAN): Define. -+ * ppc.h (PPC_OPCODE_TITAN): Define. + {"mcrf", XL(19,0), XLBB_MASK|(3<<21)|(3<<16), COM, PPCVLE, {BF, BFA}}, - 2010-01-14 H.J. Lu <hongjiu.lu@intel.com> ++{"lnia", DX(19,2), NODX_MASK, POWER9, PPCVLE, {RT}}, + {"addpcis", DX(19,2), DX_MASK, POWER9, PPCVLE, {RT, DXD}}, + {"subpcis", DX(19,2), DX_MASK, POWER9, PPCVLE, {RT, NDXD}}, -@@ -1552,7 +1663,7 @@ +@@ -4974,7 +5086,7 @@ const struct powerpc_opcode powerpc_opcodes[] = { - 2009-01-28 Doug Evans <dje@google.com> + {"stdux", X(31,181), X_MASK, PPC64, 0, {RS, RAS, RB}}, -- * opcode/i386.h: Add multiple inclusion protection. -+ * i386.h: Add multiple inclusion protection. - (EAX_REG_NUM,ECX_REG_NUM,EDX_REGNUM,EBX_REG_NUM,ESI_REG_NUM) - (EDI_REG_NUM): New macros. - (MODRM_MOD_FIELD,MODRM_REG_FIELD,MODRM_RM_FIELD): New macros. -@@ -1583,6 +1694,14 @@ - * ia64.h (ia64_resource_specifier): Add IA64_RS_CR_IIB. Update - IA64_RS_CR. +-{"stqcx.", XRC(31,182,1), X_MASK, POWER8, 0, {RSQ, RA0, RB}}, ++{"stqcx.", XRC(31,182,1), X_MASK|Q_MASK, POWER8, 0, {RSQ, RA0, RB}}, + {"wchkall", X(31,182), X_MASK, PPCA2, 0, {OBF}}, -+2008-08-08 Anatoly Sokolov <aesok@post.ru> -+ -+ * avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove. -+ (AVR_ISA_AVR3): Redefine. -+ (AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35, -+ AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51, -+ AVR_ISA_AVR6): Define. -+ - 2008-08-01 Peter Bergner <bergner@vnet.ibm.com> + {"stwux", X(31,183), X_MASK, PPCCOM, 0, {RS, RAS, RB}}, +@@ -5105,7 +5217,7 @@ const struct powerpc_opcode powerpc_opcodes[] = { - * ppc.h (PPC_OPCODE_VSX, PPC_OPERAND_VSR): New. -@@ -2039,7 +2158,7 @@ - 2005-07-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + {"mfapidi", X(31,275), X_MASK, BOOKE, E500|TITAN, {RT, RA}}, - PR gas/336 -- * hppa.h (pa_opcodes): Allow 0 immediates in PA 2.0 variants of pdtlb -+ * hppa.h (pa_opcodes): Allow 0 immediates in PA 2.0 variants of pdtlb - and pitlb. +-{"lqarx", X(31,276), XEH_MASK, POWER8, 0, {RTQ, RAX, RBX, EH}}, ++{"lqarx", X(31,276), XEH_MASK|Q_MASK, POWER8, 0, {RTQ, RAX, RBX, EH}}, - 2005-07-27 Jan Beulich <jbeulich@novell.com> -diff --git a/ld/ChangeLog b/ld/ChangeLog -index 75fd708..e74db8c 100644 ---- a/ld/ChangeLog -+++ b/ld/ChangeLog -@@ -1,3 +1,194 @@ -+2016-03-17 H.J. Lu <hongjiu.lu@intel.com> -+ -+ Backport from master -+ 2016-03-15 H.J. Lu <hongjiu.lu@intel.com> -+ -+ PR ld/19827 -+ * testsuite/ld-i386/i386.exp: Run PR ld/19827 tests. -+ * testsuite/ld-x86-64/x86-64.exp: Likewise. -+ * testsuite/ld-i386/pr19827.rd: New file. -+ * testsuite/ld-i386/pr19827a.S: Likewise. -+ * testsuite/ld-i386/pr19827b.S: Likewise. -+ * testsuite/ld-x86-64/pr19827.rd: Likewise. -+ * testsuite/ld-x86-64/pr19827a.S: Likewise. -+ * testsuite/ld-x86-64/pr19827b.S: Likewise. -+ -+2016-03-15 H.J. Lu <hongjiu.lu@intel.com> -+ -+ Backport from master -+ 2016-02-20 H.J. Lu <hongjiu.lu@intel.com> -+ -+ * testsuite/ld-elf/pr19539.d: Skip cris*-*-* targets. -+ -+ 2016-01-30 H.J. Lu <hongjiu.lu@intel.com> -+ -+ PR ld/19539 -+ * testsuite/ld-elf/pr19539.d: New file. -+ * testsuite/ld-elf/pr19539.s: Likewise. -+ * testsuite/ld-elf/pr19539.t: Likewise. -+ -+2016-03-14 H.J. Lu <hongjiu.lu@intel.com> -+ -+ Backport from master -+ 2015-12-07 Jan Beulich <jbeulich@suse.com> -+ -+ * ld-elf/gabiend.rt: Accept any alignment. -+ * ld-elf/gabinormal.rt: Likewise. -+ -+2016-03-09 H.J. Lu <hongjiu.lu@intel.com> -+ -+ Backport from master -+ 2016-03-04 H.J. Lu <hongjiu.lu@intel.com> -+ -+ PR ld/19579 -+ * testsuite/ld-elf/pr19579a.c: New file. -+ * testsuite/ld-elf/pr19579b.c: Likewise. -+ * testsuite/ld-elf/shared.exp: Run PR ld/19579 test. -+ -+2016-03-04 H.J. Lu <hongjiu.lu@intel.com> -+ -+ Backport from master -+ 2016-03-02 H.J. Lu <hongjiu.lu@intel.com> -+ -+ PR ld/19739 -+ * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't -+ merge flags of other input sections for relocatable link. -+ * emultempl/mmo.em (mmo_place_orphan): Likewise. -+ * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise. -+ * emultempl/pep.em (gld_${EMULATION_NAME}_place_orphan): Likewise. -+ -+2016-03-01 H.J. Lu <hongjiu.lu@intel.com> -+ -+ Backport from master -+ 2016-03-01 H.J. Lu <hongjiu.lu@intel.com> -+ -+ * testsuite/ld-plugin/lto.exp: Update PR ld/12365 test for GCC 6. -+ -+2016-02-26 H.J. Lu <hongjiu.lu@intel.com> -+ -+ Backport from master -+ 2016-02-24 H.J. Lu <hongjiu.lu@intel.com> -+ -+ PR ld/19698 -+ * testsuite/ld-elf/pr19698.d: New file. -+ * testsuite/ld-elf/pr19698.s: Likewise. -+ * testsuite/ld-elf/pr19698.t: Likewise. -+ -+2016-02-26 H.J. Lu <hongjiu.lu@intel.com> -+ -+ Backport from master -+ 2016-02-01 H.J. Lu <hongjiu.lu@intel.com> -+ -+ PR ld/19553 -+ * testsuite/ld-elf/indirect.exp: Run tests for PR ld/19553. -+ * testsuite/ld-elf/pr19553.map: New file. -+ * testsuite/ld-elf/pr19553.map: Likewise. -+ * testsuite/ld-elf/pr19553a.c: Likewise. -+ * testsuite/ld-elf/pr19553b.c: Likewise. -+ * testsuite/ld-elf/pr19553b.out: Likewise. -+ * testsuite/ld-elf/pr19553c.c: Likewise. -+ * testsuite/ld-elf/pr19553c.out: Likewise. -+ * testsuite/ld-elf/pr19553d.c: Likewise. -+ * testsuite/ld-elf/pr19553d.out: Likewise. -+ -+2016-02-25 Jiong Wang <jiong.wang@arm.com> -+ -+ Backport from master -+ 2016-01-20 Jiong Wang <jiong.wang@arm.com> -+ -+ * testsuite/ld-aarch64/farcall-section.d: Delete. -+ * testsuite/ld-aarch64/farcall-section.s: Delete. -+ * testsuite/ld-aarch64/farcall-b-section.d: New expectation file. -+ * testsuite/ld-aarch64/farcall-bl-section.d: Likewise. -+ * testsuite/ld-aarch64/farcall-b-section.s: New testcase. -+ * testsuite/ld-aarch64/farcall-bl-section.s: Likewise. -+ * testsuite/ld-aarch64/aarch64-elf.exp: Likewise. -+ -+2016-02-11 H.J. Lu <hongjiu.lu@intel.com> -+ -+ Backport from master -+ 2016-02-11 H.J. Lu <hongjiu.lu@intel.com> -+ -+ PR ld/19615 -+ * ld.texinfo: Document -Bsymbolic and -Bsymbolic-functions for -+ PIE. -+ * lexsup.c (parse_args): Enable -Bsymbolic and -+ -Bsymbolic-functions for PIE. -+ * testsuite/ld-i386/i386.exp: Run pr19615. -+ * testsuite/ld-i386/pr19615.d: New file. -+ * testsuite/ld-i386/pr19615.s: Likewise. -+ * testsuite/ld-x86-64/pr19615.d: Likewise. -+ * testsuite/ld-x86-64/pr19615.s: Likewise. -+ -+2016-02-03 H.J. Lu <hongjiu.lu@intel.com> -+ -+ Backport from master -+ 2016-02-03 H.J. Lu <hongjiu.lu@intel.com> -+ -+ PR gas/19520 -+ * testsuite/ld-i386/branch1.d: Pass -mrelax-relocations=yes to as. -+ * testsuite/ld-i386/call1.d: Likewise. -+ * testsuite/ld-i386/call2.d: Likewise. -+ * testsuite/ld-i386/call3a.d: Likewise. -+ * testsuite/ld-i386/call3b.d: Likewise. -+ * testsuite/ld-i386/call3c.d: Likewise. -+ * testsuite/ld-i386/call3d.d: Likewise. -+ * testsuite/ld-i386/call3e.d: Likewise. -+ * testsuite/ld-i386/call3f.d: Likewise. -+ * testsuite/ld-i386/call3g.d: Likewise. -+ * testsuite/ld-i386/call3h.d: Likewise. -+ * testsuite/ld-i386/jmp1.d: Likewise. -+ * testsuite/ld-i386/jmp2.d: Likewise. -+ * testsuite/ld-i386/lea1c.d: Likewise. -+ * testsuite/ld-i386/load1.d: Likewise. -+ * testsuite/ld-i386/load2.d: Likewise. -+ * testsuite/ld-i386/load3.d: Likewise. -+ * testsuite/ld-i386/load4a.d: Likewise. -+ * testsuite/ld-i386/load5a.d: Likewise. -+ * testsuite/ld-i386/mov2b.d: Likewise. -+ * testsuite/ld-i386/mov3.d: Likewise. -+ * testsuite/ld-ifunc/ifunc-21-x86-64.d: Likewise. -+ * testsuite/ld-ifunc/ifunc-22-x86-64.d: Likewise. -+ * testsuite/ld-ifunc/ifunc-5r-local-x86-64.d: Likewise. -+ * testsuite/ld-x86-64/call1a.d: Likewise. -+ * testsuite/ld-x86-64/call1b.d: Likewise. -+ * testsuite/ld-x86-64/call1c.d: Likewise. -+ * testsuite/ld-x86-64/call1d.d: Likewise. -+ * testsuite/ld-x86-64/call1e.d: Likewise. -+ * testsuite/ld-x86-64/call1f.d: Likewise. -+ * testsuite/ld-x86-64/call1h.d: Likewise. -+ * testsuite/ld-x86-64/call1i.d: Likewise. -+ * testsuite/ld-x86-64/load1a.d: Likewise. -+ * testsuite/ld-x86-64/load1b.d: Likewise. -+ * testsuite/ld-i386/got1a.S: Load GOT into %ecx and use it. -+ * testsuite/ld-i386/got1.dd: Updated. -+ * testsuite/ld-i386/got1d.S (1): Removed. -+ * testsuite/ld-i386/i386.exp: Add -Wa,-mrelax-relocations=yes. -+ * testsuite/ld-x86-64/x86-64.exp: Likewise. -+ -+2016-02-02 H.J. Lu <hongjiu.lu@intel.com> -+ -+ Backport from master -+ 2016-02-02 H.J. Lu <hongjiu.lu@intel.com> -+ -+ PR ld/18591 -+ * testsuite/ld-x86-64/pr18591.d: New file. -+ * testsuite/ld-x86-64/pr18591.s: Likewise. -+ * testsuite/ld-x86-64/x86-64.exp: Run pr18591. -+ -+2016-01-29 H.J. Lu <hongjiu.lu@intel.com> -+ -+ Backport from master -+ 2016-01-29 H.J. Lu <hongjiu.lu@intel.com> -+ -+ PR ld/19533 -+ * configure.ac (compressed_debug_sections): Replace == with =. -+ * configure: Regenerated. -+ -+2016-01-25 Tristan Gingold <gingold@adacore.com> -+ -+ * configure: Regenerate. -+ - 2016-01-25 Tristan Gingold <gingold@adacore.com> + {"lscbx", XRC(31,277,0), X_MASK, M601, 0, {RT, RA, RB}}, + {"lscbx.", XRC(31,277,1), X_MASK, M601, 0, {RT, RA, RB}}, +@@ -6052,7 +6164,7 @@ const struct powerpc_opcode powerpc_opcodes[] = { - * configure: Regenerate. -@@ -89,7 +280,7 @@ - decide placement. - - 2015-10-27 Laurent Alfonsi <laurent.alfonsi@st.com> -- Christophe Monat <christophe.monat@st.com> -+ Christophe Monat <christophe.monat@st.com> - - * ld.texinfo: Add description of the STM32L4xx erratum - workaround. -@@ -129,7 +320,7 @@ - - 2015-10-22 H.J. Lu <hongjiu.lu@intel.com> - -- * ld/ld.texinfo: Document "-z call-nop=PADDING" option. -+ * ld.texinfo: Document "-z call-nop=PADDING" option. - * emulparams/call_nop.sh: New file. - * emulparams/elf_i386_be.sh: Source - ${srcdir}/emulparams/call_nop.sh. -@@ -165,7 +356,7 @@ - - 2015-10-15 Simon Dardis <Simon.Dardis@imgtec.com> - -- * ld/ldexp.c: (try_copy_symbol_flags): New. Factored out from... -+ * ldexp.c: (try_copy_symbol_flags): New. Factored out from... - (exp_fold_tree_1): Here. Cope with ternary operator in - assignments. Use new helper. - -@@ -308,7 +499,7 @@ - 2015-09-09 James Bowman <james.bowman@ftdichip.com> - - * scripttempl/ft32.sc: default linker script RAM and -- FLASH size symbols -+ FLASH size symbols - - 2015-09-09 Nick Clifton <nickc@redhat.com> - -@@ -359,58 +550,58 @@ - - 2015-08-18 H.J. Lu <hongjiu.lu@intel.com> - -- * ld/ldctor.c: Replace shared, executable, relocatable and pie -+ * ldctor.c: Replace shared, executable, relocatable and pie - fields with bfd_link_executable, bfd_link_dll, - bfd_link_relocatable, bfd_link_pic and bfd_link_pie. -- * ld/ldemul.c: Likewise. -- * ld/ldfile.c: Likewise. -- * ld/ldlang.c: Likewise. -- * ld/ldmain.c: Likewise. -- * ld/ldwrite.c: Likewise. -- * ld/lexsup.c: Likewise. -- * ld/pe-dll.c: Likewise. -- * ld/plugin.c: Likewise. -- * ld/emultempl/aarch64elf.em: Likewise. -- * ld/emultempl/aix.em: Likewise. -- * ld/emultempl/alphaelf.em: Likewise. -- * ld/emultempl/armcoff.em: Likewise. -- * ld/emultempl/armelf.em: Likewise. -- * ld/emultempl/avrelf.em: Likewise. -- * ld/emultempl/beos.em: Likewise. -- * ld/emultempl/cr16elf.em: Likewise. -- * ld/emultempl/elf-generic.em: Likewise. -- * ld/emultempl/elf32.em: Likewise. -- * ld/emultempl/genelf.em: Likewise. -- * ld/emultempl/generic.em: Likewise. -- * ld/emultempl/gld960.em: Likewise. -- * ld/emultempl/gld960c.em: Likewise. -- * ld/emultempl/hppaelf.em: Likewise. -- * ld/emultempl/irix.em: Likewise. -- * ld/emultempl/linux.em: Likewise. -- * ld/emultempl/lnk960.em: Likewise. -- * ld/emultempl/m68hc1xelf.em: Likewise. -- * ld/emultempl/m68kcoff.em: Likewise. -- * ld/emultempl/m68kelf.em: Likewise. -- * ld/emultempl/metagelf.em: Likewise. -- * ld/emultempl/mipself.em: Likewise. -- * ld/emultempl/mmo.em: Likewise. -- * ld/emultempl/msp430.em: Likewise. -- * ld/emultempl/nds32elf.em: Likewise. -- * ld/emultempl/needrelax.em: Likewise. -- * ld/emultempl/nios2elf.em: Likewise. -- * ld/emultempl/pe.em: Likewise. -- * ld/emultempl/pep.em: Likewise. -- * ld/emultempl/ppc32elf.em: Likewise. -- * ld/emultempl/ppc64elf.em: Likewise. -- * ld/emultempl/sh64elf.em: Likewise. -- * ld/emultempl/solaris2.em: Likewise. -- * ld/emultempl/spuelf.em: Likewise. -- * ld/emultempl/sunos.em: Likewise. -- * ld/emultempl/tic6xdsbt.em: Likewise. -- * ld/emultempl/ticoff.em: Likewise. -- * ld/emultempl/v850elf.em: Likewise. -- * ld/emultempl/vms.em: Likewise. -- * ld/emultempl/vxworks.em: Likewise. -+ * ldemul.c: Likewise. -+ * ldfile.c: Likewise. -+ * ldlang.c: Likewise. -+ * ldmain.c: Likewise. -+ * ldwrite.c: Likewise. -+ * lexsup.c: Likewise. -+ * pe-dll.c: Likewise. -+ * plugin.c: Likewise. -+ * emultempl/aarch64elf.em: Likewise. -+ * emultempl/aix.em: Likewise. -+ * emultempl/alphaelf.em: Likewise. -+ * emultempl/armcoff.em: Likewise. -+ * emultempl/armelf.em: Likewise. -+ * emultempl/avrelf.em: Likewise. -+ * emultempl/beos.em: Likewise. -+ * emultempl/cr16elf.em: Likewise. -+ * emultempl/elf-generic.em: Likewise. -+ * emultempl/elf32.em: Likewise. -+ * emultempl/genelf.em: Likewise. -+ * emultempl/generic.em: Likewise. -+ * emultempl/gld960.em: Likewise. -+ * emultempl/gld960c.em: Likewise. -+ * emultempl/hppaelf.em: Likewise. -+ * emultempl/irix.em: Likewise. -+ * emultempl/linux.em: Likewise. -+ * emultempl/lnk960.em: Likewise. -+ * emultempl/m68hc1xelf.em: Likewise. -+ * emultempl/m68kcoff.em: Likewise. -+ * emultempl/m68kelf.em: Likewise. -+ * emultempl/metagelf.em: Likewise. -+ * emultempl/mipself.em: Likewise. -+ * emultempl/mmo.em: Likewise. -+ * emultempl/msp430.em: Likewise. -+ * emultempl/nds32elf.em: Likewise. -+ * emultempl/needrelax.em: Likewise. -+ * emultempl/nios2elf.em: Likewise. -+ * emultempl/pe.em: Likewise. -+ * emultempl/pep.em: Likewise. -+ * emultempl/ppc32elf.em: Likewise. -+ * emultempl/ppc64elf.em: Likewise. -+ * emultempl/sh64elf.em: Likewise. -+ * emultempl/solaris2.em: Likewise. -+ * emultempl/spuelf.em: Likewise. -+ * emultempl/sunos.em: Likewise. -+ * emultempl/tic6xdsbt.em: Likewise. -+ * emultempl/ticoff.em: Likewise. -+ * emultempl/v850elf.em: Likewise. -+ * emultempl/vms.em: Likewise. -+ * emultempl/vxworks.em: Likewise. - - 2015-08-18 Alan Modra <amodra@gmail.com> - -diff --git a/ld/configure b/ld/configure -index a446283..8095b71 100755 ---- a/ld/configure -+++ b/ld/configure -@@ -1,6 +1,6 @@ - #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. --# Generated by GNU Autoconf 2.64 for ld 2.26. -+# Generated by GNU Autoconf 2.64 for ld 2.26.0. - # - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, - # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software -@@ -556,8 +556,8 @@ MAKEFLAGS= - # Identity of this package. - PACKAGE_NAME='ld' - PACKAGE_TARNAME='ld' --PACKAGE_VERSION='2.26' --PACKAGE_STRING='ld 2.26' -+PACKAGE_VERSION='2.26.0' -+PACKAGE_STRING='ld 2.26.0' - PACKAGE_BUGREPORT='' - PACKAGE_URL='' - -@@ -1350,7 +1350,7 @@ if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF --\`configure' configures ld 2.26 to adapt to many kinds of systems. -+\`configure' configures ld 2.26.0 to adapt to many kinds of systems. - - Usage: $0 [OPTION]... [VAR=VALUE]... - -@@ -1421,7 +1421,7 @@ fi - - if test -n "$ac_init_help"; then - case $ac_init_help in -- short | recursive ) echo "Configuration of ld 2.26:";; -+ short | recursive ) echo "Configuration of ld 2.26.0:";; - esac - cat <<\_ACEOF - -@@ -1545,7 +1545,7 @@ fi - test -n "$ac_init_help" && exit $ac_status - if $ac_init_version; then - cat <<\_ACEOF --ld configure 2.26 -+ld configure 2.26.0 - generated by GNU Autoconf 2.64 - - Copyright (C) 2009 Free Software Foundation, Inc. -@@ -2254,7 +2254,7 @@ cat >config.log <<_ACEOF - This file contains any messages produced by compilers while - running configure, to aid debugging if configure makes a mistake. - --It was created by ld $as_me 2.26, which was -+It was created by ld $as_me 2.26.0, which was - generated by GNU Autoconf 2.64. Invocation command line was - - $ $0 $@ -@@ -4063,7 +4063,7 @@ fi - - # Define the identity of the package. - PACKAGE='ld' -- VERSION='2.26' -+ VERSION='2.26.0' - - - cat >>confdefs.h <<_ACEOF -@@ -17134,7 +17134,7 @@ do - fi - done - --if test x$ac_default_compressed_debug_sections == xyes ; then -+if test x$ac_default_compressed_debug_sections = xyes ; then - - $as_echo "#define DEFAULT_FLAG_COMPRESS_DEBUG 1" >>confdefs.h - -@@ -17740,7 +17740,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - # report actual input values of CONFIG_FILES etc. instead of their - # values after options handling. - ac_log=" --This file was extended by ld $as_me 2.26, which was -+This file was extended by ld $as_me 2.26.0, which was - generated by GNU Autoconf 2.64. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES -@@ -17804,7 +17804,7 @@ Report bugs to the package provider." - _ACEOF - cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_cs_version="\\ --ld config.status 2.26 -+ld config.status 2.26.0 - configured by $0, generated by GNU Autoconf 2.64, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" - -diff --git a/ld/configure.ac b/ld/configure.ac -index 188172d..e28f38e 100644 ---- a/ld/configure.ac -+++ b/ld/configure.ac -@@ -384,7 +384,7 @@ do - fi - done - --if test x$ac_default_compressed_debug_sections == xyes ; then -+if test x$ac_default_compressed_debug_sections = xyes ; then - AC_DEFINE(DEFAULT_FLAG_COMPRESS_DEBUG, 1, [Define if you want compressed debug sections by default.]) - fi - -diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em -index 0405d4f..809b27c 100644 ---- a/ld/emultempl/elf32.em -+++ b/ld/emultempl/elf32.em -@@ -1946,25 +1946,32 @@ gld${EMULATION_NAME}_place_orphan (asection *s, - return os; - } + {"lhbrx", X(31,790), X_MASK, COM, 0, {RT, RA0, RB}}, -+ flags = s->flags; -+ if (!bfd_link_relocatable (&link_info)) -+ { -+ nexts = s; -+ while ((nexts = bfd_get_next_section_by_name (nexts->owner, nexts)) -+ != NULL) -+ if (nexts->output_section == NULL -+ && (nexts->flags & SEC_EXCLUDE) == 0 -+ && ((nexts->flags ^ flags) & (SEC_LOAD | SEC_ALLOC)) == 0 -+ && (nexts->owner->flags & DYNAMIC) == 0 -+ && nexts->owner->usrdata != NULL -+ && !(((lang_input_statement_type *) nexts->owner->usrdata) -+ ->flags.just_syms) -+ && _bfd_elf_match_sections_by_type (nexts->owner, nexts, -+ s->owner, s)) -+ flags = (((flags ^ SEC_READONLY) -+ | (nexts->flags ^ SEC_READONLY)) -+ ^ SEC_READONLY); -+ } -+ - /* Decide which segment the section should go in based on the - section name and section flags. We put loadable .note sections - right after the .interp section, so that the PT_NOTE segment is - stored right after the program headers where the OS can read it - in the first page. */ - -- flags = s->flags; -- nexts = s; -- while ((nexts = bfd_get_next_section_by_name (nexts->owner, nexts)) != NULL) -- if (nexts->output_section == NULL -- && (nexts->flags & SEC_EXCLUDE) == 0 -- && ((nexts->flags ^ flags) & (SEC_LOAD | SEC_ALLOC)) == 0 -- && (nexts->owner->flags & DYNAMIC) == 0 -- && nexts->owner->usrdata != NULL -- && !(((lang_input_statement_type *) nexts->owner->usrdata) -- ->flags.just_syms) -- && _bfd_elf_match_sections_by_type (nexts->owner, nexts, s->owner, s)) -- flags = (((flags ^ SEC_READONLY) | (nexts->flags ^ SEC_READONLY)) -- ^ SEC_READONLY); - place = NULL; - if ((flags & (SEC_ALLOC | SEC_DEBUGGING)) == 0) - place = &hold[orphan_nonalloc]; -diff --git a/ld/emultempl/mmo.em b/ld/emultempl/mmo.em -index 8949aed..3a382ec 100644 ---- a/ld/emultempl/mmo.em -+++ b/ld/emultempl/mmo.em -@@ -107,22 +107,28 @@ mmo_place_orphan (asection *s, - return os; - } +-{"lfdpx", X(31,791), X_MASK, POWER6, POWER7, {FRTp, RA0, RB}}, ++{"lfdpx", X(31,791), X_MASK|Q_MASK, POWER6, POWER7, {FRTp, RA0, RB}}, + {"lfqx", X(31,791), X_MASK, POWER2, 0, {FRT, RA, RB}}, -+ flags = s->flags; -+ if (!bfd_link_relocatable (&link_info)) -+ { -+ nexts = s; -+ while ((nexts = bfd_get_next_section_by_name (nexts->owner, nexts)) -+ != NULL) -+ if (nexts->output_section == NULL -+ && (nexts->flags & SEC_EXCLUDE) == 0 -+ && ((nexts->flags ^ flags) & (SEC_LOAD | SEC_ALLOC)) == 0 -+ && (nexts->owner->flags & DYNAMIC) == 0 -+ && nexts->owner->usrdata != NULL -+ && !(((lang_input_statement_type *) nexts->owner->usrdata) -+ ->flags.just_syms)) -+ flags = (((flags ^ SEC_READONLY) | (nexts->flags ^ SEC_READONLY)) -+ ^ SEC_READONLY); -+ } -+ - /* Check for matching section type flags for sections we care about. - A section without contents can have SEC_LOAD == 0, but we still - want it attached to a sane section so the symbols appear as - expected. */ -- flags = s->flags; -- nexts = s; -- while ((nexts = bfd_get_next_section_by_name (nexts->owner, nexts)) != NULL) -- if (nexts->output_section == NULL -- && (nexts->flags & SEC_EXCLUDE) == 0 -- && ((nexts->flags ^ flags) & (SEC_LOAD | SEC_ALLOC)) == 0 -- && (nexts->owner->flags & DYNAMIC) == 0 -- && nexts->owner->usrdata != NULL -- && !(((lang_input_statement_type *) nexts->owner->usrdata) -- ->flags.just_syms)) -- flags = (((flags ^ SEC_READONLY) | (nexts->flags ^ SEC_READONLY)) -- ^ SEC_READONLY); -+ - if ((flags & (SEC_ALLOC | SEC_READONLY)) != SEC_READONLY) - for (i = 0; i < sizeof (holds) / sizeof (holds[0]); i++) - if ((flags & holds[i].nonzero_flags) != 0) -diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em -index 0370c5a..bddd9a8 100644 ---- a/ld/emultempl/pe.em -+++ b/ld/emultempl/pe.em -@@ -2225,21 +2225,27 @@ gld_${EMULATION_NAME}_place_orphan (asection *s, - orphan_init_done = 1; - } - -+ flags = s->flags; -+ if (!bfd_link_relocatable (&link_info)) -+ { -+ nexts = s; -+ while ((nexts = bfd_get_next_section_by_name (nexts->owner, -+ nexts))) -+ if (nexts->output_section == NULL -+ && (nexts->flags & SEC_EXCLUDE) == 0 -+ && ((nexts->flags ^ flags) & (SEC_LOAD | SEC_ALLOC)) == 0 -+ && (nexts->owner->flags & DYNAMIC) == 0 -+ && nexts->owner->usrdata != NULL -+ && !(((lang_input_statement_type *) nexts->owner->usrdata) -+ ->flags.just_syms)) -+ flags = (((flags ^ SEC_READONLY) -+ | (nexts->flags ^ SEC_READONLY)) -+ ^ SEC_READONLY); -+ } -+ - /* Try to put the new output section in a reasonable place based - on the section name and section flags. */ - -- flags = s->flags; -- nexts = s; -- while ((nexts = bfd_get_next_section_by_name (nexts->owner, nexts))) -- if (nexts->output_section == NULL -- && (nexts->flags & SEC_EXCLUDE) == 0 -- && ((nexts->flags ^ flags) & (SEC_LOAD | SEC_ALLOC)) == 0 -- && (nexts->owner->flags & DYNAMIC) == 0 -- && nexts->owner->usrdata != NULL -- && !(((lang_input_statement_type *) nexts->owner->usrdata) -- ->flags.just_syms)) -- flags = (((flags ^ SEC_READONLY) | (nexts->flags ^ SEC_READONLY)) -- ^ SEC_READONLY); - place = NULL; - if ((flags & SEC_ALLOC) == 0) - ; -diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em -index 91de501..5ddeffc 100644 ---- a/ld/emultempl/pep.em -+++ b/ld/emultempl/pep.em -@@ -1996,21 +1996,27 @@ gld_${EMULATION_NAME}_place_orphan (asection *s, - orphan_init_done = 1; - } - -+ flags = s->flags; -+ if (!bfd_link_relocatable (&link_info)) -+ { -+ nexts = s; -+ while ((nexts = bfd_get_next_section_by_name (nexts->owner, -+ nexts))) -+ if (nexts->output_section == NULL -+ && (nexts->flags & SEC_EXCLUDE) == 0 -+ && ((nexts->flags ^ flags) & (SEC_LOAD | SEC_ALLOC)) == 0 -+ && (nexts->owner->flags & DYNAMIC) == 0 -+ && nexts->owner->usrdata != NULL -+ && !(((lang_input_statement_type *) nexts->owner->usrdata) -+ ->flags.just_syms)) -+ flags = (((flags ^ SEC_READONLY) -+ | (nexts->flags ^ SEC_READONLY)) -+ ^ SEC_READONLY); -+ } -+ - /* Try to put the new output section in a reasonable place based - on the section name and section flags. */ - -- flags = s->flags; -- nexts = s; -- while ((nexts = bfd_get_next_section_by_name (nexts->owner, nexts))) -- if (nexts->output_section == NULL -- && (nexts->flags & SEC_EXCLUDE) == 0 -- && ((nexts->flags ^ flags) & (SEC_LOAD | SEC_ALLOC)) == 0 -- && (nexts->owner->flags & DYNAMIC) == 0 -- && nexts->owner->usrdata != NULL -- && !(((lang_input_statement_type *) nexts->owner->usrdata) -- ->flags.just_syms)) -- flags = (((flags ^ SEC_READONLY) | (nexts->flags ^ SEC_READONLY)) -- ^ SEC_READONLY); - place = NULL; - if ((flags & SEC_ALLOC) == 0) - ; -diff --git a/ld/ld.texinfo b/ld/ld.texinfo -index 1dd7492..2389661 100644 ---- a/ld/ld.texinfo -+++ b/ld/ld.texinfo -@@ -1325,15 +1325,21 @@ libraries. - When creating a shared library, bind references to global symbols to the - definition within the shared library, if any. Normally, it is possible - for a program linked against a shared library to override the definition --within the shared library. This option is only meaningful on ELF --platforms which support shared libraries. -+within the shared library. This option can also be used with the -+@option{--export-dynamic} option, when creating a position independent -+executable, to bind references to global symbols to the definition within -+the executable. This option is only meaningful on ELF platforms which -+support shared libraries and position independent executables. - - @kindex -Bsymbolic-functions - @item -Bsymbolic-functions - When creating a shared library, bind references to global function - symbols to the definition within the shared library, if any. -+This option can also be used with the @option{--export-dynamic} option, -+when creating a position independent executable, to bind references -+to global function symbols to the definition within the executable. - This option is only meaningful on ELF platforms which support shared --libraries. -+libraries and position independent executables. - - @kindex --dynamic-list=@var{dynamic-list-file} - @item --dynamic-list=@var{dynamic-list-file} -diff --git a/ld/lexsup.c b/ld/lexsup.c -index 4cad209..e2fb212 100644 ---- a/ld/lexsup.c -+++ b/ld/lexsup.c -@@ -1586,15 +1586,14 @@ parse_args (unsigned argc, char **argv) - /* We may have -Bsymbolic, -Bsymbolic-functions, --dynamic-list-data, - --dynamic-list-cpp-new, --dynamic-list-cpp-typeinfo and - --dynamic-list FILE. -Bsymbolic and -Bsymbolic-functions are -- for shared libraries. -Bsymbolic overrides all others and vice -- versa. */ -+ for PIC outputs. -Bsymbolic overrides all others and vice versa. */ - switch (command_line.symbolic) - { - case symbolic_unset: - break; - case symbolic: -- /* -Bsymbolic is for shared library only. */ -- if (bfd_link_dll (&link_info)) -+ /* -Bsymbolic is for PIC output only. */ -+ if (bfd_link_pic (&link_info)) - { - link_info.symbolic = TRUE; - /* Should we free the unused memory? */ -@@ -1603,8 +1602,8 @@ parse_args (unsigned argc, char **argv) - } - break; - case symbolic_functions: -- /* -Bsymbolic-functions is for shared library only. */ -- if (bfd_link_dll (&link_info)) -+ /* -Bsymbolic-functions is for PIC output only. */ -+ if (bfd_link_pic (&link_info)) - command_line.dynamic_list = dynamic_list_data; - break; - } -diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog -index cb51928..d09a332 100644 ---- a/ld/testsuite/ChangeLog -+++ b/ld/testsuite/ChangeLog -@@ -117,12 +117,12 @@ - * ld-x86-64/plt-main3.rd: Also check GOTPCRELX. - - 2015-10-29 Catherine Moore <clm@codesourcery.com> -- -- * ld-mips-elf/mips16-fp-stub-1.s: New. -- * ld-mips-elf/mips16-fp-stub-2.s: New. -- * ld-mips-elf/mips16-fp-stub.d: New. -- * ld-mips-elf/mips-elf.exp: Run new tests. -- * ld-mips-elf/mips16-intermix.d: Update expected output. -+ -+ * ld-mips-elf/mips16-fp-stub-1.s: New. -+ * ld-mips-elf/mips16-fp-stub-2.s: New. -+ * ld-mips-elf/mips16-fp-stub.d: New. -+ * ld-mips-elf/mips-elf.exp: Run new tests. -+ * ld-mips-elf/mips16-intermix.d: Update expected output. - - 2015-10-28 H.J. Lu <hongjiu.lu@intel.com> - -@@ -133,7 +133,7 @@ - * ld-x86-64/pr19162b.s: Likewise. - - 2015-10-27 Laurent Alfonsi <laurent.alfonsi@st.com> -- Christophe Monat <christophe.monat@st.com> -+ Christophe Monat <christophe.monat@st.com> - - * ld-arm/arm-elf.exp (armelftests_common): Add STM32L4XX - tests. -@@ -1069,7 +1069,6 @@ - - 2015-05-28 Catherine Moore <clm@codesourcery.com> - -- ld/testsuite/ - * ld-mips-elf/compact-eh.ld: New linker script. - * ld-mips-elf/compact-eh1.d: New. - * ld-mips-elf/compact-eh1.s: New. -diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp -index 0e5b31e..576cc65 100644 ---- a/ld/testsuite/ld-aarch64/aarch64-elf.exp -+++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp -@@ -170,7 +170,6 @@ run_dump_test "pcrel_pic_defined_local" - - run_dump_test "limit-b" - run_dump_test "limit-bl" --run_dump_test "farcall-section" - run_dump_test "farcall-back" - run_dump_test "farcall-b-defsym" - run_dump_test "farcall-bl-defsym" -@@ -181,6 +180,8 @@ run_dump_test "farcall-bl" - run_dump_test "farcall-b" - run_dump_test "farcall-b-none-function" - run_dump_test "farcall-bl-none-function" -+run_dump_test "farcall-b-section" -+run_dump_test "farcall-bl-section" - - run_dump_test "tls-relax-all" - run_dump_test "tls-relax-gd-le" -diff --git a/ld/testsuite/ld-aarch64/farcall-b-none-function.d b/ld/testsuite/ld-aarch64/farcall-b-none-function.d -index 34a6568..ba2981f 100644 ---- a/ld/testsuite/ld-aarch64/farcall-b-none-function.d -+++ b/ld/testsuite/ld-aarch64/farcall-b-none-function.d -@@ -2,4 +2,23 @@ - #source: farcall-b-none-function.s - #as: - #ld: -Ttext 0x1000 --section-start .foo=0x8001000 --#error: .*\(.text\+0x0\): relocation truncated to fit: R_AARCH64_JUMP26 against symbol `bar'.* -+#objdump: -dr -+#... -+ -+Disassembly of section .text: -+ -+.* <_start>: -+ 1000: 14000003 b 100c <__bar_veneer> -+ 1004: d65f03c0 ret -+ 1008: 14000007 b 1024 <__bar_veneer\+0x18> -+ -+.* <__bar_veneer>: -+ 100c: 90040010 adrp x16, 8001000 <bar> -+ 1010: 91000210 add x16, x16, #0x0 -+ 1014: d61f0200 br x16 -+ ... -+ -+Disassembly of section .foo: -+ -+.* <bar>: -+ 8001000: d65f03c0 ret -diff --git a/ld/testsuite/ld-aarch64/farcall-b-section.d b/ld/testsuite/ld-aarch64/farcall-b-section.d -new file mode 100644 -index 0000000..4745c0f ---- /dev/null -+++ b/ld/testsuite/ld-aarch64/farcall-b-section.d -@@ -0,0 +1,34 @@ -+#name: aarch64-farcall-b-section -+#source: farcall-b-section.s -+#as: -+#ld: -Ttext 0x1000 --section-start .foo=0x8001000 -+#objdump: -dr -+#... -+ -+Disassembly of section .text: -+ -+.* <_start>: -+ 1000: 14000008 b 1020 <___veneer> -+ 1004: 14000003 b 1010 <___veneer> -+ 1008: d65f03c0 ret -+ 100c: 1400000d b 1040 <___veneer\+0x20> -+ -+.* <___veneer>: -+ 1010: 90040010 adrp x16, 8001000 <bar> -+ 1014: 91001210 add x16, x16, #0x4 -+ 1018: d61f0200 br x16 -+ 101c: 00000000 .inst 0x00000000 ; undefined -+ -+.* <___veneer>: -+ 1020: 90040010 adrp x16, 8001000 <bar> -+ 1024: 91000210 add x16, x16, #0x0 -+ 1028: d61f0200 br x16 -+ ... -+ -+Disassembly of section .foo: -+ -+.* <bar>: -+ 8001000: d65f03c0 ret -+ -+.* <bar2>: -+ 8001004: d65f03c0 ret -diff --git a/ld/testsuite/ld-aarch64/farcall-b-section.s b/ld/testsuite/ld-aarch64/farcall-b-section.s -new file mode 100644 -index 0000000..1a135ef ---- /dev/null -+++ b/ld/testsuite/ld-aarch64/farcall-b-section.s -@@ -0,0 +1,20 @@ -+.global _start -+ -+# We will place the section .text at 0x1000. -+ -+ .text -+ -+_start: -+ b bar -+ b bar2 -+ ret -+ -+# We will place the section .foo at 0x8001000. -+ -+ .section .foo, "xa" -+ .type bar, @function -+bar: -+ ret -+ .type bar2, @function -+bar2: -+ ret -diff --git a/ld/testsuite/ld-aarch64/farcall-bl-none-function.d b/ld/testsuite/ld-aarch64/farcall-bl-none-function.d -index 6ce9ca4..b6a4dda 100644 ---- a/ld/testsuite/ld-aarch64/farcall-bl-none-function.d -+++ b/ld/testsuite/ld-aarch64/farcall-bl-none-function.d -@@ -2,4 +2,23 @@ - #source: farcall-bl-none-function.s - #as: - #ld: -Ttext 0x1000 --section-start .foo=0x8001000 --#error: .*\(.text\+0x0\): relocation truncated to fit: R_AARCH64_CALL26 against symbol `bar'.* -+#objdump: -dr -+#... -+ -+Disassembly of section .text: -+ -+.* <_start>: -+ 1000: 94000003 bl 100c <__bar_veneer> -+ 1004: d65f03c0 ret -+ 1008: 14000007 b 1024 <__bar_veneer\+0x18> -+ -+.* <__bar_veneer>: -+ 100c: 90040010 adrp x16, 8001000 <bar> -+ 1010: 91000210 add x16, x16, #0x0 -+ 1014: d61f0200 br x16 -+ ... -+ -+Disassembly of section .foo: -+ -+.* <bar>: -+ 8001000: d65f03c0 ret -diff --git a/ld/testsuite/ld-aarch64/farcall-bl-section.d b/ld/testsuite/ld-aarch64/farcall-bl-section.d -new file mode 100644 -index 0000000..2bd4f85 ---- /dev/null -+++ b/ld/testsuite/ld-aarch64/farcall-bl-section.d -@@ -0,0 +1,34 @@ -+#name: aarch64-farcall-bl-section -+#source: farcall-bl-section.s -+#as: -+#ld: -Ttext 0x1000 --section-start .foo=0x8001000 -+#objdump: -dr -+#... -+ -+Disassembly of section .text: -+ -+.* <_start>: -+ 1000: 94000008 bl 1020 <___veneer> -+ 1004: 94000003 bl 1010 <___veneer> -+ 1008: d65f03c0 ret -+ 100c: 1400000d b 1040 <___veneer\+0x20> -+ -+.* <___veneer>: -+ 1010: 90040010 adrp x16, 8001000 <bar> -+ 1014: 91001210 add x16, x16, #0x4 -+ 1018: d61f0200 br x16 -+ 101c: 00000000 .inst 0x00000000 ; undefined -+ -+.* <___veneer>: -+ 1020: 90040010 adrp x16, 8001000 <bar> -+ 1024: 91000210 add x16, x16, #0x0 -+ 1028: d61f0200 br x16 -+ ... -+ -+Disassembly of section .foo: -+ -+.* <bar>: -+ 8001000: d65f03c0 ret -+ -+.* <bar2>: -+ 8001004: d65f03c0 ret -diff --git a/ld/testsuite/ld-aarch64/farcall-bl-section.s b/ld/testsuite/ld-aarch64/farcall-bl-section.s -new file mode 100644 -index 0000000..4469d4d ---- /dev/null -+++ b/ld/testsuite/ld-aarch64/farcall-bl-section.s -@@ -0,0 +1,20 @@ -+ .global _start -+ -+# We will place the section .text at 0x1000. -+ -+ .text -+ -+_start: -+ bl bar -+ bl bar2 -+ ret -+ -+# We will place the section .foo at 0x8001000. -+ -+ .section .foo, "xa" -+ .type bar, @function -+bar: -+ ret -+ .type bar2, @function -+bar2: -+ ret -diff --git a/ld/testsuite/ld-aarch64/farcall-section.d b/ld/testsuite/ld-aarch64/farcall-section.d -deleted file mode 100644 -index 85775e1..0000000 ---- a/ld/testsuite/ld-aarch64/farcall-section.d -+++ /dev/null -@@ -1,5 +0,0 @@ --#name: Aarch64 farcall to symbol of type STT_SECTION --#source: farcall-section.s --#as: --#ld: -Ttext 0x1000 --section-start .foo=0x8001014 --#error: .*\(.text\+0x0\): relocation truncated to fit: R_AARCH64_CALL26 against `.foo' -diff --git a/ld/testsuite/ld-aarch64/farcall-section.s b/ld/testsuite/ld-aarch64/farcall-section.s -deleted file mode 100644 -index 86a070c..0000000 ---- a/ld/testsuite/ld-aarch64/farcall-section.s -+++ /dev/null -@@ -1,19 +0,0 @@ --# Test to ensure that an Aarch64 call exceeding 128MB generates an error --# if the destination is of type STT_SECTION (eg non-global symbol) -- -- .global _start -- --# We will place the section .text at 0x1000. -- -- .text -- --_start: -- bl bar -- --# We will place the section .foo at 0x8001020. -- -- .section .foo, "xa" -- --bar: -- ret -- -diff --git a/ld/testsuite/ld-elf/gabiend.rt b/ld/testsuite/ld-elf/gabiend.rt -index 23bc36c..75b5ba7 100644 ---- a/ld/testsuite/ld-elf/gabiend.rt -+++ b/ld/testsuite/ld-elf/gabiend.rt -@@ -1,4 +1,4 @@ - #... - +\[[0-9a-f]+\]: .*COMPRESSED -- +ZLIB, [0-9a-f]+, 1 -+ +ZLIB, [0-9a-f]+, [1-9][0-9]* - #pass -diff --git a/ld/testsuite/ld-elf/gabinormal.rt b/ld/testsuite/ld-elf/gabinormal.rt -index 23bc36c..75b5ba7 100644 ---- a/ld/testsuite/ld-elf/gabinormal.rt -+++ b/ld/testsuite/ld-elf/gabinormal.rt -@@ -1,4 +1,4 @@ - #... - +\[[0-9a-f]+\]: .*COMPRESSED -- +ZLIB, [0-9a-f]+, 1 -+ +ZLIB, [0-9a-f]+, [1-9][0-9]* - #pass -diff --git a/ld/testsuite/ld-elf/indirect.exp b/ld/testsuite/ld-elf/indirect.exp -index e8ac1ae..25845a0 100644 ---- a/ld/testsuite/ld-elf/indirect.exp -+++ b/ld/testsuite/ld-elf/indirect.exp -@@ -66,7 +66,11 @@ if { ![ld_compile $CC $srcdir/$subdir/indirect1a.c tmpdir/indirect1a.o] - || ![ld_compile $CC $srcdir/$subdir/indirect4a.c tmpdir/indirect4a.o] - || ![ld_compile $CC $srcdir/$subdir/indirect4b.c tmpdir/indirect4b.o] - || ![ld_compile "$CC -O2 -fPIC -I../bfd" $srcdir/$subdir/pr18720a.c tmpdir/pr18720a.o] -- || ![ld_compile $CC $srcdir/$subdir/pr18720b.c tmpdir/pr18720b.o] } { -+ || ![ld_compile $CC $srcdir/$subdir/pr18720b.c tmpdir/pr18720b.o] -+ || ![ld_compile "$CC -fPIC" $srcdir/$subdir/pr19553d.c tmpdir/pr19553d.o] -+ || ![ld_compile "$CC -fPIC" $srcdir/$subdir/pr19553c.c tmpdir/pr19553c.o] -+ || ![ld_compile "$CC -fPIC" $srcdir/$subdir/pr19553b.c tmpdir/pr19553b.o] -+ || ![ld_compile $CC $srcdir/$subdir/pr19553a.c tmpdir/pr19553a.o] } { - unresolved "Indirect symbol tests" - return - } -@@ -87,6 +91,15 @@ set build_tests { - {"Build pr18720b1.o" - "-r -nostdlib tmpdir/pr18720b.o" "" - {dummy.c} {} "pr18720b1.o"} -+ {"Build libpr19553b.so" -+ "-shared -Wl,--version-script=pr19553.map" "-fPIC" -+ {pr19553b.c} {} "libpr19553b.so"} -+ {"Build libpr19553c.so" -+ "-shared -Wl,--version-script=pr19553.map" "-fPIC" -+ {pr19553c.c} {} "libpr19553c.so"} -+ {"Build libpr19553d.so" -+ "-shared tmpdir/libpr19553c.so" "-fPIC" -+ {pr19553d.c} {} "libpr19553d.so"} - } + {"sraw", XRC(31,792,0), X_MASK, PPCCOM, 0, {RA, RS, RB}}, +@@ -6167,7 +6279,7 @@ const struct powerpc_opcode powerpc_opcodes[] = { - run_cc_link_tests $build_tests -@@ -155,6 +168,15 @@ set run_tests { - {"Run with libpr18720c.so 5" - "tmpdir/libpr18720c.so tmpdir/pr18720b1.o tmpdir/pr18720a.o" "" - {check-ptr-eq.c} "pr18720d" "pr18720.out"} -+ {"Run with libpr19553b.so" -+ "tmpdir/libpr19553b.so tmpdir/libpr19553d.so -rpath-link ." "" -+ {pr19553a.c} "pr19553b" "pr19553b.out"} -+ {"Run with libpr19553c.so" -+ "tmpdir/libpr19553c.so tmpdir/libpr19553b.so tmpdir/libpr19553d.so" "" -+ {pr19553a.c} "pr19553c" "pr19553c.out"} -+ {"Run with libpr19553d.so" -+ "tmpdir/libpr19553d.so tmpdir/libpr19553b.so -rpath-link ." "" -+ {pr19553a.c} "pr19553d" "pr19553d.out"} - } + {"sthbrx", X(31,918), X_MASK, COM, 0, {RS, RA0, RB}}, - run_ld_link_exec_tests [] $run_tests -diff --git a/ld/testsuite/ld-elf/pr19539.d b/ld/testsuite/ld-elf/pr19539.d -new file mode 100644 -index 0000000..87c2b1b ---- /dev/null -+++ b/ld/testsuite/ld-elf/pr19539.d -@@ -0,0 +1,9 @@ -+#source: start.s -+#source: pr19539.s -+#ld: -pie -T pr19539.t -+#readelf : --dyn-syms --wide -+#target: *-*-linux* *-*-gnu* *-*-solaris* -+#notarget: cris*-*-* -+ -+Symbol table '\.dynsym' contains [0-9]+ entries: -+#pass -diff --git a/ld/testsuite/ld-elf/pr19539.s b/ld/testsuite/ld-elf/pr19539.s -new file mode 100644 -index 0000000..0f55d3f ---- /dev/null -+++ b/ld/testsuite/ld-elf/pr19539.s -@@ -0,0 +1,2 @@ -+ .section .prefix,"a",%progbits -+ .dc.a foo -diff --git a/ld/testsuite/ld-elf/pr19539.t b/ld/testsuite/ld-elf/pr19539.t -new file mode 100644 -index 0000000..b6b48e7 ---- /dev/null -+++ b/ld/testsuite/ld-elf/pr19539.t -@@ -0,0 +1 @@ -+HIDDEN (foo = .); -diff --git a/ld/testsuite/ld-elf/pr19553.map b/ld/testsuite/ld-elf/pr19553.map -new file mode 100644 -index 0000000..f2c03ac ---- /dev/null -+++ b/ld/testsuite/ld-elf/pr19553.map -@@ -0,0 +1,5 @@ -+FOO -+{ -+global: -+ foo; -+}; -diff --git a/ld/testsuite/ld-elf/pr19553a.c b/ld/testsuite/ld-elf/pr19553a.c -new file mode 100644 -index 0000000..f1cb6b4 ---- /dev/null -+++ b/ld/testsuite/ld-elf/pr19553a.c -@@ -0,0 +1,8 @@ -+extern void foo (void); -+ -+int -+main (void) -+{ -+ foo (); -+ return 0; -+} -diff --git a/ld/testsuite/ld-elf/pr19553b.c b/ld/testsuite/ld-elf/pr19553b.c -new file mode 100644 -index 0000000..0c438a2 ---- /dev/null -+++ b/ld/testsuite/ld-elf/pr19553b.c -@@ -0,0 +1,8 @@ -+#include <stdio.h> -+ -+__attribute__ ((weak)) -+void -+foo (void) -+{ -+ printf ("pr19553b\n"); -+} -diff --git a/ld/testsuite/ld-elf/pr19553b.out b/ld/testsuite/ld-elf/pr19553b.out -new file mode 100644 -index 0000000..a5575d9 ---- /dev/null -+++ b/ld/testsuite/ld-elf/pr19553b.out -@@ -0,0 +1 @@ -+pr19553b -diff --git a/ld/testsuite/ld-elf/pr19553c.c b/ld/testsuite/ld-elf/pr19553c.c -new file mode 100644 -index 0000000..d80dfc9 ---- /dev/null -+++ b/ld/testsuite/ld-elf/pr19553c.c -@@ -0,0 +1,9 @@ -+#include <stdio.h> -+ -+void -+foo (void) -+{ -+ printf ("pr19553c\n"); -+} -+ -+asm (".symver foo,foo@FOO"); -diff --git a/ld/testsuite/ld-elf/pr19553c.out b/ld/testsuite/ld-elf/pr19553c.out -new file mode 100644 -index 0000000..9d23215 ---- /dev/null -+++ b/ld/testsuite/ld-elf/pr19553c.out -@@ -0,0 +1 @@ -+pr19553c -diff --git a/ld/testsuite/ld-elf/pr19553d.c b/ld/testsuite/ld-elf/pr19553d.c -new file mode 100644 -index 0000000..d48f8f3 ---- /dev/null -+++ b/ld/testsuite/ld-elf/pr19553d.c -@@ -0,0 +1,8 @@ -+#include <stdio.h> -+ -+__attribute__ ((weak)) -+void -+foo (void) -+{ -+ printf ("pr19553d\n"); -+} -diff --git a/ld/testsuite/ld-elf/pr19553d.out b/ld/testsuite/ld-elf/pr19553d.out -new file mode 100644 -index 0000000..2b4cf0b ---- /dev/null -+++ b/ld/testsuite/ld-elf/pr19553d.out -@@ -0,0 +1 @@ -+pr19553d -diff --git a/ld/testsuite/ld-elf/pr19579a.c b/ld/testsuite/ld-elf/pr19579a.c -new file mode 100644 -index 0000000..e4a6eb1 ---- /dev/null -+++ b/ld/testsuite/ld-elf/pr19579a.c -@@ -0,0 +1,15 @@ -+#include <stdio.h> -+ -+int foo[1]; -+int bar[2]; -+ -+extern int *foo_p (void); -+extern int *bar_p (void); -+ -+int -+main () -+{ -+ if (foo[0] == 0 && foo == foo_p () && bar[0] == 0 && bar == bar_p ()) -+ printf ("PASS\n"); -+ return 0; -+} -diff --git a/ld/testsuite/ld-elf/pr19579b.c b/ld/testsuite/ld-elf/pr19579b.c -new file mode 100644 -index 0000000..d906545 ---- /dev/null -+++ b/ld/testsuite/ld-elf/pr19579b.c -@@ -0,0 +1,14 @@ -+int foo[2]; -+int bar[2] = { -1, -1 }; -+ -+int * -+foo_p (void) -+{ -+ return foo; -+} -+ -+int * -+bar_p (void) -+{ -+ return bar; -+} -diff --git a/ld/testsuite/ld-elf/pr19698.d b/ld/testsuite/ld-elf/pr19698.d -new file mode 100644 -index 0000000..a39f67a ---- /dev/null -+++ b/ld/testsuite/ld-elf/pr19698.d -@@ -0,0 +1,10 @@ -+#ld: -shared $srcdir/$subdir/pr19698.t -+#readelf : --dyn-syms --wide -+#target: *-*-linux* *-*-gnu* *-*-solaris* -+ -+Symbol table '\.dynsym' contains [0-9]+ entries: -+#... -+ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +GLOBAL +DEFAULT +[0-9]+ +foo@VERS.1 -+#... -+ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +GLOBAL +DEFAULT +[0-9]+ +foo@@VERS.2 -+#pass -diff --git a/ld/testsuite/ld-elf/pr19698.s b/ld/testsuite/ld-elf/pr19698.s -new file mode 100644 -index 0000000..875dca4 ---- /dev/null -+++ b/ld/testsuite/ld-elf/pr19698.s -@@ -0,0 +1,5 @@ -+ .text -+ .globl foo -+ .type foo, %function -+foo: -+ .byte 0 -diff --git a/ld/testsuite/ld-elf/pr19698.t b/ld/testsuite/ld-elf/pr19698.t -new file mode 100644 -index 0000000..09d9125 ---- /dev/null -+++ b/ld/testsuite/ld-elf/pr19698.t -@@ -0,0 +1,11 @@ -+"foo@VERS.1" = foo; -+ -+VERSION { -+VERS.2 { -+ global: -+ foo; -+}; -+ -+VERS.1 { -+}; -+} -diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp -index 731eef3..b8c12cb 100644 ---- a/ld/testsuite/ld-elf/shared.exp -+++ b/ld/testsuite/ld-elf/shared.exp -@@ -524,6 +524,21 @@ if { [istarget *-*-linux*] - {} \ - "libpr2404b.a" \ - ] \ -+ [list \ -+ "Build pr19579a.o" \ -+ "" "-fPIE" \ -+ {pr19579a.c} \ -+ {} \ -+ "libpr19579a.a" \ -+ ] \ -+ [list \ -+ "Build libpr19579.so" \ -+ "-shared" \ -+ "-fPIC" \ -+ {pr19579b.c} \ -+ {} \ -+ "libpr19579.so" \ -+ ] \ - ] - run_ld_link_exec_tests [] [list \ - [list \ -@@ -580,5 +595,14 @@ if { [istarget *-*-linux*] - "pass.out" \ - "-O2 -fPIC -I../bfd" \ - ] \ -+ [list \ -+ "Run pr19579" \ -+ "-pie -z text tmpdir/pr19579a.o tmpdir/libpr19579.so" \ -+ "" \ -+ {dummy.c} \ -+ "pr19579" \ -+ "pass.out" \ -+ "-fPIE" \ -+ ] \ - ] - } -diff --git a/ld/testsuite/ld-i386/branch1.d b/ld/testsuite/ld-i386/branch1.d -index a078f1d..81b069e 100644 ---- a/ld/testsuite/ld-i386/branch1.d -+++ b/ld/testsuite/ld-i386/branch1.d -@@ -1,4 +1,4 @@ --#as: --32 -+#as: --32 -mrelax-relocations=yes - #ld: -melf_i386 - #objdump: -dw - -diff --git a/ld/testsuite/ld-i386/call1.d b/ld/testsuite/ld-i386/call1.d -index 69383b2..e3ebedc 100644 ---- a/ld/testsuite/ld-i386/call1.d -+++ b/ld/testsuite/ld-i386/call1.d -@@ -1,3 +1,3 @@ --#as: --32 -+#as: --32 -mrelax-relocations=yes - #ld: -shared -melf_i386 - #error: direct GOT relocation R_386_GOT32X against `foo' without base register can not be used when making a shared object -diff --git a/ld/testsuite/ld-i386/call2.d b/ld/testsuite/ld-i386/call2.d -index 69383b2..e3ebedc 100644 ---- a/ld/testsuite/ld-i386/call2.d -+++ b/ld/testsuite/ld-i386/call2.d -@@ -1,3 +1,3 @@ --#as: --32 -+#as: --32 -mrelax-relocations=yes - #ld: -shared -melf_i386 - #error: direct GOT relocation R_386_GOT32X against `foo' without base register can not be used when making a shared object -diff --git a/ld/testsuite/ld-i386/call3a.d b/ld/testsuite/ld-i386/call3a.d -index a8ff27f..5a1e1df 100644 ---- a/ld/testsuite/ld-i386/call3a.d -+++ b/ld/testsuite/ld-i386/call3a.d -@@ -1,5 +1,5 @@ - #source: call3.s --#as: --32 -+#as: --32 -mrelax-relocations=yes - #ld: -melf_i386 - #objdump: -dw - -diff --git a/ld/testsuite/ld-i386/call3b.d b/ld/testsuite/ld-i386/call3b.d -index 06af6f5..de98ce4 100644 ---- a/ld/testsuite/ld-i386/call3b.d -+++ b/ld/testsuite/ld-i386/call3b.d -@@ -1,5 +1,5 @@ - #source: call3.s --#as: --32 -+#as: --32 -mrelax-relocations=yes - #ld: -melf_i386 -z call-nop=prefix-addr - #objdump: -dw - -diff --git a/ld/testsuite/ld-i386/call3c.d b/ld/testsuite/ld-i386/call3c.d -index 64e8372..0fdbee4 100644 ---- a/ld/testsuite/ld-i386/call3c.d -+++ b/ld/testsuite/ld-i386/call3c.d -@@ -1,5 +1,5 @@ - #source: call3.s --#as: --32 -+#as: --32 -mrelax-relocations=yes - #ld: -melf_i386 -z call-nop=prefix-nop - #objdump: -dw - -diff --git a/ld/testsuite/ld-i386/call3d.d b/ld/testsuite/ld-i386/call3d.d -index a9274c8..4d965b3 100644 ---- a/ld/testsuite/ld-i386/call3d.d -+++ b/ld/testsuite/ld-i386/call3d.d -@@ -1,5 +1,5 @@ - #source: call3.s --#as: --32 -+#as: --32 -mrelax-relocations=yes - #ld: -melf_i386 -z call-nop=suffix-nop - #objdump: -dw - -diff --git a/ld/testsuite/ld-i386/call3e.d b/ld/testsuite/ld-i386/call3e.d -index 2876b49..608682c 100644 ---- a/ld/testsuite/ld-i386/call3e.d -+++ b/ld/testsuite/ld-i386/call3e.d -@@ -1,5 +1,5 @@ - #source: call3.s --#as: --32 -+#as: --32 -mrelax-relocations=yes - #ld: -melf_i386 -z call-nop=prefix-0x67 - #objdump: -dw - -diff --git a/ld/testsuite/ld-i386/call3f.d b/ld/testsuite/ld-i386/call3f.d -index 5ab0cf1..f3a4869 100644 ---- a/ld/testsuite/ld-i386/call3f.d -+++ b/ld/testsuite/ld-i386/call3f.d -@@ -1,5 +1,5 @@ - #source: call3.s --#as: --32 -+#as: --32 -mrelax-relocations=yes - #ld: -melf_i386 -z call-nop=prefix-0x90 - #objdump: -dw - -diff --git a/ld/testsuite/ld-i386/call3g.d b/ld/testsuite/ld-i386/call3g.d -index 8287770..f3e3f36 100644 ---- a/ld/testsuite/ld-i386/call3g.d -+++ b/ld/testsuite/ld-i386/call3g.d -@@ -1,5 +1,5 @@ - #source: call3.s --#as: --32 -+#as: --32 -mrelax-relocations=yes - #ld: -melf_i386 -z call-nop=suffix-0x90 - #objdump: -dw - -diff --git a/ld/testsuite/ld-i386/call3h.d b/ld/testsuite/ld-i386/call3h.d -index 83f371a..afd1ce8 100644 ---- a/ld/testsuite/ld-i386/call3h.d -+++ b/ld/testsuite/ld-i386/call3h.d -@@ -1,5 +1,5 @@ - #source: call3.s --#as: --32 -+#as: --32 -mrelax-relocations=yes - #ld: -melf_i386 -z call-nop=suffix-144 - #objdump: -dw - -diff --git a/ld/testsuite/ld-i386/got1.dd b/ld/testsuite/ld-i386/got1.dd -index e46153d..e6e82de 100644 ---- a/ld/testsuite/ld-i386/got1.dd -+++ b/ld/testsuite/ld-i386/got1.dd -@@ -10,6 +10,8 @@ - [ ]*[a-f0-9]+: ff d0 call \*%eax - [ ]*[a-f0-9]+: [ a-f0-9]+ mov *0x[a-f0-9]+,%eax - [ ]*[a-f0-9]+: ff d0 call \*%eax -+[ ]*[a-f0-9]+: [ a-f0-9]+ call [a-f0-9]+ <__x86.get_pc_thunk.cx> -+[ ]*[a-f0-9]+: [ a-f0-9]+ add \$0x[a-f0-9]+,%ecx - [ ]*[a-f0-9]+: [ a-f0-9]+ lea *0x[a-f0-9]+,%ecx - [ ]*[a-f0-9]+: ff d1 call \*%ecx - [ ]*[a-f0-9]+: 83 ec 0c sub \$0xc,%esp -diff --git a/ld/testsuite/ld-i386/got1a.S b/ld/testsuite/ld-i386/got1a.S -index f3d5330..7a3f7b5 100644 ---- a/ld/testsuite/ld-i386/got1a.S -+++ b/ld/testsuite/ld-i386/got1a.S -@@ -12,10 +12,19 @@ main: - call *%eax - movl plt@GOT, %eax - call *%eax -- movl foo@GOT(%ebx), %ecx -+ call __x86.get_pc_thunk.cx -+ addl $_GLOBAL_OFFSET_TABLE_, %ecx -+ movl foo@GOT(%ecx), %ecx - call *%ecx - subl $12, %esp - pushl $0 - pushl $0 # Push a dummy return address onto stack. - jmp *myexit@GOT - .size main, .-main -+ .section .text.__x86.get_pc_thunk.cx,"axG",@progbits,__x86.get_pc_thunk.cx,comdat -+ .globl __x86.get_pc_thunk.cx -+ .hidden __x86.get_pc_thunk.cx -+ .type __x86.get_pc_thunk.cx, @function -+__x86.get_pc_thunk.cx: -+ movl (%esp), %ecx -+ ret -diff --git a/ld/testsuite/ld-i386/got1d.S b/ld/testsuite/ld-i386/got1d.S -index a6d51c6..7e4c9b1 100644 ---- a/ld/testsuite/ld-i386/got1d.S -+++ b/ld/testsuite/ld-i386/got1d.S -@@ -19,7 +19,6 @@ plt: - pushl %esi - pushl %ebx - call __x86.get_pc_thunk.bx --1: - addl $_GLOBAL_OFFSET_TABLE_, %ebx - subl $20, %esp - leal __FUNCTION__.1866@GOTOFF(%ebx), %esi -diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp -index fb1d3ea..1916c24 100644 ---- a/ld/testsuite/ld-i386/i386.exp -+++ b/ld/testsuite/ld-i386/i386.exp -@@ -195,6 +195,14 @@ set i386tests { - "--32" {pr17709a.s} {} "libpr17709.so"} - {"PR ld/17709 (2)" "-melf_i386 tmpdir/libpr17709.so" "" - "--32" {pr17709b.s} {{readelf -r pr17709.rd}} "pr17709"} -+ {"Build pr19827a.o" "" "" -+ "--32" { pr19827a.S }} -+ {"Build pr19827b.so" "-melf_i386 -shared" "" -+ "--32" { pr19827b.S } {} "pr19827b.so"} -+ {"Build pr19827" "-melf_i386 -pie tmpdir/pr19827a.o tmpdir/pr19827b.so" "" -+ "--32" { dummy.s } {{readelf {-rW} pr19827.rd}} "pr19827"} -+ {"Build pr19827.so" "-melf_i386 -shared -Bsymbolic" "" -+ "--32" { pr19827a.S } {{readelf {-rW} pr19827.rd}} "pr19827.so"} - } +-{"stfdpx", X(31,919), X_MASK, POWER6, POWER7, {FRSp, RA0, RB}}, ++{"stfdpx", X(31,919), X_MASK|Q_MASK, POWER6, POWER7, {FRSp, RA0, RB}}, + {"stfqx", X(31,919), X_MASK, POWER2, 0, {FRS, RA0, RB}}, - # So as to avoid rewriting every last test case here in a nacl variant, -@@ -319,6 +327,7 @@ run_dump_test "load5a" - run_dump_test "load5b" - run_dump_test "load6" - run_dump_test "pr19175" -+run_dump_test "pr19615" - - if { !([istarget "i?86-*-linux*"] - || [istarget "i?86-*-gnu*"] -@@ -357,7 +366,7 @@ if { [isnative] - [list \ - "Build libplt-main1.a" \ - "" \ -- "-fPIC" \ -+ "-fPIC -Wa,-mrelax-relocations=yes" \ - { plt-main1.c } \ - {{readelf {-Wr} plt-main1.rd}} \ - "libplt-main1.a" \ -@@ -365,7 +374,7 @@ if { [isnative] - [list \ - "Build libplt-main2.a" \ - "" \ -- "-fPIC" \ -+ "-fPIC -Wa,-mrelax-relocations=yes" \ - { plt-main2.c } \ - {{readelf {-Wr} plt-main2.rd}} \ - "libplt-main2.a" \ -@@ -373,7 +382,7 @@ if { [isnative] - [list \ - "Build libplt-main3.a" \ - "" \ -- "-fPIC $PLT_CFLAGS" \ -+ "-fPIC -Wa,-mrelax-relocations=yes $PLT_CFLAGS" \ - { plt-main3.c } \ - {{readelf {-Wr} plt-main3.rd}} \ - "libplt-main3.a" \ -@@ -381,7 +390,7 @@ if { [isnative] - [list \ - "Build libplt-main4.a" \ - "" \ -- "-fPIC $PLT_CFLAGS" \ -+ "-fPIC -Wa,-mrelax-relocations=yes $PLT_CFLAGS" \ - { plt-main4.c } \ - {{readelf {-Wr} plt-main4.rd}} \ - "libplt-main4.a" \ -@@ -535,7 +544,7 @@ if { [isnative] - [list \ - "Build gotpc1" \ - "tmpdir/got1d.so" \ -- "" \ -+ "-Wa,-mrelax-relocations=yes" \ - { got1a.S got1b.c got1c.c } \ - {{objdump {-dw} got1.dd}} \ - "got1" \ -diff --git a/ld/testsuite/ld-i386/jmp1.d b/ld/testsuite/ld-i386/jmp1.d -index 69383b2..e3ebedc 100644 ---- a/ld/testsuite/ld-i386/jmp1.d -+++ b/ld/testsuite/ld-i386/jmp1.d -@@ -1,3 +1,3 @@ --#as: --32 -+#as: --32 -mrelax-relocations=yes - #ld: -shared -melf_i386 - #error: direct GOT relocation R_386_GOT32X against `foo' without base register can not be used when making a shared object -diff --git a/ld/testsuite/ld-i386/jmp2.d b/ld/testsuite/ld-i386/jmp2.d -index 69383b2..e3ebedc 100644 ---- a/ld/testsuite/ld-i386/jmp2.d -+++ b/ld/testsuite/ld-i386/jmp2.d -@@ -1,3 +1,3 @@ --#as: --32 -+#as: --32 -mrelax-relocations=yes - #ld: -shared -melf_i386 - #error: direct GOT relocation R_386_GOT32X against `foo' without base register can not be used when making a shared object -diff --git a/ld/testsuite/ld-i386/lea1c.d b/ld/testsuite/ld-i386/lea1c.d -index dd76258..0c3580d 100644 ---- a/ld/testsuite/ld-i386/lea1c.d -+++ b/ld/testsuite/ld-i386/lea1c.d -@@ -1,5 +1,5 @@ - #source: lea1.s --#as: --32 -+#as: --32 -mrelax-relocations=yes - #ld: -melf_i386 - #objdump: -dw - -diff --git a/ld/testsuite/ld-i386/load1.d b/ld/testsuite/ld-i386/load1.d -index 062ea18..a252a15 100644 ---- a/ld/testsuite/ld-i386/load1.d -+++ b/ld/testsuite/ld-i386/load1.d -@@ -1,4 +1,4 @@ --#as: --32 -+#as: --32 -mrelax-relocations=yes - #ld: -melf_i386 - #objdump: -dw --sym - #notarget: i?86-*-nacl* x86_64-*-nacl* -diff --git a/ld/testsuite/ld-i386/load2.d b/ld/testsuite/ld-i386/load2.d -index 87c2509..467fee0 100644 ---- a/ld/testsuite/ld-i386/load2.d -+++ b/ld/testsuite/ld-i386/load2.d -@@ -1,3 +1,3 @@ --#as: --32 -+#as: --32 -mrelax-relocations=yes - #ld: -melf_i386 -shared - #error: direct GOT relocation R_386_GOT32X against `foo' without base register can not be used when making a shared object -diff --git a/ld/testsuite/ld-i386/load3.d b/ld/testsuite/ld-i386/load3.d -index 87c2509..467fee0 100644 ---- a/ld/testsuite/ld-i386/load3.d -+++ b/ld/testsuite/ld-i386/load3.d -@@ -1,3 +1,3 @@ --#as: --32 -+#as: --32 -mrelax-relocations=yes - #ld: -melf_i386 -shared - #error: direct GOT relocation R_386_GOT32X against `foo' without base register can not be used when making a shared object -diff --git a/ld/testsuite/ld-i386/load4a.d b/ld/testsuite/ld-i386/load4a.d -index 3aa56bd..f3f02ea 100644 ---- a/ld/testsuite/ld-i386/load4a.d -+++ b/ld/testsuite/ld-i386/load4a.d -@@ -1,4 +1,4 @@ - #source: load4.s --#as: --32 -+#as: --32 -mrelax-relocations=yes - #ld: -Bsymbolic -shared -melf_i386 - #error: direct GOT relocation R_386_GOT32X against `foo' without base register can not be used when making a shared object -diff --git a/ld/testsuite/ld-i386/load5a.d b/ld/testsuite/ld-i386/load5a.d -index 88c225a..9744316 100644 ---- a/ld/testsuite/ld-i386/load5a.d -+++ b/ld/testsuite/ld-i386/load5a.d -@@ -1,4 +1,4 @@ - #source: load5.s --#as: --32 -+#as: --32 -mrelax-relocations=yes - #ld: -Bsymbolic -shared -melf_i386 - #error: direct GOT relocation R_386_GOT32X against `foo' without base register can not be used when making a shared object -diff --git a/ld/testsuite/ld-i386/mov2b.d b/ld/testsuite/ld-i386/mov2b.d -index ea5dd9b..295a7c5 100644 ---- a/ld/testsuite/ld-i386/mov2b.d -+++ b/ld/testsuite/ld-i386/mov2b.d -@@ -1,5 +1,5 @@ - #source: mov2.s --#as: --32 -+#as: --32 -mrelax-relocations=yes - #ld: -pie -melf_i386 - #objdump: -dw - -diff --git a/ld/testsuite/ld-i386/mov3.d b/ld/testsuite/ld-i386/mov3.d -index 17da244..4ce5cd8 100644 ---- a/ld/testsuite/ld-i386/mov3.d -+++ b/ld/testsuite/ld-i386/mov3.d -@@ -1,4 +1,4 @@ --#as: --32 -+#as: --32 -mrelax-relocations=yes - #ld: -melf_i386 - #objdump: -dw + {"sraq", XRC(31,920,0), X_MASK, M601, 0, {RA, RS, RB}}, +@@ -6345,13 +6457,13 @@ const struct powerpc_opcode powerpc_opcodes[] = { -diff --git a/ld/testsuite/ld-i386/pr19615.d b/ld/testsuite/ld-i386/pr19615.d -new file mode 100644 -index 0000000..86aebd1 ---- /dev/null -+++ b/ld/testsuite/ld-i386/pr19615.d -@@ -0,0 +1,13 @@ -+#as: --32 -+#ld: -pie -Bsymbolic -E -melf_i386 -+#readelf: -r --wide --dyn-syms -+ -+Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 1 entries: -+ Offset Info Type Sym. Value Symbol's Name -+[0-9a-f]+ +[0-9a-f]+ +R_386_RELATIVE + -+ -+Symbol table '.dynsym' contains [0-9]+ entries: -+ Num: Value Size Type Bind Vis Ndx Name -+#... -+[ ]*[a-f0-9]+: [a-f0-9]+ 0 FUNC GLOBAL DEFAULT [a-f0-9]+ xyzzy -+#... -diff --git a/ld/testsuite/ld-i386/pr19615.s b/ld/testsuite/ld-i386/pr19615.s -new file mode 100644 -index 0000000..1d85926 ---- /dev/null -+++ b/ld/testsuite/ld-i386/pr19615.s -@@ -0,0 +1,13 @@ -+ .text -+ .globl _start -+ .type _start, @function -+_start: -+ ret -+ -+ .globl xyzzy /* This symbol should be exported */ -+ .type xyzzy, @function -+xyzzy: -+ ret -+ -+ .section ".xyzzy_ptr","aw",%progbits -+ .dc.a xyzzy -diff --git a/ld/testsuite/ld-i386/pr19827.rd b/ld/testsuite/ld-i386/pr19827.rd -new file mode 100644 -index 0000000..5d2a885 ---- /dev/null -+++ b/ld/testsuite/ld-i386/pr19827.rd -@@ -0,0 +1,5 @@ -+#readelf: -r --wide -+ -+Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 1 entries: -+ Offset Info Type Sym. Value Symbol's Name -+[0-9a-f]+ +[0-9a-f]+ +R_386_RELATIVE + -diff --git a/ld/testsuite/ld-i386/pr19827a.S b/ld/testsuite/ld-i386/pr19827a.S -new file mode 100644 -index 0000000..cdf1d4b ---- /dev/null -+++ b/ld/testsuite/ld-i386/pr19827a.S -@@ -0,0 +1,8 @@ -+ .text -+ .global _start -+_start: -+ .dc.a foo -+ .data -+ .globl foo -+foo: -+ .byte 0 -diff --git a/ld/testsuite/ld-i386/pr19827b.S b/ld/testsuite/ld-i386/pr19827b.S -new file mode 100644 -index 0000000..bb46e1d ---- /dev/null -+++ b/ld/testsuite/ld-i386/pr19827b.S -@@ -0,0 +1,2 @@ -+ .data -+ .dc.a foo -diff --git a/ld/testsuite/ld-ifunc/ifunc-21-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-21-x86-64.d -index 53ccd5a..ae75487 100644 ---- a/ld/testsuite/ld-ifunc/ifunc-21-x86-64.d -+++ b/ld/testsuite/ld-ifunc/ifunc-21-x86-64.d -@@ -1,4 +1,4 @@ --#as: --64 -+#as: --64 -mrelax-relocations=yes - #ld: -melf_x86_64 - #objdump: -dw - #target: x86_64-*-* -diff --git a/ld/testsuite/ld-ifunc/ifunc-22-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-22-x86-64.d -index 53ccd5a..ae75487 100644 ---- a/ld/testsuite/ld-ifunc/ifunc-22-x86-64.d -+++ b/ld/testsuite/ld-ifunc/ifunc-22-x86-64.d -@@ -1,4 +1,4 @@ --#as: --64 -+#as: --64 -mrelax-relocations=yes - #ld: -melf_x86_64 - #objdump: -dw - #target: x86_64-*-* -diff --git a/ld/testsuite/ld-ifunc/ifunc-5r-local-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-5r-local-x86-64.d -index 18021e7..2ce53a9 100644 ---- a/ld/testsuite/ld-ifunc/ifunc-5r-local-x86-64.d -+++ b/ld/testsuite/ld-ifunc/ifunc-5r-local-x86-64.d -@@ -1,5 +1,5 @@ - #source: ifunc-5-local-x86-64.s --#as: --64 -+#as: --64 -mrelax-relocations=yes - #ld: -r -melf_x86_64 - #readelf: -r --wide - #target: x86_64-*-* -diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp -index 81e72b4..982ffee 100644 ---- a/ld/testsuite/ld-plugin/lto.exp -+++ b/ld/testsuite/ld-plugin/lto.exp -@@ -400,9 +400,20 @@ if { [at_least_gcc_version 4 7] } { - || [istarget "x86_64-*-linux*"] - || [istarget "amd64-*-linux*"]) } { - set testname "PR ld/12365" -- set exec_output [run_host_cmd "$CC" "-O2 -flto -flto-partition=none -fuse-linker-plugin tmpdir/pr12365a.o tmpdir/pr12365b.o tmpdir/pr12365c.o"] -+ set exec_output [run_host_cmd "$CC" "-O2 -flto -flto-partition=none -fuse-linker-plugin -o tmpdir/pr12365 tmpdir/pr12365a.o tmpdir/pr12365b.o tmpdir/pr12365c.o"] - if { [ regexp "undefined reference to `my_bcopy'" $exec_output ] } { -+ # Linker should catch the reference to undefined `my_bcopy' -+ # error caused by a GCC bug. - pass $testname -+ } elseif { [ string match "" $exec_output ] } { -+ global READELF -+ set exec_output [run_host_cmd "$READELF" "-s -W tmpdir/pr12365"] -+ if { [ regexp "my_bcopy" $exec_output ] } { -+ # Verify that there is no `my_bcopy' symbol in executable. -+ fail $testname -+ } { -+ pass $testname -+ } - } { - fail $testname - } -diff --git a/ld/testsuite/ld-x86-64/call1a.d b/ld/testsuite/ld-x86-64/call1a.d -index 2a63b1c..2b131ee 100644 ---- a/ld/testsuite/ld-x86-64/call1a.d -+++ b/ld/testsuite/ld-x86-64/call1a.d -@@ -1,5 +1,5 @@ - #source: call1.s --#as: --64 -+#as: --64 -mrelax-relocations=yes - #ld: -melf_x86_64 - #objdump: -dw - -diff --git a/ld/testsuite/ld-x86-64/call1b.d b/ld/testsuite/ld-x86-64/call1b.d -index e782fa2..e2fef07 100644 ---- a/ld/testsuite/ld-x86-64/call1b.d -+++ b/ld/testsuite/ld-x86-64/call1b.d -@@ -1,5 +1,5 @@ - #source: call1.s --#as: --64 -+#as: --64 -mrelax-relocations=yes - #ld: -melf_x86_64 -z call-nop=prefix-addr - #objdump: -dw - -diff --git a/ld/testsuite/ld-x86-64/call1c.d b/ld/testsuite/ld-x86-64/call1c.d -index d058fc7..7fe8056 100644 ---- a/ld/testsuite/ld-x86-64/call1c.d -+++ b/ld/testsuite/ld-x86-64/call1c.d -@@ -1,5 +1,5 @@ - #source: call1.s --#as: --64 -+#as: --64 -mrelax-relocations=yes - #ld: -melf_x86_64 -z call-nop=prefix-nop - #objdump: -dw - -diff --git a/ld/testsuite/ld-x86-64/call1d.d b/ld/testsuite/ld-x86-64/call1d.d -index 8871cc6..c93756b 100644 ---- a/ld/testsuite/ld-x86-64/call1d.d -+++ b/ld/testsuite/ld-x86-64/call1d.d -@@ -1,5 +1,5 @@ - #source: call1.s --#as: --64 -+#as: --64 -mrelax-relocations=yes - #ld: -melf_x86_64 -z call-nop=suffix-nop - #objdump: -dw - -diff --git a/ld/testsuite/ld-x86-64/call1e.d b/ld/testsuite/ld-x86-64/call1e.d -index 7127f1a..c7c467c 100644 ---- a/ld/testsuite/ld-x86-64/call1e.d -+++ b/ld/testsuite/ld-x86-64/call1e.d -@@ -1,5 +1,5 @@ - #source: call1.s --#as: --64 -+#as: --64 -mrelax-relocations=yes - #ld: -melf_x86_64 -z call-nop=prefix-0x67 - #objdump: -dw - -diff --git a/ld/testsuite/ld-x86-64/call1f.d b/ld/testsuite/ld-x86-64/call1f.d -index 587bade..d0c3f11 100644 ---- a/ld/testsuite/ld-x86-64/call1f.d -+++ b/ld/testsuite/ld-x86-64/call1f.d -@@ -1,5 +1,5 @@ - #source: call1.s --#as: --64 -+#as: --64 -mrelax-relocations=yes - #ld: -melf_x86_64 -z call-nop=prefix-0x90 - #objdump: -dw - -diff --git a/ld/testsuite/ld-x86-64/call1g.d b/ld/testsuite/ld-x86-64/call1g.d -index 3bb512e..6a8d790 100644 ---- a/ld/testsuite/ld-x86-64/call1g.d -+++ b/ld/testsuite/ld-x86-64/call1g.d -@@ -1,5 +1,5 @@ - #source: call1.s --#as: --64 -+#as: --64 -mrelax-relocations=yes - #ld: -melf_x86_64 -z call-nop=suffix-0x90 - #objdump: -dw - -diff --git a/ld/testsuite/ld-x86-64/call1h.d b/ld/testsuite/ld-x86-64/call1h.d -index c7c8dde..f8e1d07 100644 ---- a/ld/testsuite/ld-x86-64/call1h.d -+++ b/ld/testsuite/ld-x86-64/call1h.d -@@ -1,5 +1,5 @@ - #source: call1.s --#as: --64 -+#as: --64 -mrelax-relocations=yes - #ld: -melf_x86_64 -z call-nop=suffix-144 - #objdump: -dw - -diff --git a/ld/testsuite/ld-x86-64/call1i.d b/ld/testsuite/ld-x86-64/call1i.d -index b3684ad..d5a157b 100644 ---- a/ld/testsuite/ld-x86-64/call1i.d -+++ b/ld/testsuite/ld-x86-64/call1i.d -@@ -1,5 +1,5 @@ - #source: call1.s --#as: --x32 -+#as: --x32 -mrelax-relocations=yes - #ld: -melf32_x86_64 -z call-nop=suffix-0x90 - #objdump: -dw - -diff --git a/ld/testsuite/ld-x86-64/load1a.d b/ld/testsuite/ld-x86-64/load1a.d -index 5c9349e..0eb4880 100644 ---- a/ld/testsuite/ld-x86-64/load1a.d -+++ b/ld/testsuite/ld-x86-64/load1a.d -@@ -1,5 +1,5 @@ - #source: load1.s --#as: --64 -+#as: --64 -mrelax-relocations=yes - #ld: -melf_x86_64 - #objdump: -dw --sym - #notarget: x86_64-*-nacl* -diff --git a/ld/testsuite/ld-x86-64/load1b.d b/ld/testsuite/ld-x86-64/load1b.d -index 70ef274..8827f38 100644 ---- a/ld/testsuite/ld-x86-64/load1b.d -+++ b/ld/testsuite/ld-x86-64/load1b.d -@@ -1,5 +1,5 @@ - #source: load1.s --#as: --x32 -+#as: --x32 -mrelax-relocations=yes - #ld: -melf32_x86_64 - #objdump: -dw --sym - #notarget: x86_64-*-nacl* -diff --git a/ld/testsuite/ld-x86-64/pr18591.d b/ld/testsuite/ld-x86-64/pr18591.d -new file mode 100644 -index 0000000..9f60622 ---- /dev/null -+++ b/ld/testsuite/ld-x86-64/pr18591.d -@@ -0,0 +1,12 @@ -+#as: --64 -+#ld: -melf_x86_64 -shared -z max-page-size=0x200000 -+#objdump: -dw -+ -+.*: +file format .* -+ -+ -+Disassembly of section .text: -+ -+[a-f0-9]+ <bar>: -+[ ]*[a-f0-9]+: 48 8b 05 ([0-9a-f]{2} ){4} mov 0x[a-f0-9]+\(%rip\),%rax # [a-f0-9]+ <_DYNAMIC\+0x[a-f0-9]+> -+#pass -diff --git a/ld/testsuite/ld-x86-64/pr18591.s b/ld/testsuite/ld-x86-64/pr18591.s -new file mode 100644 -index 0000000..d726f08 ---- /dev/null -+++ b/ld/testsuite/ld-x86-64/pr18591.s -@@ -0,0 +1,8 @@ -+ .hidden foo -+ .comm pad,0x80000000,8 -+ .comm foo,8,8 -+ .text -+ .globl bar -+ .type bar, @function -+bar: -+ movq foo@GOTPCREL(%rip), %rax -diff --git a/ld/testsuite/ld-x86-64/pr19615.d b/ld/testsuite/ld-x86-64/pr19615.d -new file mode 100644 -index 0000000..f09bcf3 ---- /dev/null -+++ b/ld/testsuite/ld-x86-64/pr19615.d -@@ -0,0 +1,13 @@ -+#as: --64 -+#ld: -pie -Bsymbolic -E -melf_x86_64 -+#readelf: -r --wide --dyn-syms -+ -+Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 1 entries: -+ Offset Info Type Symbol's Value Symbol's Name \+ Addend -+[0-9a-f]+ +[0-9a-f]+ +R_X86_64_RELATIVE +[0-9]+ -+ -+Symbol table '.dynsym' contains [0-9]+ entries: -+ Num: Value Size Type Bind Vis Ndx Name -+#... -+[ ]*[a-f0-9]+: [a-f0-9]+ 0 FUNC GLOBAL DEFAULT [a-f0-9]+ xyzzy -+#... -diff --git a/ld/testsuite/ld-x86-64/pr19615.s b/ld/testsuite/ld-x86-64/pr19615.s -new file mode 100644 -index 0000000..1d85926 ---- /dev/null -+++ b/ld/testsuite/ld-x86-64/pr19615.s -@@ -0,0 +1,13 @@ -+ .text -+ .globl _start -+ .type _start, @function -+_start: -+ ret -+ -+ .globl xyzzy /* This symbol should be exported */ -+ .type xyzzy, @function -+xyzzy: -+ ret -+ -+ .section ".xyzzy_ptr","aw",%progbits -+ .dc.a xyzzy -diff --git a/ld/testsuite/ld-x86-64/pr19827.rd b/ld/testsuite/ld-x86-64/pr19827.rd -new file mode 100644 -index 0000000..67eaacc ---- /dev/null -+++ b/ld/testsuite/ld-x86-64/pr19827.rd -@@ -0,0 +1,5 @@ -+#readelf: -r --wide -+ -+Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 1 entries: -+ Offset Info Type Symbol's Value Symbol's Name \+ Addend -+[0-9a-f]+ +[0-9a-f]+ +R_X86_64_RELATIVE +[0-9a-f]+ -diff --git a/ld/testsuite/ld-x86-64/pr19827a.S b/ld/testsuite/ld-x86-64/pr19827a.S -new file mode 100644 -index 0000000..cdf1d4b ---- /dev/null -+++ b/ld/testsuite/ld-x86-64/pr19827a.S -@@ -0,0 +1,8 @@ -+ .text -+ .global _start -+_start: -+ .dc.a foo -+ .data -+ .globl foo -+foo: -+ .byte 0 -diff --git a/ld/testsuite/ld-x86-64/pr19827b.S b/ld/testsuite/ld-x86-64/pr19827b.S -new file mode 100644 -index 0000000..bb46e1d ---- /dev/null -+++ b/ld/testsuite/ld-x86-64/pr19827b.S -@@ -0,0 +1,2 @@ -+ .data -+ .dc.a foo -diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp -index 45b7f09..378c13f 100644 ---- a/ld/testsuite/ld-x86-64/x86-64.exp -+++ b/ld/testsuite/ld-x86-64/x86-64.exp -@@ -148,6 +148,14 @@ set x86_64tests { - "--64" {pr17709a.s} {} "libpr17709.so"} - {"PR ld/17709 (2)" "-melf_x86_64 tmpdir/libpr17709.so" "" - "--64" {pr17709b.s} {{readelf -rW pr17709.rd}} "pr17709"} -+ {"Build pr19827a.o" "" "" -+ "--64" { pr19827a.S }} -+ {"Build pr19827b.so" "-melf_x86_64 -shared" "" -+ "--64" { pr19827b.S } {} "pr19827b.so"} -+ {"Build pr19827" "-melf_x86_64 -pie tmpdir/pr19827a.o tmpdir/pr19827b.so" "" -+ "--64" { dummy.s } {{readelf {-rW} pr19827.rd}} "pr19827"} -+ {"Build pr19827.so" "-melf_x86_64 -shared -Bsymbolic" "" -+ "--64" { pr19827a.S } {{readelf {-rW} pr19827.rd}} "pr19827.so"} - } + {"stfdu", OP(55), OP_MASK, COM, PPCEFS|PPCVLE, {FRS, D, RAS}}, - # So as to avoid rewriting every last test case here in a nacl variant, -@@ -353,6 +361,8 @@ run_dump_test "pr19013-x32" - run_dump_test "pr19013-nacl" - run_dump_test "pr19162" - run_dump_test "pr19175" -+run_dump_test "pr18591" -+run_dump_test "pr19615" - - # Add $PLT_CFLAGS if PLT is expected. - global PLT_CFLAGS -@@ -391,7 +401,7 @@ if { [isnative] && [which $CC] != 0 } { - [list \ - "Build libplt-main1.a" \ - "" \ -- "-fPIC" \ -+ "-fPIC -Wa,-mrelax-relocations=yes" \ - { plt-main1.c } \ - {{readelf {-Wr} plt-main1.rd}} \ - "libplt-main1.a" \ -@@ -399,7 +409,7 @@ if { [isnative] && [which $CC] != 0 } { - [list \ - "Build libplt-main2.a" \ - "" \ -- "-fPIC" \ -+ "-fPIC -Wa,-mrelax-relocations=yes" \ - { plt-main2.c } \ - {{readelf {-Wr} plt-main2.rd}} \ - "libplt-main2.a" \ -@@ -407,7 +417,7 @@ if { [isnative] && [which $CC] != 0 } { - [list \ - "Build libplt-main3.a" \ - "" \ -- "-fPIC $PLT_CFLAGS" \ -+ "-fPIC -Wa,-mrelax-relocations=yes $PLT_CFLAGS" \ - { plt-main3.c } \ - {{readelf {-Wr} plt-main3.rd}} \ - "libplt-main3.a" \ -@@ -415,7 +425,7 @@ if { [isnative] && [which $CC] != 0 } { - [list \ - "Build libplt-main4.a" \ - "" \ -- "-fPIC $PLT_CFLAGS" \ -+ "-fPIC -Wa,-mrelax-relocations=yes $PLT_CFLAGS" \ - { plt-main4.c } \ - {{readelf {-Wr} plt-main4.rd}} \ - "libplt-main4.a" \ -@@ -545,7 +555,7 @@ if { [isnative] && [which $CC] != 0 } { - [list \ - "Build gotpcrel1" \ - "tmpdir/gotpcrel1d.so" \ -- "" \ -+ "-Wa,-mrelax-relocations=yes" \ - { gotpcrel1a.S gotpcrel1b.c gotpcrel1c.c } \ - {{objdump {-dw} gotpcrel1.dd}} \ - "gotpcrel1" \ -diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog -index 726335d..e7f539a 100644 ---- a/opcodes/ChangeLog -+++ b/opcodes/ChangeLog -@@ -1,3 +1,24 @@ -+2016-02-26 Alan Modra <amodra@gmail.com> -+ -+ Apply from master. -+ 2015-12-12 Alan Modra <amodra@gmail.com> -+ PR 19359 -+ * ppc-opc.c (insert_fxm): Remove "ignored" from error message. -+ (powerpc_opcodes): Remove single-operand mfcr. -+ -+2016-02-15 H.J. Lu <hongjiu.lu@intel.com> -+ -+ Backport from master -+ 2016-02-15 H.J. Lu <hongjiu.lu@intel.com> -+ -+ * i386-dis.c (print_insn): Parenthesize expression to prevent -+ truncated addresses. -+ (OP_J): Likewise. -+ -+2016-01-25 Tristan Gingold <gingold@adacore.com> -+ -+ * configure: Regenerate. -+ - 2016-01-25 Tristan Gingold <gingold@adacore.com> +-{"lq", OP(56), OP_MASK, POWER4, PPC476|PPCVLE, {RTQ, DQ, RAQ}}, ++{"lq", OP(56), OP_MASK|Q_MASK, POWER4, PPC476|PPCVLE, {RTQ, DQ, RAQ}}, + {"psq_l", OP(56), OP_MASK, PPCPS, PPCVLE, {FRT,PSD,RA,PSW,PSQ}}, + {"lfq", OP(56), OP_MASK, POWER2, PPCVLE, {FRT, D, RA0}}, - * configure: Regenerate. -@@ -810,7 +831,7 @@ - - 2015-05-11 H.J. Lu <hongjiu.lu@intel.com> - -- * opcodes/i386-opc.tbl (call): Remove Disp16|Disp32 from 64-bit -+ * i386-opc.tbl (call): Remove Disp16|Disp32 from 64-bit - direct branch. - (jmp): Likewise. - * i386-tbl.h: Regenerated. -diff --git a/opcodes/configure b/opcodes/configure -index 3be129b..eedb184 100755 ---- a/opcodes/configure -+++ b/opcodes/configure -@@ -1,6 +1,6 @@ - #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. --# Generated by GNU Autoconf 2.64 for opcodes 2.26. -+# Generated by GNU Autoconf 2.64 for opcodes 2.26.0. - # - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, - # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software -@@ -556,8 +556,8 @@ MAKEFLAGS= - # Identity of this package. - PACKAGE_NAME='opcodes' - PACKAGE_TARNAME='opcodes' --PACKAGE_VERSION='2.26' --PACKAGE_STRING='opcodes 2.26' -+PACKAGE_VERSION='2.26.0' -+PACKAGE_STRING='opcodes 2.26.0' - PACKAGE_BUGREPORT='' - PACKAGE_URL='' - -@@ -1319,7 +1319,7 @@ if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF --\`configure' configures opcodes 2.26 to adapt to many kinds of systems. -+\`configure' configures opcodes 2.26.0 to adapt to many kinds of systems. - - Usage: $0 [OPTION]... [VAR=VALUE]... - -@@ -1390,7 +1390,7 @@ fi - - if test -n "$ac_init_help"; then - case $ac_init_help in -- short | recursive ) echo "Configuration of opcodes 2.26:";; -+ short | recursive ) echo "Configuration of opcodes 2.26.0:";; - esac - cat <<\_ACEOF - -@@ -1497,7 +1497,7 @@ fi - test -n "$ac_init_help" && exit $ac_status - if $ac_init_version; then - cat <<\_ACEOF --opcodes configure 2.26 -+opcodes configure 2.26.0 - generated by GNU Autoconf 2.64 - - Copyright (C) 2009 Free Software Foundation, Inc. -@@ -1907,7 +1907,7 @@ cat >config.log <<_ACEOF - This file contains any messages produced by compilers while - running configure, to aid debugging if configure makes a mistake. - --It was created by opcodes $as_me 2.26, which was -+It was created by opcodes $as_me 2.26.0, which was - generated by GNU Autoconf 2.64. Invocation command line was - - $ $0 $@ -@@ -3715,7 +3715,7 @@ fi - - # Define the identity of the package. - PACKAGE='opcodes' -- VERSION='2.26' -+ VERSION='2.26.0' - - - cat >>confdefs.h <<_ACEOF -@@ -13223,7 +13223,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - # report actual input values of CONFIG_FILES etc. instead of their - # values after options handling. - ac_log=" --This file was extended by opcodes $as_me 2.26, which was -+This file was extended by opcodes $as_me 2.26.0, which was - generated by GNU Autoconf 2.64. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES -@@ -13287,7 +13287,7 @@ Report bugs to the package provider." - _ACEOF - cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_cs_version="\\ --opcodes config.status 2.26 -+opcodes config.status 2.26.0 - configured by $0, generated by GNU Autoconf 2.64, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" - -diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c -index 1b4c51a..3712b59 100644 ---- a/opcodes/i386-dis.c -+++ b/opcodes/i386-dis.c -@@ -13644,7 +13644,7 @@ print_insn (bfd_vma pc, disassemble_info *info) - if (op_index[i] != -1 && op_riprel[i]) - { - (*info->fprintf_func) (info->stream, " # "); -- (*info->print_address_func) ((bfd_vma) (start_pc + codep - start_codep -+ (*info->print_address_func) ((bfd_vma) (start_pc + (codep - start_codep) - + op_address[op_index[i]]), info); - break; - } -@@ -16158,7 +16158,7 @@ OP_J (int bytemode, int sizeflag) - the displacement is added! */ - mask = 0xffff; - if ((prefixes & PREFIX_DATA) == 0) -- segment = ((start_pc + codep - start_codep) -+ segment = ((start_pc + (codep - start_codep)) - & ~((bfd_vma) 0xffff)); - } - if (address_mode != mode_64bit -diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c -index e8c92f6..9b25b60 100644 ---- a/opcodes/ppc-opc.c -+++ b/opcodes/ppc-opc.c -@@ -1434,7 +1434,7 @@ insert_fxm (unsigned long insn, - /* A value of -1 means we used the one operand form of - mfcr which is valid. */ - if (value != -1) -- *errmsg = _("ignoring invalid mfcr mask"); -+ *errmsg = _("invalid mfcr mask"); - value = 0; + {"lxsd", DSO(57,2), DS_MASK, PPCVSX3, PPCVLE, {VD, DS, RA0}}, + {"lxssp", DSO(57,3), DS_MASK, PPCVSX3, PPCVLE, {VD, DS, RA0}}, +-{"lfdp", OP(57), OP_MASK, POWER6, POWER7|PPCVLE, {FRTp, DS, RA0}}, ++{"lfdp", OP(57), OP_MASK|Q_MASK, POWER6, POWER7|PPCVLE, {FRTp, DS, RA0}}, + {"psq_lu", OP(57), OP_MASK, PPCPS, PPCVLE, {FRT,PSD,RA,PSW,PSQ}}, + {"lfqu", OP(57), OP_MASK, POWER2, PPCVLE, {FRT, D, RA0}}, + +@@ -6676,21 +6788,21 @@ const struct powerpc_opcode powerpc_opcodes[] = { + {"stxv", DQX(61,5), DQX_MASK, PPCVSX3, PPCVLE, {XSQ6, DQ, RA0}}, + {"stxsd", DSO(61,2), DS_MASK, PPCVSX3, PPCVLE, {VS, DS, RA0}}, + {"stxssp", DSO(61,3), DS_MASK, PPCVSX3, PPCVLE, {VS, DS, RA0}}, +-{"stfdp", OP(61), OP_MASK, POWER6, POWER7|PPCVLE, {FRSp, DS, RA0}}, ++{"stfdp", OP(61), OP_MASK|Q_MASK, POWER6, POWER7|PPCVLE, {FRSp, DS, RA0}}, + {"psq_stu", OP(61), OP_MASK, PPCPS, PPCVLE, {FRS,PSD,RA,PSW,PSQ}}, + {"stfqu", OP(61), OP_MASK, POWER2, PPCVLE, {FRS, D, RA}}, + + {"std", DSO(62,0), DS_MASK, PPC64, PPCVLE, {RS, DS, RA0}}, + {"stdu", DSO(62,1), DS_MASK, PPC64, PPCVLE, {RS, DS, RAS}}, +-{"stq", DSO(62,2), DS_MASK, POWER4, PPC476|PPCVLE, {RSQ, DS, RA0}}, ++{"stq", DSO(62,2), DS_MASK|Q_MASK, POWER4, PPC476|PPCVLE, {RSQ, DS, RA0}}, + + {"fcmpu", X(63,0), XBF_MASK, COM, PPCEFS|PPCVLE, {BF, FRA, FRB}}, + +-{"daddq", XRC(63,2,0), X_MASK, POWER6, PPCVLE, {FRTp, FRAp, FRBp}}, +-{"daddq.", XRC(63,2,1), X_MASK, POWER6, PPCVLE, {FRTp, FRAp, FRBp}}, ++{"daddq", XRC(63,2,0), X_MASK|Q_MASK, POWER6, PPCVLE, {FRTp, FRAp, FRBp}}, ++{"daddq.", XRC(63,2,1), X_MASK|Q_MASK, POWER6, PPCVLE, {FRTp, FRAp, FRBp}}, + +-{"dquaq", ZRC(63,3,0), Z2_MASK, POWER6, PPCVLE, {FRTp, FRAp, FRBp, RMC}}, +-{"dquaq.", ZRC(63,3,1), Z2_MASK, POWER6, PPCVLE, {FRTp, FRAp, FRBp, RMC}}, ++{"dquaq", ZRC(63,3,0), Z2_MASK|Q_MASK, POWER6, PPCVLE, {FRTp, FRAp, FRBp, RMC}}, ++{"dquaq.", ZRC(63,3,1), Z2_MASK|Q_MASK, POWER6, PPCVLE, {FRTp, FRAp, FRBp, RMC}}, + + {"xsaddqp", XRC(63,4,0), X_MASK, PPCVSX3, PPCVLE, {VD, VA, VB}}, + {"xsaddqpo", XRC(63,4,1), X_MASK, PPCVSX3, PPCVLE, {VD, VA, VB}}, +@@ -6772,11 +6884,11 @@ const struct powerpc_opcode powerpc_opcodes[] = { + + {"fcmpo", X(63,32), XBF_MASK, COM, PPCEFS|PPCVLE, {BF, FRA, FRB}}, + +-{"dmulq", XRC(63,34,0), X_MASK, POWER6, PPCVLE, {FRTp, FRAp, FRBp}}, +-{"dmulq.", XRC(63,34,1), X_MASK, POWER6, PPCVLE, {FRTp, FRAp, FRBp}}, ++{"dmulq", XRC(63,34,0), X_MASK|Q_MASK, POWER6, PPCVLE, {FRTp, FRAp, FRBp}}, ++{"dmulq.", XRC(63,34,1), X_MASK|Q_MASK, POWER6, PPCVLE, {FRTp, FRAp, FRBp}}, + +-{"drrndq", ZRC(63,35,0), Z2_MASK, POWER6, PPCVLE, {FRTp, FRA, FRBp, RMC}}, +-{"drrndq.", ZRC(63,35,1), Z2_MASK, POWER6, PPCVLE, {FRTp, FRA, FRBp, RMC}}, ++{"drrndq", ZRC(63,35,0), Z2_MASK|Q_MASK, POWER6, PPCVLE, {FRTp, FRA, FRBp, RMC}}, ++{"drrndq.", ZRC(63,35,1), Z2_MASK|Q_MASK, POWER6, PPCVLE, {FRTp, FRA, FRBp, RMC}}, + + {"xsmulqp", XRC(63,36,0), X_MASK, PPCVSX3, PPCVLE, {VD, VA, VB}}, + {"xsmulqpo", XRC(63,36,1), X_MASK, PPCVSX3, PPCVLE, {VD, VA, VB}}, +@@ -6791,11 +6903,11 @@ const struct powerpc_opcode powerpc_opcodes[] = { + + {"mcrfs", X(63,64), XRB_MASK|(3<<21)|(3<<16), COM, PPCVLE, {BF, BFA}}, + +-{"dscliq", ZRC(63,66,0), Z_MASK, POWER6, PPCVLE, {FRTp, FRAp, SH16}}, +-{"dscliq.", ZRC(63,66,1), Z_MASK, POWER6, PPCVLE, {FRTp, FRAp, SH16}}, ++{"dscliq", ZRC(63,66,0), Z_MASK|Q_MASK, POWER6, PPCVLE, {FRTp, FRAp, SH16}}, ++{"dscliq.", ZRC(63,66,1), Z_MASK|Q_MASK, POWER6, PPCVLE, {FRTp, FRAp, SH16}}, + +-{"dquaiq", ZRC(63,67,0), Z2_MASK, POWER6, PPCVLE, {TE, FRTp, FRBp, RMC}}, +-{"dquaiq.", ZRC(63,67,1), Z2_MASK, POWER6, PPCVLE, {TE, FRTp, FRBp, RMC}}, ++{"dquaiq", ZRC(63,67,0), Z2_MASK|Q_MASK, POWER6, PPCVLE, {TE, FRTp, FRBp, RMC}}, ++{"dquaiq.", ZRC(63,67,1), Z2_MASK|Q_MASK, POWER6, PPCVLE, {TE, FRTp, FRBp, RMC}}, + + {"mtfsb0", XRC(63,70,0), XRARB_MASK, COM, PPCVLE, {BT}}, + {"mtfsb0.", XRC(63,70,1), XRARB_MASK, COM, PPCVLE, {BT}}, +@@ -6803,11 +6915,11 @@ const struct powerpc_opcode powerpc_opcodes[] = { + {"fmr", XRC(63,72,0), XRA_MASK, COM, PPCEFS|PPCVLE, {FRT, FRB}}, + {"fmr.", XRC(63,72,1), XRA_MASK, COM, PPCEFS|PPCVLE, {FRT, FRB}}, + +-{"dscriq", ZRC(63,98,0), Z_MASK, POWER6, PPCVLE, {FRTp, FRAp, SH16}}, +-{"dscriq.", ZRC(63,98,1), Z_MASK, POWER6, PPCVLE, {FRTp, FRAp, SH16}}, ++{"dscriq", ZRC(63,98,0), Z_MASK|Q_MASK, POWER6, PPCVLE, {FRTp, FRAp, SH16}}, ++{"dscriq.", ZRC(63,98,1), Z_MASK|Q_MASK, POWER6, PPCVLE, {FRTp, FRAp, SH16}}, + +-{"drintxq", ZRC(63,99,0), Z2_MASK, POWER6, PPCVLE, {R, FRTp, FRBp, RMC}}, +-{"drintxq.", ZRC(63,99,1), Z2_MASK, POWER6, PPCVLE, {R, FRTp, FRBp, RMC}}, ++{"drintxq", ZRC(63,99,0), Z2_MASK|Q_MASK, POWER6, PPCVLE, {R, FRTp, FRBp, RMC}}, ++{"drintxq.", ZRC(63,99,1), Z2_MASK|Q_MASK, POWER6, PPCVLE, {R, FRTp, FRBp, RMC}}, + + {"xscpsgnqp", X(63,100), X_MASK, PPCVSX3, PPCVLE, {VD, VA, VB}}, + +@@ -6839,11 +6951,11 @@ const struct powerpc_opcode powerpc_opcodes[] = { + {"dtstdcq", Z(63,194), Z_MASK, POWER6, PPCVLE, {BF, FRAp, DCM}}, + {"dtstdgq", Z(63,226), Z_MASK, POWER6, PPCVLE, {BF, FRAp, DGM}}, + +-{"drintnq", ZRC(63,227,0), Z2_MASK, POWER6, PPCVLE, {R, FRTp, FRBp, RMC}}, +-{"drintnq.", ZRC(63,227,1), Z2_MASK, POWER6, PPCVLE, {R, FRTp, FRBp, RMC}}, ++{"drintnq", ZRC(63,227,0), Z2_MASK|Q_MASK, POWER6, PPCVLE, {R, FRTp, FRBp, RMC}}, ++{"drintnq.", ZRC(63,227,1), Z2_MASK|Q_MASK, POWER6, PPCVLE, {R, FRTp, FRBp, RMC}}, + +-{"dctqpq", XRC(63,258,0), X_MASK, POWER6, PPCVLE, {FRTp, FRB}}, +-{"dctqpq.", XRC(63,258,1), X_MASK, POWER6, PPCVLE, {FRTp, FRB}}, ++{"dctqpq", XRC(63,258,0), X_MASK|Q_MASK, POWER6, PPCVLE, {FRTp, FRB}}, ++{"dctqpq.", XRC(63,258,1), X_MASK|Q_MASK, POWER6, PPCVLE, {FRTp, FRB}}, + + {"fabs", XRC(63,264,0), XRA_MASK, COM, PPCEFS|PPCVLE, {FRT, FRB}}, + {"fabs.", XRC(63,264,1), XRA_MASK, COM, PPCEFS|PPCVLE, {FRT, FRB}}, +@@ -6851,8 +6963,8 @@ const struct powerpc_opcode powerpc_opcodes[] = { + {"dctfixq", XRC(63,290,0), X_MASK, POWER6, PPCVLE, {FRT, FRBp}}, + {"dctfixq.", XRC(63,290,1), X_MASK, POWER6, PPCVLE, {FRT, FRBp}}, + +-{"ddedpdq", XRC(63,322,0), X_MASK, POWER6, PPCVLE, {SP, FRTp, FRBp}}, +-{"ddedpdq.", XRC(63,322,1), X_MASK, POWER6, PPCVLE, {SP, FRTp, FRBp}}, ++{"ddedpdq", XRC(63,322,0), X_MASK|Q_MASK, POWER6, PPCVLE, {SP, FRTp, FRBp}}, ++{"ddedpdq.", XRC(63,322,1), X_MASK|Q_MASK, POWER6, PPCVLE, {SP, FRTp, FRBp}}, + + {"dxexq", XRC(63,354,0), X_MASK, POWER6, PPCVLE, {FRT, FRBp}}, + {"dxexq.", XRC(63,354,1), X_MASK, POWER6, PPCVLE, {FRT, FRBp}}, +@@ -6881,14 +6993,14 @@ const struct powerpc_opcode powerpc_opcodes[] = { + {"frim", XRC(63,488,0), XRA_MASK, POWER5, PPCVLE, {FRT, FRB}}, + {"frim.", XRC(63,488,1), XRA_MASK, POWER5, PPCVLE, {FRT, FRB}}, + +-{"dsubq", XRC(63,514,0), X_MASK, POWER6, PPCVLE, {FRTp, FRAp, FRBp}}, +-{"dsubq.", XRC(63,514,1), X_MASK, POWER6, PPCVLE, {FRTp, FRAp, FRBp}}, ++{"dsubq", XRC(63,514,0), X_MASK|Q_MASK, POWER6, PPCVLE, {FRTp, FRAp, FRBp}}, ++{"dsubq.", XRC(63,514,1), X_MASK|Q_MASK, POWER6, PPCVLE, {FRTp, FRAp, FRBp}}, + + {"xssubqp", XRC(63,516,0), X_MASK, PPCVSX3, PPCVLE, {VD, VA, VB}}, + {"xssubqpo", XRC(63,516,1), X_MASK, PPCVSX3, PPCVLE, {VD, VA, VB}}, + +-{"ddivq", XRC(63,546,0), X_MASK, POWER6, PPCVLE, {FRTp, FRAp, FRBp}}, +-{"ddivq.", XRC(63,546,1), X_MASK, POWER6, PPCVLE, {FRTp, FRAp, FRBp}}, ++{"ddivq", XRC(63,546,0), X_MASK|Q_MASK, POWER6, PPCVLE, {FRTp, FRAp, FRBp}}, ++{"ddivq.", XRC(63,546,1), X_MASK|Q_MASK, POWER6, PPCVLE, {FRTp, FRAp, FRBp}}, + + {"xsdivqp", XRC(63,548,0), X_MASK, PPCVSX3, PPCVLE, {VD, VA, VB}}, + {"xsdivqpo", XRC(63,548,1), X_MASK, PPCVSX3, PPCVLE, {VD, VA, VB}}, +@@ -6917,11 +7029,11 @@ const struct powerpc_opcode powerpc_opcodes[] = { + {"mtfsf.", XFL(63,711,1), XFL_MASK, POWER6|PPCA2|PPC476, PPCVLE, {FLM, FRB, XFL_L, W}}, + {"mtfsf.", XFL(63,711,1), XFL_MASK, COM, POWER6|PPCA2|PPC476|PPCEFS|PPCVLE, {FLM, FRB}}, + +-{"drdpq", XRC(63,770,0), X_MASK, POWER6, PPCVLE, {FRTp, FRBp}}, +-{"drdpq.", XRC(63,770,1), X_MASK, POWER6, PPCVLE, {FRTp, FRBp}}, ++{"drdpq", XRC(63,770,0), X_MASK|Q_MASK, POWER6, PPCVLE, {FRTp, FRBp}}, ++{"drdpq.", XRC(63,770,1), X_MASK|Q_MASK, POWER6, PPCVLE, {FRTp, FRBp}}, + +-{"dcffixq", XRC(63,802,0), X_MASK, POWER6, PPCVLE, {FRTp, FRB}}, +-{"dcffixq.", XRC(63,802,1), X_MASK, POWER6, PPCVLE, {FRTp, FRB}}, ++{"dcffixq", XRC(63,802,0), X_MASK|Q_MASK, POWER6, PPCVLE, {FRTp, FRB}}, ++{"dcffixq.", XRC(63,802,1), X_MASK|Q_MASK, POWER6, PPCVLE, {FRTp, FRB}}, + + {"xsabsqp", XVA(63,804,0), XVA_MASK, PPCVSX3, PPCVLE, {VD, VB}}, + {"xsxexpqp", XVA(63,804,2), XVA_MASK, PPCVSX3, PPCVLE, {VD, VB}}, +@@ -6941,8 +7053,8 @@ const struct powerpc_opcode powerpc_opcodes[] = { + {"fctidz.", XRC(63,815,1), XRA_MASK, PPC64, PPCVLE, {FRT, FRB}}, + {"fctidz.", XRC(63,815,1), XRA_MASK, PPC476, PPCVLE, {FRT, FRB}}, + +-{"denbcdq", XRC(63,834,0), X_MASK, POWER6, PPCVLE, {S, FRTp, FRBp}}, +-{"denbcdq.", XRC(63,834,1), X_MASK, POWER6, PPCVLE, {S, FRTp, FRBp}}, ++{"denbcdq", XRC(63,834,0), X_MASK|Q_MASK, POWER6, PPCVLE, {S, FRTp, FRBp}}, ++{"denbcdq.", XRC(63,834,1), X_MASK|Q_MASK, POWER6, PPCVLE, {S, FRTp, FRBp}}, + + {"xscvqpuwz", XVA(63,836,1), XVA_MASK, PPCVSX3, PPCVLE, {VD, VB}}, + {"xscvudqp", XVA(63,836,2), XVA_MASK, PPCVSX3, PPCVLE, {VD, VB}}, +@@ -6961,8 +7073,8 @@ const struct powerpc_opcode powerpc_opcodes[] = { + {"fcfid.", XRC(63,846,1), XRA_MASK, PPC64, PPCVLE, {FRT, FRB}}, + {"fcfid.", XRC(63,846,1), XRA_MASK, PPC476, PPCVLE, {FRT, FRB}}, + +-{"diexq", XRC(63,866,0), X_MASK, POWER6, PPCVLE, {FRTp, FRA, FRBp}}, +-{"diexq.", XRC(63,866,1), X_MASK, POWER6, PPCVLE, {FRTp, FRA, FRBp}}, ++{"diexq", XRC(63,866,0), X_MASK|Q_MASK, POWER6, PPCVLE, {FRTp, FRA, FRBp}}, ++{"diexq.", XRC(63,866,1), X_MASK|Q_MASK, POWER6, PPCVLE, {FRTp, FRA, FRBp}}, + + {"xsiexpqp", X(63,868), X_MASK, PPCVSX3, PPCVLE, {VD, VA, VB}}, + +diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c +index 070c96e..bdc961c 100644 +--- a/opcodes/riscv-dis.c ++++ b/opcodes/riscv-dis.c +@@ -383,7 +383,7 @@ riscv_disassemble_insn (bfd_vma memaddr, insn_t word, disassemble_info *info) + pd->hi_addr[i] = -1; + + for (i = 0; i < info->symtab_size; i++) +- if (strcmp (bfd_asymbol_name (info->symtab[i]), "_gp") == 0) ++ if (strcmp (bfd_asymbol_name (info->symtab[i]), RISCV_GP_SYMBOL) == 0) + pd->gp = bfd_asymbol_value (info->symtab[i]); } + else +diff --git a/opcodes/riscv-opc.c b/opcodes/riscv-opc.c +index 867a026..8343198 100644 +--- a/opcodes/riscv-opc.c ++++ b/opcodes/riscv-opc.c +@@ -147,7 +147,7 @@ const struct riscv_opcode riscv_opcodes[] = + {"jal", "32C", "Ca", MATCH_C_JAL, MASK_C_JAL, match_opcode, INSN_ALIAS }, + {"jal", "I", "a", MATCH_JAL | (X_RA << OP_SH_RD), MASK_JAL | MASK_RD, match_opcode, INSN_ALIAS }, + {"call", "I", "d,c", (X_T1 << OP_SH_RS1), (int) M_CALL, match_never, INSN_MACRO }, +-{"call", "I", "c", (X_T1 << OP_SH_RS1) | (X_RA << OP_SH_RD), (int) M_CALL, match_never, INSN_MACRO }, ++{"call", "I", "c", (X_RA << OP_SH_RS1) | (X_RA << OP_SH_RD), (int) M_CALL, match_never, INSN_MACRO }, + {"tail", "I", "c", (X_T1 << OP_SH_RS1), (int) M_CALL, match_never, INSN_MACRO }, + {"jump", "I", "c,s", 0, (int) M_CALL, match_never, INSN_MACRO }, + {"nop", "C", "", MATCH_C_ADDI, 0xffff, match_opcode, INSN_ALIAS }, +@@ -210,14 +210,14 @@ const struct riscv_opcode riscv_opcodes[] = + {"sll", "C", "d,CU,C>", MATCH_C_SLLI, MASK_C_SLLI, match_rd_nonzero, INSN_ALIAS }, + {"sll", "I", "d,s,t", MATCH_SLL, MASK_SLL, match_opcode, 0 }, + {"sll", "I", "d,s,>", MATCH_SLLI, MASK_SLLI, match_opcode, INSN_ALIAS }, +-{"srli", "C", "Cs,Cw,C>", MATCH_C_SRLI, MASK_C_SRLI, match_rd_nonzero, INSN_ALIAS }, ++{"srli", "C", "Cs,Cw,C>", MATCH_C_SRLI, MASK_C_SRLI, match_opcode, INSN_ALIAS }, + {"srli", "I", "d,s,>", MATCH_SRLI, MASK_SRLI, match_opcode, 0 }, +-{"srl", "C", "Cs,Cw,C>", MATCH_C_SRLI, MASK_C_SRLI, match_rd_nonzero, INSN_ALIAS }, ++{"srl", "C", "Cs,Cw,C>", MATCH_C_SRLI, MASK_C_SRLI, match_opcode, INSN_ALIAS }, + {"srl", "I", "d,s,t", MATCH_SRL, MASK_SRL, match_opcode, 0 }, + {"srl", "I", "d,s,>", MATCH_SRLI, MASK_SRLI, match_opcode, INSN_ALIAS }, +-{"srai", "C", "Cs,Cw,C>", MATCH_C_SRAI, MASK_C_SRAI, match_rd_nonzero, INSN_ALIAS }, ++{"srai", "C", "Cs,Cw,C>", MATCH_C_SRAI, MASK_C_SRAI, match_opcode, INSN_ALIAS }, + {"srai", "I", "d,s,>", MATCH_SRAI, MASK_SRAI, match_opcode, 0 }, +-{"sra", "C", "Cs,Cw,C>", MATCH_C_SRAI, MASK_C_SRAI, match_rd_nonzero, INSN_ALIAS }, ++{"sra", "C", "Cs,Cw,C>", MATCH_C_SRAI, MASK_C_SRAI, match_opcode, INSN_ALIAS }, + {"sra", "I", "d,s,t", MATCH_SRA, MASK_SRA, match_opcode, 0 }, + {"sra", "I", "d,s,>", MATCH_SRAI, MASK_SRAI, match_opcode, INSN_ALIAS }, + {"sub", "C", "Cs,Cw,Ct", MATCH_C_SUB, MASK_C_SUB, match_opcode, INSN_ALIAS }, +@@ -562,10 +562,10 @@ const struct riscv_opcode riscv_opcodes[] = + {"c.nop", "C", "", MATCH_C_ADDI, 0xffff, match_opcode, 0 }, + {"c.mv", "C", "d,CV", MATCH_C_MV, MASK_C_MV, match_c_add, 0 }, + {"c.lui", "C", "d,Cu", MATCH_C_LUI, MASK_C_LUI, match_c_lui, 0 }, +-{"c.li", "C", "d,Cj", MATCH_C_LI, MASK_C_LI, match_rd_nonzero, 0 }, ++{"c.li", "C", "d,Co", MATCH_C_LI, MASK_C_LI, match_rd_nonzero, 0 }, + {"c.addi4spn","C", "Ct,Cc,CK", MATCH_C_ADDI4SPN, MASK_C_ADDI4SPN, match_opcode, 0 }, + {"c.addi16sp","C", "Cc,CL", MATCH_C_ADDI16SP, MASK_C_ADDI16SP, match_opcode, 0 }, +-{"c.addi", "C", "d,Cj", MATCH_C_ADDI, MASK_C_ADDI, match_rd_nonzero, 0 }, ++{"c.addi", "C", "d,Cj", MATCH_C_ADDI, MASK_C_ADDI, match_opcode, 0 }, + {"c.add", "C", "d,CV", MATCH_C_ADD, MASK_C_ADD, match_c_add, 0 }, + {"c.sub", "C", "Cs,Ct", MATCH_C_SUB, MASK_C_SUB, match_opcode, 0 }, + {"c.and", "C", "Cs,Ct", MATCH_C_AND, MASK_C_AND, match_opcode, 0 }, +@@ -574,8 +574,8 @@ const struct riscv_opcode riscv_opcodes[] = + {"c.slli", "C", "d,C>", MATCH_C_SLLI, MASK_C_SLLI, match_rd_nonzero, 0 }, + {"c.srli", "C", "Cs,C>", MATCH_C_SRLI, MASK_C_SRLI, match_opcode, 0 }, + {"c.srai", "C", "Cs,C>", MATCH_C_SRAI, MASK_C_SRAI, match_opcode, 0 }, +-{"c.andi", "C", "Cs,Cj", MATCH_C_ANDI, MASK_C_ANDI, match_opcode, 0 }, +-{"c.addiw", "64C", "d,Cj", MATCH_C_ADDIW, MASK_C_ADDIW, match_rd_nonzero, 0 }, ++{"c.andi", "C", "Cs,Co", MATCH_C_ANDI, MASK_C_ANDI, match_opcode, 0 }, ++{"c.addiw", "64C", "d,Co", MATCH_C_ADDIW, MASK_C_ADDIW, match_rd_nonzero, 0 }, + {"c.addw", "64C", "Cs,Ct", MATCH_C_ADDW, MASK_C_ADDW, match_opcode, 0 }, + {"c.subw", "64C", "Cs,Ct", MATCH_C_SUBW, MASK_C_SUBW, match_opcode, 0 }, + {"c.ldsp", "64C", "d,Cn(Cc)", MATCH_C_LDSP, MASK_C_LDSP, match_rd_nonzero, 0 }, +diff --git a/opcodes/s390-mkopc.c b/opcodes/s390-mkopc.c +index 8e0b332..68c55a9 100644 +--- a/opcodes/s390-mkopc.c ++++ b/opcodes/s390-mkopc.c +@@ -419,10 +419,6 @@ main (void) + && (str[2] == 0 || str[2] == ',')) { + flag_bits |= S390_INSTR_FLAG_VX; + str += 2; +- } else if (strncmp (str, "vx2", 3) == 0 +- && (str[3] == 0 || str[3] == ',')) { +- flag_bits |= S390_INSTR_FLAG_VX2; +- str += 3; + } else { + fprintf (stderr, "Couldn't parse flags string %s\n", + flags_string); +diff --git a/opcodes/s390-opc.txt b/opcodes/s390-opc.txt +index b381587..51a17f3 100644 +--- a/opcodes/s390-opc.txt ++++ b/opcodes/s390-opc.txt +@@ -1685,146 +1685,146 @@ b93c ppno RRE_RR "perform pseudorandom number operation" z13 zarch + # Vector Enhancements Facility 1 + + e70000000085 vbperm VRR_VVV "vector bit permute" arch12 zarch +-e70000006004 vllezlf VRX_VRRD "vector load logical word element and zero - left aligned" arch12 zarch vx2 +-e700000000b8 vmsl VRR_VVVUU0V "vector multiply sum logical" arch12 zarch vx2 +-e700030000b8 vmslg VRR_VVVU0VB "vector multiply sum logical double word" arch12 zarch vx2 +-e7000000006c vnx VRR_VVV "vector not exclusive or" arch12 zarch vx2 ++e70000006004 vllezlf VRX_VRRD "vector load logical word element and zero - left aligned" arch12 zarch ++e700000000b8 vmsl VRR_VVVUU0V "vector multiply sum logical" arch12 zarch ++e700030000b8 vmslg VRR_VVVU0VB "vector multiply sum logical double word" arch12 zarch ++e7000000006c vnx VRR_VVV "vector not exclusive or" arch12 zarch + e7000000006e vnn VRR_VVV "vector nand" arch12 zarch +-e7000000006f voc VRR_VVV "vector or with complement" arch12 zarch vx2 +-e70000000050 vpopctb VRR_VV "vector population count byte" arch12 zarch vx2 +-e70000001050 vpopcth VRR_VV "vector population count halfword" arch12 zarch vx2 +-e70000002050 vpopctf VRR_VV "vector population count word" arch12 zarch vx2 +-e70000003050 vpopctg VRR_VV "vector population count double word" arch12 zarch vx2 +-e700000020e3 vfasb VRR_VVV "vector fp add short" arch12 zarch vx2 +-e700000820e3 wfasb VRR_VVV "scalar vector fp add scalar short" arch12 zarch vx2 +-e700000840e3 wfaxb VRR_VVV "scalar vector fp add scalar extended" arch12 zarch vx2 +-e700000020cb wfcsb VRR_VV "scalar vector fp compare scalar short" arch12 zarch vx2 +-e700000040cb wfcxb VRR_VV "scalar vector fp compare scalar extended" arch12 zarch vx2 +-e700000020ca wfksb VRR_VV "scalar vector fp compare and signal scalar short" arch12 zarch vx2 +-e700000040ca wfkxb VRR_VV "scalar vector fp compare and signal scalar extended" arch12 zarch vx2 ++e7000000006f voc VRR_VVV "vector or with complement" arch12 zarch ++e70000000050 vpopctb VRR_VV "vector population count byte" arch12 zarch ++e70000001050 vpopcth VRR_VV "vector population count halfword" arch12 zarch ++e70000002050 vpopctf VRR_VV "vector population count word" arch12 zarch ++e70000003050 vpopctg VRR_VV "vector population count double word" arch12 zarch ++e700000020e3 vfasb VRR_VVV "vector fp add short" arch12 zarch ++e700000820e3 wfasb VRR_VVV "scalar vector fp add scalar short" arch12 zarch ++e700000840e3 wfaxb VRR_VVV "scalar vector fp add scalar extended" arch12 zarch ++e700000020cb wfcsb VRR_VV "scalar vector fp compare scalar short" arch12 zarch ++e700000040cb wfcxb VRR_VV "scalar vector fp compare scalar extended" arch12 zarch ++e700000020ca wfksb VRR_VV "scalar vector fp compare and signal scalar short" arch12 zarch ++e700000040ca wfkxb VRR_VV "scalar vector fp compare and signal scalar extended" arch12 zarch + +-e700000020e8 vfcesb VRR_VVV "vector fp compare equal short" arch12 zarch vx2 +-e700001020e8 vfcesbs VRR_VVV "vector fp compare equal short" arch12 zarch vx2 +-e700000820e8 wfcesb VRR_VVV "scalar vector fp compare equal scalar short" arch12 zarch vx2 +-e700001820e8 wfcesbs VRR_VVV "scalar fp compare equal scalar short" arch12 zarch vx2 +-e700000840e8 wfcexb VRR_VVV "scalar vector fp compare equal scalar extended" arch12 zarch vx2 +-e700001840e8 wfcexbs VRR_VVV "scalar vector fp compare equal scalar extended" arch12 zarch vx2 ++e700000020e8 vfcesb VRR_VVV "vector fp compare equal short" arch12 zarch ++e700001020e8 vfcesbs VRR_VVV "vector fp compare equal short" arch12 zarch ++e700000820e8 wfcesb VRR_VVV "scalar vector fp compare equal scalar short" arch12 zarch ++e700001820e8 wfcesbs VRR_VVV "scalar fp compare equal scalar short" arch12 zarch ++e700000840e8 wfcexb VRR_VVV "scalar vector fp compare equal scalar extended" arch12 zarch ++e700001840e8 wfcexbs VRR_VVV "scalar vector fp compare equal scalar extended" arch12 zarch + +-e700000420e8 vfkesb VRR_VVV "vector fp compare and signal equal short" arch12 zarch vx2 +-e700001420e8 vfkesbs VRR_VVV "vector fp compare and signal equal short" arch12 zarch vx2 +-e700000c20e8 wfkesb VRR_VVV "scalar vector fp compare and signal equal scalar short" arch12 zarch vx2 +-e700001c20e8 wfkesbs VRR_VVV "scalar fp compare and signal equal scalar short" arch12 zarch vx2 ++e700000420e8 vfkesb VRR_VVV "vector fp compare and signal equal short" arch12 zarch ++e700001420e8 vfkesbs VRR_VVV "vector fp compare and signal equal short" arch12 zarch ++e700000c20e8 wfkesb VRR_VVV "scalar vector fp compare and signal equal scalar short" arch12 zarch ++e700001c20e8 wfkesbs VRR_VVV "scalar fp compare and signal equal scalar short" arch12 zarch + e700000430e8 vfkedb VRR_VVV "vector fp compare and signal equal long" arch12 zarch vx + e700001430e8 vfkedbs VRR_VVV "vector fp compare and signal equal long" arch12 zarch vx + e700000c30e8 wfkedb VRR_VVV "vector fp compare and signal equal long" arch12 zarch vx + e700001c30e8 wfkedbs VRR_VVV "vector fp compare and signal equal long" arch12 zarch vx +-e700000c40e8 wfkexb VRR_VVV "scalar vector fp compare and signal equal scalar extended" arch12 zarch vx2 +-e700001c40e8 wfkexbs VRR_VVV "scalar vector fp compare and signal equal scalar extended" arch12 zarch vx2 ++e700000c40e8 wfkexb VRR_VVV "scalar vector fp compare and signal equal scalar extended" arch12 zarch ++e700001c40e8 wfkexbs VRR_VVV "scalar vector fp compare and signal equal scalar extended" arch12 zarch + +-e700000020eb vfchsb VRR_VVV "vector fp compare high short" arch12 zarch vx2 +-e700001020eb vfchsbs VRR_VVV "vector fp compare high short" arch12 zarch vx2 +-e700000820eb wfchsb VRR_VVV "scalar vector fp compare high scalar short" arch12 zarch vx2 +-e700001820eb wfchsbs VRR_VVV "scalar vector fp compare high scalar short" arch12 zarch vx2 +-e700000840eb wfchxb VRR_VVV "scalar vector fp compare high scalar extended" arch12 zarch vx2 +-e700001840eb wfchxbs VRR_VVV "scalar vector fp compare high scalar extended" arch12 zarch vx2 ++e700000020eb vfchsb VRR_VVV "vector fp compare high short" arch12 zarch ++e700001020eb vfchsbs VRR_VVV "vector fp compare high short" arch12 zarch ++e700000820eb wfchsb VRR_VVV "scalar vector fp compare high scalar short" arch12 zarch ++e700001820eb wfchsbs VRR_VVV "scalar vector fp compare high scalar short" arch12 zarch ++e700000840eb wfchxb VRR_VVV "scalar vector fp compare high scalar extended" arch12 zarch ++e700001840eb wfchxbs VRR_VVV "scalar vector fp compare high scalar extended" arch12 zarch + +-e700000420eb vfkhsb VRR_VVV "vector fp compare and signal high short" arch12 zarch vx2 +-e700001420eb vfkhsbs VRR_VVV "vector fp compare and signal high short" arch12 zarch vx2 +-e700000c20eb wfkhsb VRR_VVV "scalar vector fp compare and signal high scalar short" arch12 zarch vx2 +-e700001c20eb wfkhsbs VRR_VVV "scalar vector fp compare and signal high scalar short" arch12 zarch vx2 ++e700000420eb vfkhsb VRR_VVV "vector fp compare and signal high short" arch12 zarch ++e700001420eb vfkhsbs VRR_VVV "vector fp compare and signal high short" arch12 zarch ++e700000c20eb wfkhsb VRR_VVV "scalar vector fp compare and signal high scalar short" arch12 zarch ++e700001c20eb wfkhsbs VRR_VVV "scalar vector fp compare and signal high scalar short" arch12 zarch + e700000430eb vfkhdb VRR_VVV "vector fp compare and signal high long" arch12 zarch vx + e700001430eb vfkhdbs VRR_VVV "vector fp compare and signal high long" arch12 zarch vx + e700000c30eb wfkhdb VRR_VVV "vector fp compare and signal high long" arch12 zarch vx + e700001c30eb wfkhdbs VRR_VVV "vector fp compare and signal high long" arch12 zarch vx +-e700000c40eb wfkhxb VRR_VVV "scalar vector fp compare and signal high scalar extended" arch12 zarch vx2 +-e700001c40eb wfkhxbs VRR_VVV "scalar vector fp compare and signal high scalar extended" arch12 zarch vx2 ++e700000c40eb wfkhxb VRR_VVV "scalar vector fp compare and signal high scalar extended" arch12 zarch ++e700001c40eb wfkhxbs VRR_VVV "scalar vector fp compare and signal high scalar extended" arch12 zarch + +-e700000020ea vfchesb VRR_VVV "vector fp compare high or equal short" arch12 zarch vx2 +-e700001020ea vfchesbs VRR_VVV "vector fp compare high or equal short" arch12 zarch vx2 +-e700000820ea wfchesb VRR_VVV "scalar vector fp compare high or equal scalar short" arch12 zarch vx2 +-e700001820ea wfchesbs VRR_VVV "scalar vector fp compare high or equal scalar short" arch12 zarch vx2 +-e700000840ea wfchexb VRR_VVV "scalar vector fp compare high or equal scalar extended" arch12 zarch vx2 +-e700001840ea wfchexbs VRR_VVV "scalar vector fp compare high or equal scalar extended" arch12 zarch vx2 ++e700000020ea vfchesb VRR_VVV "vector fp compare high or equal short" arch12 zarch ++e700001020ea vfchesbs VRR_VVV "vector fp compare high or equal short" arch12 zarch ++e700000820ea wfchesb VRR_VVV "scalar vector fp compare high or equal scalar short" arch12 zarch ++e700001820ea wfchesbs VRR_VVV "scalar vector fp compare high or equal scalar short" arch12 zarch ++e700000840ea wfchexb VRR_VVV "scalar vector fp compare high or equal scalar extended" arch12 zarch ++e700001840ea wfchexbs VRR_VVV "scalar vector fp compare high or equal scalar extended" arch12 zarch + +-e700000420ea vfkhesb VRR_VVV "vector fp compare and signal high or equal short" arch12 zarch vx2 +-e700001420ea vfkhesbs VRR_VVV "vector fp compare and signal high or equal short" arch12 zarch vx2 +-e700000c20ea wfkhesb VRR_VVV "scalar vector fp compare and signal high or equal scalar short" arch12 zarch vx2 +-e700001c20ea wfkhesbs VRR_VVV "scalar vector fp compare and signal high or equal scalar short" arch12 zarch vx2 ++e700000420ea vfkhesb VRR_VVV "vector fp compare and signal high or equal short" arch12 zarch ++e700001420ea vfkhesbs VRR_VVV "vector fp compare and signal high or equal short" arch12 zarch ++e700000c20ea wfkhesb VRR_VVV "scalar vector fp compare and signal high or equal scalar short" arch12 zarch ++e700001c20ea wfkhesbs VRR_VVV "scalar vector fp compare and signal high or equal scalar short" arch12 zarch + e700000430ea vfkhedb VRR_VVV "vector fp compare and signal high or equal long" arch12 zarch vx + e700001430ea vfkhedbs VRR_VVV "vector fp compare and signal high or equal long" arch12 zarch vx + e700000c30ea wfkhedb VRR_VVV "vector fp compare and signal high or equal long" arch12 zarch vx + e700001c30ea wfkhedbs VRR_VVV "vector fp compare and signal high or equal long" arch12 zarch vx +-e700000c40ea wfkhexb VRR_VVV "scalar vector fp compare and signal high or equal scalar extended" arch12 zarch vx2 +-e700001c40ea wfkhexbs VRR_VVV "scalar vector fp compare and signal high or equal scalar extended" arch12 zarch vx2 ++e700000c40ea wfkhexb VRR_VVV "scalar vector fp compare and signal high or equal scalar extended" arch12 zarch ++e700001c40ea wfkhexbs VRR_VVV "scalar vector fp compare and signal high or equal scalar extended" arch12 zarch + +-e700000020e5 vfdsb VRR_VVV "vector fp divide short" arch12 zarch vx2 +-e700000820e5 wfdsb VRR_VVV "scalar vector fp divide scalar short" arch12 zarch vx2 +-e700000840e5 wfdxb VRR_VVV "scalar vector fp divide scalar extended" arch12 zarch vx2 +-e700000020c7 vfisb VRR_VV0UU "vector load fp integer short" arch12 zarch vx2 +-e700000820c7 wfisb VRR_VV0UU8 "scalar vector load fp integer scalar short" arch12 zarch vx2 +-e700000840c7 wfixb VRR_VV0UU8 "scalar vector load fp integer scalar extended" arch12 zarch vx2 +-e700000000c4 vfll VRR_VV0UU2 "vector fp load lengthened" arch12 zarch vx2 +-e700000020c4 vflls VRR_VV "vector fp load lengthened" arch12 zarch vx2 +-e700000820c4 wflls VRR_VV "scalar vector fp load lengthened short" arch12 zarch vx2 +-e700000830c4 wflld VRR_VV "scalar vector fp load lengthened long" arch12 zarch vx2 +-e700000000c5 vflr VRR_VV0UUU "vector fp load rounded" arch12 zarch vx2 +-e700000030c5 vflrd VRR_VV0UU "vector fp load rounded long" arch12 zarch vx2 +-e700000830c5 wflrd VRR_VV0UU8 "scalar vector fp load rounded long" arch12 zarch vx2 +-e700000840c5 wflrx VRR_VV0UU8 "scalar vector fp load rounded extended" arch12 zarch vx2 +-e700000000ef vfmax VRR_VVV0UUU "vector fp maximum" arch12 zarch vx2 +-e700000020ef vfmaxsb VRR_VVV0U0 "vector fp maximum short" arch12 zarch vx2 +-e700000030ef vfmaxdb VRR_VVV0U0 "vector fp maximum long" arch12 zarch vx2 +-e700000820ef wfmaxsb VRR_VVV0U0 "scalar fp maximum scalar short" arch12 zarch vx2 +-e700000830ef wfmaxdb VRR_VVV0U0 "scalar fp maximum scalar long" arch12 zarch vx2 +-e700000840ef wfmaxxb VRR_VVV0U0 "scalar fp maximum scalar extended" arch12 zarch vx2 +-e700000000ee vfmin VRR_VVV0UUU "vector fp minimum" arch12 zarch vx2 +-e700000020ee vfminsb VRR_VVV0U0 "vector fp minimum short" arch12 zarch vx2 +-e700000030ee vfmindb VRR_VVV0U0 "vector fp minimum long" arch12 zarch vx2 +-e700000820ee wfminsb VRR_VVV0U0 "scalar fp minimum scalar short" arch12 zarch vx2 +-e700000830ee wfmindb VRR_VVV0U0 "scalar fp minimum scalar long" arch12 zarch vx2 +-e700000840ee wfminxb VRR_VVV0U0 "scalar fp minimum scalar extended" arch12 zarch vx2 +-e700000020e7 vfmsb VRR_VVV "vector fp multiply short" arch12 zarch vx2 +-e700000820e7 wfmsb VRR_VVV "scalar vector fp multiply scalar short" arch12 zarch vx2 +-e700000840e7 wfmxb VRR_VVV "scalar vector fp multiply scalar extended" arch12 zarch vx2 +-e7000200008f vfmasb VRR_VVVV "vector fp multiply and add short" arch12 zarch vx2 +-e7000208008f wfmasb VRR_VVVV "scalar vector fp multiply and add scalar short" arch12 zarch vx2 +-e7000408008f wfmaxb VRR_VVVV "scalar vector fp multiply and add scalar extended" arch12 zarch vx2 +-e7000200008e vfmssb VRR_VVVV "vector fp multiply and subtract short" arch12 zarch vx2 +-e7000208008e wfmssb VRR_VVVV "scalar vector fp multiply and subtract scalar short" arch12 zarch vx2 +-e7000408008e wfmsxb VRR_VVVV "scalar vector fp multiply and subtract scalar extended" arch12 zarch vx2 +-e7000000009f vfnma VRR_VVVU0UV "vector fp negative multiply and add" arch12 zarch vx2 +-e7000200009f vfnmasb VRR_VVVV "vector fp negative multiply and add short" arch12 zarch vx2 +-e7000208009f wfnmasb VRR_VVVV "scalar vector fp negative multiply and add scalar short" arch12 zarch vx2 +-e7000300009f vfnmadb VRR_VVVV "vector fp negative multiply and add long" arch12 zarch vx2 +-e7000308009f wfnmadb VRR_VVVV "scalar vector fp negative multiply and add scalar long" arch12 zarch vx2 +-e7000408009f wfnmaxb VRR_VVVV "scalar vector fp negative multiply and add scalar extended" arch12 zarch vx2 +-e7000000009e vfnms VRR_VVVU0UV "vector fp negative multiply and subtract" arch12 zarch vx2 +-e7000200009e vfnmssb VRR_VVVV "vector fp negative multiply and subtract short" arch12 zarch vx2 +-e7000208009e wfnmssb VRR_VVVV "scalar vector fp negative multiply and subtract scalar short" arch12 zarch vx2 +-e7000300009e vfnmsdb VRR_VVVV "vector fp negative multiply and subtract long" arch12 zarch vx2 +-e7000308009e wfnmsdb VRR_VVVV "scalar vector fp negative multiply and subtract scalar long" arch12 zarch vx2 +-e7000408009e wfnmsxb VRR_VVVV "scalar vector fp negative multiply and subtract scalar extended" arch12 zarch vx2 +-e700000020cc vfpsosb VRR_VV0U2 "vector fp perform sign operation short" arch12 zarch vx2 +-e700000820cc wfpsosb VRR_VV0U2 "scalar vector fp perform sign operation scalar short" arch12 zarch vx2 +-e700000020cc vflcsb VRR_VV "vector fp perform sign operation short" arch12 zarch vx2 +-e700000820cc wflcsb VRR_VV "scalar vector fp perform sign operation scalar short" arch12 zarch vx2 +-e700001020cc vflnsb VRR_VV "vector fp perform sign operation short" arch12 zarch vx2 +-e700001820cc wflnsb VRR_VV "scalar vector fp perform sign operation scalar short" arch12 zarch vx2 +-e700002020cc vflpsb VRR_VV "vector fp perform sign operation short" arch12 zarch vx2 +-e700002820cc wflpsb VRR_VV "scalar vector fp perform sign operation scalar short" arch12 zarch vx2 +-e700000840cc wfpsoxb VRR_VV0U2 "scalar vector fp perform sign operation scalar extended" arch12 zarch vx2 +-e700000840cc wflcxb VRR_VV "scalar vector fp perform sign operation scalar extended" arch12 zarch vx2 +-e700001840cc wflnxb VRR_VV "scalar vector fp perform sign operation scalar extended" arch12 zarch vx2 +-e700002840cc wflpxb VRR_VV "scalar vector fp perform sign operation scalar extended" arch12 zarch vx2 +-e700000020ce vfsqsb VRR_VV "vector fp square root short" arch12 zarch vx2 +-e700000820ce wfsqsb VRR_VV "scalar vector fp square root scalar short" arch12 zarch vx2 +-e700000840ce wfsqxb VRR_VV "scalar vector fp square root scalar extended" arch12 zarch vx2 +-e700000020e2 vfssb VRR_VVV "vector fp subtract short" arch12 zarch vx2 +-e700000820e2 wfssb VRR_VVV "scalar vector fp subtract scalar short" arch12 zarch vx2 +-e700000840e2 wfsxb VRR_VVV "scalar vector fp subtract scalar extended" arch12 zarch vx2 +-e7000000204a vftcisb VRI_VVU2 "vector fp test data class immediate short" arch12 zarch vx2 +-e7000008204a wftcisb VRI_VVU2 "scalar vector fp test data class immediate scalar short" arch12 zarch vx2 +-e7000008404a wftcixb VRI_VVU2 "scalar vector fp test data class immediate scalar extended" arch12 zarch vx2 ++e700000020e5 vfdsb VRR_VVV "vector fp divide short" arch12 zarch ++e700000820e5 wfdsb VRR_VVV "scalar vector fp divide scalar short" arch12 zarch ++e700000840e5 wfdxb VRR_VVV "scalar vector fp divide scalar extended" arch12 zarch ++e700000020c7 vfisb VRR_VV0UU "vector load fp integer short" arch12 zarch ++e700000820c7 wfisb VRR_VV0UU8 "scalar vector load fp integer scalar short" arch12 zarch ++e700000840c7 wfixb VRR_VV0UU8 "scalar vector load fp integer scalar extended" arch12 zarch ++e700000000c4 vfll VRR_VV0UU2 "vector fp load lengthened" arch12 zarch ++e700000020c4 vflls VRR_VV "vector fp load lengthened" arch12 zarch ++e700000820c4 wflls VRR_VV "scalar vector fp load lengthened short" arch12 zarch ++e700000830c4 wflld VRR_VV "scalar vector fp load lengthened long" arch12 zarch ++e700000000c5 vflr VRR_VV0UUU "vector fp load rounded" arch12 zarch ++e700000030c5 vflrd VRR_VV0UU "vector fp load rounded long" arch12 zarch ++e700000830c5 wflrd VRR_VV0UU8 "scalar vector fp load rounded long" arch12 zarch ++e700000840c5 wflrx VRR_VV0UU8 "scalar vector fp load rounded extended" arch12 zarch ++e700000000ef vfmax VRR_VVV0UUU "vector fp maximum" arch12 zarch ++e700000020ef vfmaxsb VRR_VVV0U0 "vector fp maximum short" arch12 zarch ++e700000030ef vfmaxdb VRR_VVV0U0 "vector fp maximum long" arch12 zarch ++e700000820ef wfmaxsb VRR_VVV0U0 "scalar fp maximum scalar short" arch12 zarch ++e700000830ef wfmaxdb VRR_VVV0U0 "scalar fp maximum scalar long" arch12 zarch ++e700000840ef wfmaxxb VRR_VVV0U0 "scalar fp maximum scalar extended" arch12 zarch ++e700000000ee vfmin VRR_VVV0UUU "vector fp minimum" arch12 zarch ++e700000020ee vfminsb VRR_VVV0U0 "vector fp minimum short" arch12 zarch ++e700000030ee vfmindb VRR_VVV0U0 "vector fp minimum long" arch12 zarch ++e700000820ee wfminsb VRR_VVV0U0 "scalar fp minimum scalar short" arch12 zarch ++e700000830ee wfmindb VRR_VVV0U0 "scalar fp minimum scalar long" arch12 zarch ++e700000840ee wfminxb VRR_VVV0U0 "scalar fp minimum scalar extended" arch12 zarch ++e700000020e7 vfmsb VRR_VVV "vector fp multiply short" arch12 zarch ++e700000820e7 wfmsb VRR_VVV "scalar vector fp multiply scalar short" arch12 zarch ++e700000840e7 wfmxb VRR_VVV "scalar vector fp multiply scalar extended" arch12 zarch ++e7000200008f vfmasb VRR_VVVV "vector fp multiply and add short" arch12 zarch ++e7000208008f wfmasb VRR_VVVV "scalar vector fp multiply and add scalar short" arch12 zarch ++e7000408008f wfmaxb VRR_VVVV "scalar vector fp multiply and add scalar extended" arch12 zarch ++e7000200008e vfmssb VRR_VVVV "vector fp multiply and subtract short" arch12 zarch ++e7000208008e wfmssb VRR_VVVV "scalar vector fp multiply and subtract scalar short" arch12 zarch ++e7000408008e wfmsxb VRR_VVVV "scalar vector fp multiply and subtract scalar extended" arch12 zarch ++e7000000009f vfnma VRR_VVVU0UV "vector fp negative multiply and add" arch12 zarch ++e7000200009f vfnmasb VRR_VVVV "vector fp negative multiply and add short" arch12 zarch ++e7000208009f wfnmasb VRR_VVVV "scalar vector fp negative multiply and add scalar short" arch12 zarch ++e7000300009f vfnmadb VRR_VVVV "vector fp negative multiply and add long" arch12 zarch ++e7000308009f wfnmadb VRR_VVVV "scalar vector fp negative multiply and add scalar long" arch12 zarch ++e7000408009f wfnmaxb VRR_VVVV "scalar vector fp negative multiply and add scalar extended" arch12 zarch ++e7000000009e vfnms VRR_VVVU0UV "vector fp negative multiply and subtract" arch12 zarch ++e7000200009e vfnmssb VRR_VVVV "vector fp negative multiply and subtract short" arch12 zarch ++e7000208009e wfnmssb VRR_VVVV "scalar vector fp negative multiply and subtract scalar short" arch12 zarch ++e7000300009e vfnmsdb VRR_VVVV "vector fp negative multiply and subtract long" arch12 zarch ++e7000308009e wfnmsdb VRR_VVVV "scalar vector fp negative multiply and subtract scalar long" arch12 zarch ++e7000408009e wfnmsxb VRR_VVVV "scalar vector fp negative multiply and subtract scalar extended" arch12 zarch ++e700000020cc vfpsosb VRR_VV0U2 "vector fp perform sign operation short" arch12 zarch ++e700000820cc wfpsosb VRR_VV0U2 "scalar vector fp perform sign operation scalar short" arch12 zarch ++e700000020cc vflcsb VRR_VV "vector fp perform sign operation short" arch12 zarch ++e700000820cc wflcsb VRR_VV "scalar vector fp perform sign operation scalar short" arch12 zarch ++e700001020cc vflnsb VRR_VV "vector fp perform sign operation short" arch12 zarch ++e700001820cc wflnsb VRR_VV "scalar vector fp perform sign operation scalar short" arch12 zarch ++e700002020cc vflpsb VRR_VV "vector fp perform sign operation short" arch12 zarch ++e700002820cc wflpsb VRR_VV "scalar vector fp perform sign operation scalar short" arch12 zarch ++e700000840cc wfpsoxb VRR_VV0U2 "scalar vector fp perform sign operation scalar extended" arch12 zarch ++e700000840cc wflcxb VRR_VV "scalar vector fp perform sign operation scalar extended" arch12 zarch ++e700001840cc wflnxb VRR_VV "scalar vector fp perform sign operation scalar extended" arch12 zarch ++e700002840cc wflpxb VRR_VV "scalar vector fp perform sign operation scalar extended" arch12 zarch ++e700000020ce vfsqsb VRR_VV "vector fp square root short" arch12 zarch ++e700000820ce wfsqsb VRR_VV "scalar vector fp square root scalar short" arch12 zarch ++e700000840ce wfsqxb VRR_VV "scalar vector fp square root scalar extended" arch12 zarch ++e700000020e2 vfssb VRR_VVV "vector fp subtract short" arch12 zarch ++e700000820e2 wfssb VRR_VVV "scalar vector fp subtract scalar short" arch12 zarch ++e700000840e2 wfsxb VRR_VVV "scalar vector fp subtract scalar extended" arch12 zarch ++e7000000204a vftcisb VRI_VVU2 "vector fp test data class immediate short" arch12 zarch ++e7000008204a wftcisb VRI_VVU2 "scalar vector fp test data class immediate scalar short" arch12 zarch ++e7000008404a wftcixb VRI_VVU2 "scalar vector fp test data class immediate scalar extended" arch12 zarch + + # Miscellaneous Instruction Extensions Facility 2 + +@@ -1843,28 +1843,28 @@ e30000000039 sgh RXY_RRRD "subtract halfword from 64 bit value" arch12 zarch + + # Vector packed decimal facility + +-e60000000037 vlrlr VRS_RRDV "vector load rightmost with length" arch12 zarch vx2 +-e60000000035 vlrl VSI_URDV "vector load rightmost with immediate length" arch12 zarch vx2 +-e6000000003f vstrlr VRS_RRDV "vector store rightmost with length" arch12 zarch vx2 +-e6000000003d vstrl VSI_URDV "vector store rightmost with immediate length" arch12 zarch vx2 +-e60000000071 vap VRI_VVV0UU2 "vector add decimal" arch12 zarch vx2 +-e60000000077 vcp VRR_0VV0U "vector compare decimal" arch12 zarch vx2 +-e60000000050 vcvb VRR_RV0U "vector convert to binary 32 bit" arch12 zarch vx2 +-e60000000052 vcvbg VRR_RV0U "vector convert to binary 64 bit" arch12 zarch vx2 +-e60000000058 vcvd VRI_VR0UU "vector convert to decimal 32 bit" arch12 zarch vx2 +-e6000000005a vcvdg VRI_VR0UU "vector convert to decimal 64 bit" arch12 zarch vx2 +-e6000000007a vdp VRI_VVV0UU2 "vector divide decimal" arch12 zarch vx2 +-e60000000049 vlip VRI_V0UU2 "vector load immediate decimal" arch12 zarch vx2 +-e60000000078 vmp VRI_VVV0UU2 "vector multiply decimal" arch12 zarch vx2 +-e60000000079 vmsp VRI_VVV0UU2 "vector multiply and shift decimal" arch12 zarch vx2 +-e60000000034 vpkz VSI_URDV "vector pack zoned" arch12 zarch vx2 +-e6000000005b vpsop VRI_VVUUU2 "vector perform sign operation decimal" arch12 zarch vx2 +-e6000000007b vrp VRI_VVV0UU2 "vector remainder decimal" arch12 zarch vx2 +-e6000000007e vsdp VRI_VVV0UU2 "vector shift and divide decimal" arch12 zarch vx2 +-e60000000059 vsrp VRI_VVUUU2 "vector shift and round decimal" arch12 zarch vx2 +-e60000000073 vsp VRI_VVV0UU2 "vector subtract decimal" arch12 zarch vx2 +-e6000000005f vtp VRR_0V "vector test decimal" arch12 zarch vx2 +-e6000000003c vupkz VSI_URDV "vector unpack zoned" arch12 zarch vx2 ++e60000000037 vlrlr VRS_RRDV "vector load rightmost with length" arch12 zarch ++e60000000035 vlrl VSI_URDV "vector load rightmost with immediate length" arch12 zarch ++e6000000003f vstrlr VRS_RRDV "vector store rightmost with length" arch12 zarch ++e6000000003d vstrl VSI_URDV "vector store rightmost with immediate length" arch12 zarch ++e60000000071 vap VRI_VVV0UU2 "vector add decimal" arch12 zarch ++e60000000077 vcp VRR_0VV0U "vector compare decimal" arch12 zarch ++e60000000050 vcvb VRR_RV0U "vector convert to binary 32 bit" arch12 zarch ++e60000000052 vcvbg VRR_RV0U "vector convert to binary 64 bit" arch12 zarch ++e60000000058 vcvd VRI_VR0UU "vector convert to decimal 32 bit" arch12 zarch ++e6000000005a vcvdg VRI_VR0UU "vector convert to decimal 64 bit" arch12 zarch ++e6000000007a vdp VRI_VVV0UU2 "vector divide decimal" arch12 zarch ++e60000000049 vlip VRI_V0UU2 "vector load immediate decimal" arch12 zarch ++e60000000078 vmp VRI_VVV0UU2 "vector multiply decimal" arch12 zarch ++e60000000079 vmsp VRI_VVV0UU2 "vector multiply and shift decimal" arch12 zarch ++e60000000034 vpkz VSI_URDV "vector pack zoned" arch12 zarch ++e6000000005b vpsop VRI_VVUUU2 "vector perform sign operation decimal" arch12 zarch ++e6000000007b vrp VRI_VVV0UU2 "vector remainder decimal" arch12 zarch ++e6000000007e vsdp VRI_VVV0UU2 "vector shift and divide decimal" arch12 zarch ++e60000000059 vsrp VRI_VVUUU2 "vector shift and round decimal" arch12 zarch ++e60000000073 vsp VRI_VVV0UU2 "vector subtract decimal" arch12 zarch ++e6000000005f vtp VRR_0V "vector test decimal" arch12 zarch ++e6000000003c vupkz VSI_URDV "vector unpack zoned" arch12 zarch + + # Guarded storage facility -@@ -4742,8 +4742,7 @@ const struct powerpc_opcode powerpc_opcodes[] = { - {"tlbilxva", XTO(31,18,3), XTO_MASK, E500MC|PPCA2, PPCNONE, {RA0, RB}}, - {"tlbilx", X(31,18), X_MASK, E500MC|PPCA2, PPCNONE, {T, RA0, RB}}, - --{"mfcr", XFXM(31,19,0,0), XFXFXM_MASK, POWER4, PPCNONE, {RT, FXM4}}, --{"mfcr", XFXM(31,19,0,0), XRARB_MASK, COM|PPCVLE, POWER4, {RT}}, -+{"mfcr", XFXM(31,19,0,0), XFXFXM_MASK, COM|PPCVLE, PPCNONE, {RT, FXM4}}, - {"mfocrf", XFXM(31,19,0,1), XFXFXM_MASK, COM|PPCVLE, PPCNONE, {RT, FXM}}, - - {"lwarx", X(31,20), XEH_MASK, PPC|PPCVLE, PPCNONE, {RT, RA0, RB, EH}}, diff --git a/debian/patches/branch-version.diff b/debian/patches/branch-version.diff index c2d6dce..57c9d4d 100644 --- a/debian/patches/branch-version.diff +++ b/debian/patches/branch-version.diff @@ -1,3 +1,27 @@ +# DP: Don't bump the version when doing distro builds + +git diff 65a5565505619c451987c77f199d0d1b0a84349b 2870b1ba83fc0e0ee7eadf72d614a7ec4591b169 + +Index: b/bfd/ChangeLog +=================================================================== +--- a/bfd/ChangeLog ++++ b/bfd/ChangeLog +@@ -6,15 +6,6 @@ + + 2016-08-03 Tristan Gingold <gingold@adacore.com> + +- * version.m4: Bump version to 2.28.0 +- * configure: Regenerate. +- +-2016-08-03 Tristan Gingold <gingold@adacore.com> +- +- * development.sh: Set development to true. +- +-2016-08-03 Tristan Gingold <gingold@adacore.com> +- + * version.m4: Bump version to 2.28 + * configure: Regenerate. + Index: b/bfd/configure =================================================================== --- a/bfd/configure @@ -5,8 +29,8 @@ Index: b/bfd/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. --# Generated by GNU Autoconf 2.64 for bfd 2.26.0. -+# Generated by GNU Autoconf 2.64 for bfd 2.26. +-# Generated by GNU Autoconf 2.64 for bfd 2.28.0. ++# Generated by GNU Autoconf 2.64 for bfd 2.28. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software @@ -14,83 +38,108 @@ Index: b/bfd/configure # Identity of this package. PACKAGE_NAME='bfd' PACKAGE_TARNAME='bfd' --PACKAGE_VERSION='2.26.0' --PACKAGE_STRING='bfd 2.26.0' -+PACKAGE_VERSION='2.26' -+PACKAGE_STRING='bfd 2.26' +-PACKAGE_VERSION='2.28.0' +-PACKAGE_STRING='bfd 2.28.0' ++PACKAGE_VERSION='2.28' ++PACKAGE_STRING='bfd 2.28' PACKAGE_BUGREPORT='' PACKAGE_URL='' -@@ -1351,7 +1351,7 @@ if test "$ac_init_help" = "long"; then +@@ -1353,7 +1353,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF --\`configure' configures bfd 2.26.0 to adapt to many kinds of systems. -+\`configure' configures bfd 2.26 to adapt to many kinds of systems. +-\`configure' configures bfd 2.28.0 to adapt to many kinds of systems. ++\`configure' configures bfd 2.28 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... -@@ -1422,7 +1422,7 @@ fi +@@ -1424,7 +1424,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in -- short | recursive ) echo "Configuration of bfd 2.26.0:";; -+ short | recursive ) echo "Configuration of bfd 2.26:";; +- short | recursive ) echo "Configuration of bfd 2.28.0:";; ++ short | recursive ) echo "Configuration of bfd 2.28:";; esac cat <<\_ACEOF -@@ -1543,7 +1543,7 @@ fi +@@ -1545,7 +1545,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF --bfd configure 2.26.0 -+bfd configure 2.26 +-bfd configure 2.28.0 ++bfd configure 2.28 generated by GNU Autoconf 2.64 Copyright (C) 2009 Free Software Foundation, Inc. -@@ -2185,7 +2185,7 @@ cat >config.log <<_ACEOF +@@ -2187,7 +2187,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. --It was created by bfd $as_me 2.26.0, which was -+It was created by bfd $as_me 2.26, which was +-It was created by bfd $as_me 2.28.0, which was ++It was created by bfd $as_me 2.28, which was generated by GNU Autoconf 2.64. Invocation command line was $ $0 $@ -@@ -3993,7 +3993,7 @@ fi +@@ -3996,7 +3996,7 @@ fi # Define the identity of the package. PACKAGE='bfd' -- VERSION='2.26.0' -+ VERSION='2.26' +- VERSION='2.28.0' ++ VERSION='2.28' cat >>confdefs.h <<_ACEOF -@@ -16533,7 +16533,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri +@@ -16576,7 +16576,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" --This file was extended by bfd $as_me 2.26.0, which was -+This file was extended by bfd $as_me 2.26, which was +-This file was extended by bfd $as_me 2.28.0, which was ++This file was extended by bfd $as_me 2.28, which was generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES -@@ -16597,7 +16597,7 @@ Report bugs to the package provider." +@@ -16640,7 +16640,7 @@ Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ --bfd config.status 2.26.0 -+bfd config.status 2.26 +-bfd config.status 2.28.0 ++bfd config.status 2.28 configured by $0, generated by GNU Autoconf 2.64, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +Index: b/bfd/development.sh +=================================================================== +--- a/bfd/development.sh ++++ b/bfd/development.sh +@@ -16,4 +16,4 @@ + # along with this program. If not, see <http://www.gnu.org/licenses/>. + + # Controls whether to enable development-mode features by default. +-development=true ++development=false Index: b/bfd/version.m4 =================================================================== --- a/bfd/version.m4 +++ b/bfd/version.m4 @@ -1 +1 @@ --m4_define([BFD_VERSION], [2.26.0]) -+m4_define([BFD_VERSION], [2.26]) +-m4_define([BFD_VERSION], [2.28.0]) ++m4_define([BFD_VERSION], [2.28]) +Index: b/binutils/ChangeLog +=================================================================== +--- a/binutils/ChangeLog ++++ b/binutils/ChangeLog +@@ -2,10 +2,6 @@ + + * configure: Regenerate. + +-2016-08-03 Tristan Gingold <gingold@adacore.com> +- +- * configure: Regenerate. +- + 2016-07-01 Nick Clifton <nickc@redhat.com> + + * Import this patch from the mainline: Index: b/binutils/configure =================================================================== --- a/binutils/configure @@ -98,8 +147,8 @@ Index: b/binutils/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. --# Generated by GNU Autoconf 2.64 for binutils 2.26.0. -+# Generated by GNU Autoconf 2.64 for binutils 2.26. +-# Generated by GNU Autoconf 2.64 for binutils 2.28.0. ++# Generated by GNU Autoconf 2.64 for binutils 2.28. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software @@ -107,76 +156,91 @@ Index: b/binutils/configure # Identity of this package. PACKAGE_NAME='binutils' PACKAGE_TARNAME='binutils' --PACKAGE_VERSION='2.26.0' --PACKAGE_STRING='binutils 2.26.0' -+PACKAGE_VERSION='2.26' -+PACKAGE_STRING='binutils 2.26' +-PACKAGE_VERSION='2.28.0' +-PACKAGE_STRING='binutils 2.28.0' ++PACKAGE_VERSION='2.28' ++PACKAGE_STRING='binutils 2.28' PACKAGE_BUGREPORT='' PACKAGE_URL='' -@@ -1335,7 +1335,7 @@ if test "$ac_init_help" = "long"; then +@@ -1337,7 +1337,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF --\`configure' configures binutils 2.26.0 to adapt to many kinds of systems. -+\`configure' configures binutils 2.26 to adapt to many kinds of systems. +-\`configure' configures binutils 2.28.0 to adapt to many kinds of systems. ++\`configure' configures binutils 2.28 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... -@@ -1406,7 +1406,7 @@ fi +@@ -1408,7 +1408,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in -- short | recursive ) echo "Configuration of binutils 2.26.0:";; -+ short | recursive ) echo "Configuration of binutils 2.26:";; +- short | recursive ) echo "Configuration of binutils 2.28.0:";; ++ short | recursive ) echo "Configuration of binutils 2.28:";; esac cat <<\_ACEOF -@@ -1527,7 +1527,7 @@ fi +@@ -1529,7 +1529,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF --binutils configure 2.26.0 -+binutils configure 2.26 +-binutils configure 2.28.0 ++binutils configure 2.28 generated by GNU Autoconf 2.64 Copyright (C) 2009 Free Software Foundation, Inc. -@@ -2169,7 +2169,7 @@ cat >config.log <<_ACEOF +@@ -2171,7 +2171,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. --It was created by binutils $as_me 2.26.0, which was -+It was created by binutils $as_me 2.26, which was +-It was created by binutils $as_me 2.28.0, which was ++It was created by binutils $as_me 2.28, which was generated by GNU Autoconf 2.64. Invocation command line was $ $0 $@ -@@ -3977,7 +3977,7 @@ fi +@@ -3980,7 +3980,7 @@ fi # Define the identity of the package. PACKAGE='binutils' -- VERSION='2.26.0' -+ VERSION='2.26' +- VERSION='2.28.0' ++ VERSION='2.28' cat >>confdefs.h <<_ACEOF -@@ -15142,7 +15142,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri +@@ -15179,7 +15179,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" --This file was extended by binutils $as_me 2.26.0, which was -+This file was extended by binutils $as_me 2.26, which was +-This file was extended by binutils $as_me 2.28.0, which was ++This file was extended by binutils $as_me 2.28, which was generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES -@@ -15206,7 +15206,7 @@ Report bugs to the package provider." +@@ -15243,7 +15243,7 @@ Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ --binutils config.status 2.26.0 -+binutils config.status 2.26 +-binutils config.status 2.28.0 ++binutils config.status 2.28 configured by $0, generated by GNU Autoconf 2.64, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +Index: b/gas/ChangeLog +=================================================================== +--- a/gas/ChangeLog ++++ b/gas/ChangeLog +@@ -2,10 +2,6 @@ + + * configure: Regenerate. + +-2016-08-03 Tristan Gingold <gingold@adacore.com> +- +- * configure: Regenerate. +- + 2016-07-01 Tristan Gingold <gingold@adacore.com> + + * configure: Regenerate. Index: b/gas/configure =================================================================== --- a/gas/configure @@ -184,8 +248,8 @@ Index: b/gas/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. --# Generated by GNU Autoconf 2.64 for gas 2.26.0. -+# Generated by GNU Autoconf 2.64 for gas 2.26. +-# Generated by GNU Autoconf 2.64 for gas 2.28.0. ++# Generated by GNU Autoconf 2.64 for gas 2.28. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software @@ -193,76 +257,91 @@ Index: b/gas/configure # Identity of this package. PACKAGE_NAME='gas' PACKAGE_TARNAME='gas' --PACKAGE_VERSION='2.26.0' --PACKAGE_STRING='gas 2.26.0' -+PACKAGE_VERSION='2.26' -+PACKAGE_STRING='gas 2.26' +-PACKAGE_VERSION='2.28.0' +-PACKAGE_STRING='gas 2.28.0' ++PACKAGE_VERSION='2.28' ++PACKAGE_STRING='gas 2.28' PACKAGE_BUGREPORT='' PACKAGE_URL='' -@@ -1323,7 +1323,7 @@ if test "$ac_init_help" = "long"; then +@@ -1328,7 +1328,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF --\`configure' configures gas 2.26.0 to adapt to many kinds of systems. -+\`configure' configures gas 2.26 to adapt to many kinds of systems. +-\`configure' configures gas 2.28.0 to adapt to many kinds of systems. ++\`configure' configures gas 2.28 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... -@@ -1394,7 +1394,7 @@ fi +@@ -1399,7 +1399,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in -- short | recursive ) echo "Configuration of gas 2.26.0:";; -+ short | recursive ) echo "Configuration of gas 2.26:";; +- short | recursive ) echo "Configuration of gas 2.28.0:";; ++ short | recursive ) echo "Configuration of gas 2.28:";; esac cat <<\_ACEOF -@@ -1510,7 +1510,7 @@ fi +@@ -1521,7 +1521,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF --gas configure 2.26.0 -+gas configure 2.26 +-gas configure 2.28.0 ++gas configure 2.28 generated by GNU Autoconf 2.64 Copyright (C) 2009 Free Software Foundation, Inc. -@@ -1920,7 +1920,7 @@ cat >config.log <<_ACEOF +@@ -1931,7 +1931,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. --It was created by gas $as_me 2.26.0, which was -+It was created by gas $as_me 2.26, which was +-It was created by gas $as_me 2.28.0, which was ++It was created by gas $as_me 2.28, which was generated by GNU Autoconf 2.64. Invocation command line was $ $0 $@ -@@ -3728,7 +3728,7 @@ fi +@@ -3740,7 +3740,7 @@ fi # Define the identity of the package. PACKAGE='gas' -- VERSION='2.26.0' -+ VERSION='2.26' +- VERSION='2.28.0' ++ VERSION='2.28' cat >>confdefs.h <<_ACEOF -@@ -15029,7 +15029,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri +@@ -15137,7 +15137,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" --This file was extended by gas $as_me 2.26.0, which was -+This file was extended by gas $as_me 2.26, which was +-This file was extended by gas $as_me 2.28.0, which was ++This file was extended by gas $as_me 2.28, which was generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES -@@ -15093,7 +15093,7 @@ Report bugs to the package provider." +@@ -15201,7 +15201,7 @@ Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ --gas config.status 2.26.0 -+gas config.status 2.26 +-gas config.status 2.28.0 ++gas config.status 2.28 configured by $0, generated by GNU Autoconf 2.64, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +Index: b/gprof/ChangeLog +=================================================================== +--- a/gprof/ChangeLog ++++ b/gprof/ChangeLog +@@ -2,10 +2,6 @@ + + * configure: Regenerate. + +-2016-08-03 Tristan Gingold <gingold@adacore.com> +- +- * configure: Regenerate. +- + 2016-07-01 Tristan Gingold <gingold@adacore.com> + + * configure: Regenerate. Index: b/gprof/configure =================================================================== --- a/gprof/configure @@ -270,8 +349,8 @@ Index: b/gprof/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. --# Generated by GNU Autoconf 2.64 for gprof 2.26.0. -+# Generated by GNU Autoconf 2.64 for gprof 2.26. +-# Generated by GNU Autoconf 2.64 for gprof 2.28.0. ++# Generated by GNU Autoconf 2.64 for gprof 2.28. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software @@ -279,76 +358,91 @@ Index: b/gprof/configure # Identity of this package. PACKAGE_NAME='gprof' PACKAGE_TARNAME='gprof' --PACKAGE_VERSION='2.26.0' --PACKAGE_STRING='gprof 2.26.0' -+PACKAGE_VERSION='2.26' -+PACKAGE_STRING='gprof 2.26' +-PACKAGE_VERSION='2.28.0' +-PACKAGE_STRING='gprof 2.28.0' ++PACKAGE_VERSION='2.28' ++PACKAGE_STRING='gprof 2.28' PACKAGE_BUGREPORT='' PACKAGE_URL='' -@@ -1299,7 +1299,7 @@ if test "$ac_init_help" = "long"; then +@@ -1301,7 +1301,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF --\`configure' configures gprof 2.26.0 to adapt to many kinds of systems. -+\`configure' configures gprof 2.26 to adapt to many kinds of systems. +-\`configure' configures gprof 2.28.0 to adapt to many kinds of systems. ++\`configure' configures gprof 2.28 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... -@@ -1370,7 +1370,7 @@ fi +@@ -1372,7 +1372,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in -- short | recursive ) echo "Configuration of gprof 2.26.0:";; -+ short | recursive ) echo "Configuration of gprof 2.26:";; +- short | recursive ) echo "Configuration of gprof 2.28.0:";; ++ short | recursive ) echo "Configuration of gprof 2.28:";; esac cat <<\_ACEOF -@@ -1476,7 +1476,7 @@ fi +@@ -1478,7 +1478,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF --gprof configure 2.26.0 -+gprof configure 2.26 +-gprof configure 2.28.0 ++gprof configure 2.28 generated by GNU Autoconf 2.64 Copyright (C) 2009 Free Software Foundation, Inc. -@@ -1841,7 +1841,7 @@ cat >config.log <<_ACEOF +@@ -1843,7 +1843,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. --It was created by gprof $as_me 2.26.0, which was -+It was created by gprof $as_me 2.26, which was +-It was created by gprof $as_me 2.28.0, which was ++It was created by gprof $as_me 2.28, which was generated by GNU Autoconf 2.64. Invocation command line was $ $0 $@ -@@ -3649,7 +3649,7 @@ fi +@@ -3652,7 +3652,7 @@ fi # Define the identity of the package. PACKAGE='gprof' -- VERSION='2.26.0' -+ VERSION='2.26' +- VERSION='2.28.0' ++ VERSION='2.28' cat >>confdefs.h <<_ACEOF -@@ -12706,7 +12706,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri +@@ -12743,7 +12743,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" --This file was extended by gprof $as_me 2.26.0, which was -+This file was extended by gprof $as_me 2.26, which was +-This file was extended by gprof $as_me 2.28.0, which was ++This file was extended by gprof $as_me 2.28, which was generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES -@@ -12770,7 +12770,7 @@ Report bugs to the package provider." +@@ -12807,7 +12807,7 @@ Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ --gprof config.status 2.26.0 -+gprof config.status 2.26 +-gprof config.status 2.28.0 ++gprof config.status 2.28 configured by $0, generated by GNU Autoconf 2.64, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +Index: b/ld/ChangeLog +=================================================================== +--- a/ld/ChangeLog ++++ b/ld/ChangeLog +@@ -20,10 +20,6 @@ + + * configure: Regenerate. + +-2016-08-03 Tristan Gingold <gingold@adacore.com> +- +- * configure: Regenerate. +- + 2016-07-19 Roland McGrath <roland@hack.frob.com> + + * emulparams/aarch64elf.sh (GENERATE_PIE_SCRIPT): Set to yes. Index: b/ld/configure =================================================================== --- a/ld/configure @@ -356,8 +450,8 @@ Index: b/ld/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. --# Generated by GNU Autoconf 2.64 for ld 2.26.0. -+# Generated by GNU Autoconf 2.64 for ld 2.26. +-# Generated by GNU Autoconf 2.64 for ld 2.28.0. ++# Generated by GNU Autoconf 2.64 for ld 2.28. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software @@ -365,76 +459,91 @@ Index: b/ld/configure # Identity of this package. PACKAGE_NAME='ld' PACKAGE_TARNAME='ld' --PACKAGE_VERSION='2.26.0' --PACKAGE_STRING='ld 2.26.0' -+PACKAGE_VERSION='2.26' -+PACKAGE_STRING='ld 2.26' +-PACKAGE_VERSION='2.28.0' +-PACKAGE_STRING='ld 2.28.0' ++PACKAGE_VERSION='2.28' ++PACKAGE_STRING='ld 2.28' PACKAGE_BUGREPORT='' PACKAGE_URL='' -@@ -1350,7 +1350,7 @@ if test "$ac_init_help" = "long"; then +@@ -1353,7 +1353,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF --\`configure' configures ld 2.26.0 to adapt to many kinds of systems. -+\`configure' configures ld 2.26 to adapt to many kinds of systems. +-\`configure' configures ld 2.28.0 to adapt to many kinds of systems. ++\`configure' configures ld 2.28 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... -@@ -1421,7 +1421,7 @@ fi +@@ -1424,7 +1424,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in -- short | recursive ) echo "Configuration of ld 2.26.0:";; -+ short | recursive ) echo "Configuration of ld 2.26:";; +- short | recursive ) echo "Configuration of ld 2.28.0:";; ++ short | recursive ) echo "Configuration of ld 2.28:";; esac cat <<\_ACEOF -@@ -1545,7 +1545,7 @@ fi +@@ -1549,7 +1549,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF --ld configure 2.26.0 -+ld configure 2.26 +-ld configure 2.28.0 ++ld configure 2.28 generated by GNU Autoconf 2.64 Copyright (C) 2009 Free Software Foundation, Inc. -@@ -2254,7 +2254,7 @@ cat >config.log <<_ACEOF +@@ -2258,7 +2258,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. --It was created by ld $as_me 2.26.0, which was -+It was created by ld $as_me 2.26, which was +-It was created by ld $as_me 2.28.0, which was ++It was created by ld $as_me 2.28, which was generated by GNU Autoconf 2.64. Invocation command line was $ $0 $@ -@@ -4063,7 +4063,7 @@ fi +@@ -4068,7 +4068,7 @@ fi # Define the identity of the package. PACKAGE='ld' -- VERSION='2.26.0' -+ VERSION='2.26' +- VERSION='2.28.0' ++ VERSION='2.28' cat >>confdefs.h <<_ACEOF -@@ -17740,7 +17740,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri +@@ -17769,7 +17769,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" --This file was extended by ld $as_me 2.26.0, which was -+This file was extended by ld $as_me 2.26, which was +-This file was extended by ld $as_me 2.28.0, which was ++This file was extended by ld $as_me 2.28, which was generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES -@@ -17804,7 +17804,7 @@ Report bugs to the package provider." +@@ -17833,7 +17833,7 @@ Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ --ld config.status 2.26.0 -+ld config.status 2.26 +-ld config.status 2.28.0 ++ld config.status 2.28 configured by $0, generated by GNU Autoconf 2.64, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +Index: b/opcodes/ChangeLog +=================================================================== +--- a/opcodes/ChangeLog ++++ b/opcodes/ChangeLog +@@ -2,10 +2,6 @@ + + * configure: Regenerate. + +-2016-08-03 Tristan Gingold <gingold@adacore.com> +- +- * configure: Regenerate. +- + 2016-07-01 Tristan Gingold <gingold@adacore.com> + + * configure: Regenerate. Index: b/opcodes/configure =================================================================== --- a/opcodes/configure @@ -442,8 +551,8 @@ Index: b/opcodes/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. --# Generated by GNU Autoconf 2.64 for opcodes 2.26.0. -+# Generated by GNU Autoconf 2.64 for opcodes 2.26. +-# Generated by GNU Autoconf 2.64 for opcodes 2.28.0. ++# Generated by GNU Autoconf 2.64 for opcodes 2.28. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software @@ -451,73 +560,73 @@ Index: b/opcodes/configure # Identity of this package. PACKAGE_NAME='opcodes' PACKAGE_TARNAME='opcodes' --PACKAGE_VERSION='2.26.0' --PACKAGE_STRING='opcodes 2.26.0' -+PACKAGE_VERSION='2.26' -+PACKAGE_STRING='opcodes 2.26' +-PACKAGE_VERSION='2.28.0' +-PACKAGE_STRING='opcodes 2.28.0' ++PACKAGE_VERSION='2.28' ++PACKAGE_STRING='opcodes 2.28' PACKAGE_BUGREPORT='' PACKAGE_URL='' -@@ -1319,7 +1319,7 @@ if test "$ac_init_help" = "long"; then +@@ -1321,7 +1321,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF --\`configure' configures opcodes 2.26.0 to adapt to many kinds of systems. -+\`configure' configures opcodes 2.26 to adapt to many kinds of systems. +-\`configure' configures opcodes 2.28.0 to adapt to many kinds of systems. ++\`configure' configures opcodes 2.28 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... -@@ -1390,7 +1390,7 @@ fi +@@ -1392,7 +1392,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in -- short | recursive ) echo "Configuration of opcodes 2.26.0:";; -+ short | recursive ) echo "Configuration of opcodes 2.26:";; +- short | recursive ) echo "Configuration of opcodes 2.28.0:";; ++ short | recursive ) echo "Configuration of opcodes 2.28:";; esac cat <<\_ACEOF -@@ -1497,7 +1497,7 @@ fi +@@ -1499,7 +1499,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF --opcodes configure 2.26.0 -+opcodes configure 2.26 +-opcodes configure 2.28.0 ++opcodes configure 2.28 generated by GNU Autoconf 2.64 Copyright (C) 2009 Free Software Foundation, Inc. -@@ -1907,7 +1907,7 @@ cat >config.log <<_ACEOF +@@ -1909,7 +1909,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. --It was created by opcodes $as_me 2.26.0, which was -+It was created by opcodes $as_me 2.26, which was +-It was created by opcodes $as_me 2.28.0, which was ++It was created by opcodes $as_me 2.28, which was generated by GNU Autoconf 2.64. Invocation command line was $ $0 $@ -@@ -3715,7 +3715,7 @@ fi +@@ -3718,7 +3718,7 @@ fi # Define the identity of the package. PACKAGE='opcodes' -- VERSION='2.26.0' -+ VERSION='2.26' +- VERSION='2.28.0' ++ VERSION='2.28' cat >>confdefs.h <<_ACEOF -@@ -13223,7 +13223,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri +@@ -13260,7 +13260,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" --This file was extended by opcodes $as_me 2.26.0, which was -+This file was extended by opcodes $as_me 2.26, which was +-This file was extended by opcodes $as_me 2.28.0, which was ++This file was extended by opcodes $as_me 2.28, which was generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES -@@ -13287,7 +13287,7 @@ Report bugs to the package provider." +@@ -13324,7 +13324,7 @@ Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ --opcodes config.status 2.26.0 -+opcodes config.status 2.26 +-opcodes config.status 2.28.0 ++opcodes config.status 2.28 configured by $0, generated by GNU Autoconf 2.64, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/debian/patches/gold-mips.diff b/debian/patches/gold-mips.diff new file mode 100644 index 0000000..291a2aa --- /dev/null +++ b/debian/patches/gold-mips.diff @@ -0,0 +1,39 @@ +# DP: Fix gold on mips64 targets. + +gold/ + +2016-08-09 Aurelien Jarno <aurelien@aurel32.net> + + * configure.tgt: Add mips64el*-*-*|mips64le*-*-* and mips64*-*-*. + + +--- a/gold/configure.tgt ++++ b/gold/configure.tgt +@@ -153,6 +153,13 @@ aarch64*-*) + targ_big_endian=false + targ_extra_big_endian=true + ;; ++mips*64*el*-*-*|mips*64*le*-*-*) ++ targ_obj=mips ++ targ_machine=EM_MIPS_RS3_LE ++ targ_size=64 ++ targ_big_endian=false ++ targ_extra_big_endian=true ++ ;; + mips*el*-*-*|mips*le*-*-*) + targ_obj=mips + targ_machine=EM_MIPS_RS3_LE +@@ -160,6 +167,13 @@ mips*el*-*-*|mips*le*-*-*) + targ_big_endian=false + targ_extra_big_endian=true + ;; ++mips*64*-*-*) ++ targ_obj=mips ++ targ_machine=EM_MIPS ++ targ_size=64 ++ targ_big_endian=true ++ targ_extra_big_endian=false ++ ;; + mips*-*-*) + targ_obj=mips + targ_machine=EM_MIPS diff --git a/debian/patches/gold-sparc-fix.diff b/debian/patches/gold-sparc-fix.diff new file mode 100644 index 0000000..6059819 --- /dev/null +++ b/debian/patches/gold-sparc-fix.diff @@ -0,0 +1,44 @@ +Return-Path: <jrtc27@jrtc27.com> +Received: from Jamess-MacBook.local (global-184-8.nat-1.net.cam.ac.uk. [131.111.184.8]) + by smtp.gmail.com with ESMTPSA id h65sm4893155wrh.32.2017.04.28.09.13.06 + (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Fri, 28 Apr 2017 09:13:06 -0700 (PDT) +Received: by Jamess-MacBook.local (Postfix, from userid 501) + id 9CE3D18952FC; Fri, 28 Apr 2017 17:13:05 +0100 (BST) +From: James Clarke <jrtc27@jrtc27.com> +To: binutils@sourceware.org +Cc: James Clarke <jrtc27@jrtc27.com>, + John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>, + Cary Coutant <ccoutant@gmail.com>, + "Jose E. Marchesi" <jose.marchesi@oracle.com> +Subject: [PATCH] gold: Fix assertion failure relaxing TLS for position-independent executables +Date: Fri, 28 Apr 2017 17:12:14 +0100 +Message-Id: <20170428161214.83513-1-jrtc27@jrtc27.com> +X-Mailer: git-send-email 2.12.2 + +gold/ + PR gold/21444 + * gold.cc (Target_sparc::Relocate::relocate_tls): Local + variables are final for position-independent executables. This + has to be consistent with Target_sparc::Scan::local otherwise + they will disagree as to whether local-exec is used. +--- + gold/sparc.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gold/sparc.cc b/gold/sparc.cc +index a9cb93adda..54c7c33498 100644 +--- a/gold/sparc.cc ++++ b/gold/sparc.cc +@@ -3730,7 +3730,7 @@ Target_sparc<size, big_endian>::Relocate::relocate_tls( + + const bool is_final = + (gsym == NULL +- ? !parameters->options().output_is_position_independent() ++ ? !parameters->options().shared() + : gsym->final_value_is_known()); + const tls::Tls_optimization optimized_type + = optimize_tls_reloc(is_final, r_type); +-- +2.12.2 + diff --git a/debian/patches/i18n-fr.diff b/debian/patches/i18n-fr.diff new file mode 100644 index 0000000..3366846 --- /dev/null +++ b/debian/patches/i18n-fr.diff @@ -0,0 +1,13 @@ +Index: b/bfd/po/fr.po +=================================================================== +--- a/bfd/po/fr.po ++++ b/bfd/po/fr.po +@@ -2890,7 +2890,7 @@ msgstr "%B: réadressage R_X86_64_GOTOFF + + #: elf64-x86-64.c:3523 + msgid "; recompile with -fPIC" +-msgstr "; recompilé avec -fPIC" ++msgstr "; recompilez avec -fPIC" + + #: elf64-x86-64.c:3528 + msgid "%B: relocation %s against %s `%s' can not be used when making a shared object%s" diff --git a/debian/patches/ld-new-dtags-by-default.diff b/debian/patches/ld-new-dtags-by-default.diff new file mode 100644 index 0000000..3083370 --- /dev/null +++ b/debian/patches/ld-new-dtags-by-default.diff @@ -0,0 +1,49 @@ +# DP: ld: enable new dtags by default for linux/gnu targets + +From 9e3072ad67f8b6d092e9e4dbfc6f8c9141aabe0c Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Mon, 21 Jan 2013 08:21:45 +0000 +Subject: [PATCH] ld: enable new dtags by default for linux/gnu targets + +The "new" dtags options have been around for 14+ years now, so for Linux +and GNU targets, enable them by default. + +2012-01-21 Mike Frysinger <vapier@gentoo.org> + + * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set + link_info.new_dtags to TRUE for linux/gnu targets. + * NEWS: Mention new dtags default. + +From 8d0bade12dbc53bfe61a63add17e7780618f1ac1 Mon Sep 17 00:00:00 2001 +From: Roland McGrath <roland@gnu.org> +Date: Tue, 22 Jan 2013 22:07:34 +0000 +Subject: [PATCH] ld/ * emultempl/elf32.em + (gld${EMULATION_NAME}_before_parse): Set new_dtags to TRUE for + *-*-nacl* targets. + +2013-01-22 Roland McGrath <mcgrathr@google.com> + + * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set + new_dtags to TRUE for *-*-nacl* targets. + +Index: b/ld/emultempl/elf32.em +=================================================================== +--- a/ld/emultempl/elf32.em ++++ b/ld/emultempl/elf32.em +@@ -106,6 +106,16 @@ gld${EMULATION_NAME}_before_parse (void) + `if test -n "$CALL_NOP_BYTE" ; then echo link_info.call_nop_byte = $CALL_NOP_BYTE; fi`; + link_info.check_relocs_after_open_input = `if test "x${CHECK_RELOCS_AFTER_OPEN_INPUT}" = xyes ; then echo TRUE ; else echo FALSE ; fi`; + link_info.relro = DEFAULT_LD_Z_RELRO; ++EOF ++ ++case ${target} in ++ *-*-linux-* | *-*-k*bsd*-* | *-*-gnu* | *-*-nacl*) ++ fragment <<EOF ++ link_info.new_dtags = TRUE; ++EOF ++ ;; ++esac ++fragment <<EOF + } + + EOF diff --git a/debian/patches/mips64-default-n64.diff b/debian/patches/mips64-default-n64.diff index f114ca7..d079f4e 100644 --- a/debian/patches/mips64-default-n64.diff +++ b/debian/patches/mips64-default-n64.diff @@ -2,65 +2,82 @@ Index: b/bfd/config.bfd =================================================================== --- a/bfd/config.bfd +++ b/bfd/config.bfd -@@ -1086,6 +1086,16 @@ case "${targ}" in +@@ -1182,11 +1182,21 @@ case "${targ}" in targ_defvec=mips_elf32_be_vec targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec" ;; -+ mips64*el-*-linux*-gnuabi64) +- mips64*el-*-linux*) ++ mips*64*el-*-linux*-gnuabi64) + targ_defvec=mips_elf64_trad_le_vec + targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec" + want64=true + ;; -+ mips64*-*-linux*-gnuabi64) ++ mips*64*-*-linux*-gnuabi64) + targ_defvec=mips_elf64_trad_be_vec + targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec" + want64=true + ;; - mips64*el-*-linux*) ++ mips*64*el-*-linux*) targ_defvec=mips_elf32_ntrad_le_vec targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec" + ;; +- mips64*-*-linux*) ++ mips*64*-*-linux*) + targ_defvec=mips_elf32_ntrad_be_vec + targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec" + ;; Index: b/gas/configure.ac =================================================================== --- a/gas/configure.ac +++ b/gas/configure.ac -@@ -300,6 +300,9 @@ changequote([,])dnl +@@ -345,7 +345,10 @@ changequote([,])dnl esac # Decide which ABI to target by default. case ${target} in -+ mips64*-linux-gnuabi64) +- mips64*-linux* | mips-sgi-irix6* | mips64*-freebsd* | mips64*-kfreebsd*-gnu) ++ mips*64*-linux-gnuabi64) + mips_default_abi=N64_ABI + ;; - mips64*-linux* | mips-sgi-irix6* | mips64*-freebsd* | mips64*-kfreebsd*-gnu) ++ mips*64*-linux* | mips-sgi-irix6* | mips64*-freebsd* | mips64*-kfreebsd*-gnu) mips_default_abi=N32_ABI ;; + mips*-linux* | mips*-freebsd* | mips*-kfreebsd*-gnu) Index: b/ld/configure.tgt =================================================================== --- a/ld/configure.tgt +++ b/ld/configure.tgt -@@ -509,6 +509,12 @@ mips*el-*-vxworks*) targ_emul=elf32elmip +@@ -518,10 +518,16 @@ mips*el-*-vxworks*) targ_emul=elf32elmip mips*-*-vxworks*) targ_emul=elf32ebmipvxworks targ_extra_emuls="elf32elmipvxworks" ;; mips*-*-windiss) targ_emul=elf32mipswindiss ;; -+mips64*el-*-linux-gnuabi64) targ_emul=elf64ltsmip +-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 ++mips*64*el-*-linux-gnuabi64) targ_emul=elf64ltsmip + targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf32ltsmipn32 elf64btsmip" + targ_extra_libpath=$targ_extra_emuls ;; -+mips64*-*-linux-gnuabi64) targ_emul=elf64btsmip ++mips*64*-*-linux-gnuabi64) targ_emul=elf64btsmip + targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf32btsmipn32 elf64ltsmip" + targ_extra_libpath=$targ_extra_emuls ;; - mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 ++mips*64*el-*-linux-*) targ_emul=elf32ltsmipn32 targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" targ_extra_libpath=$targ_extra_emuls ;; +-mips64*-*-linux-*) targ_emul=elf32btsmipn32 ++mips*64*-*-linux-*) targ_emul=elf32btsmipn32 + targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" + targ_extra_libpath=$targ_extra_emuls ;; + mips*el-*-linux-*) targ_emul=elf32ltsmip Index: b/gas/configure =================================================================== --- a/gas/configure +++ b/gas/configure -@@ -12215,6 +12215,9 @@ _ACEOF +@@ -12380,7 +12380,10 @@ _ACEOF esac # Decide which ABI to target by default. case ${target} in -+ mips64*-linux-gnuabi64) +- mips64*-linux* | mips-sgi-irix6* | mips64*-freebsd* | mips64*-kfreebsd*-gnu) ++ mips*64*-linux-gnuabi64) + mips_default_abi=N64_ABI + ;; - mips64*-linux* | mips-sgi-irix6* | mips64*-freebsd* | mips64*-kfreebsd*-gnu) ++ mips*64*-linux* | mips-sgi-irix6* | mips64*-freebsd* | mips64*-kfreebsd*-gnu) mips_default_abi=N32_ABI ;; + mips*-linux* | mips*-freebsd* | mips*-kfreebsd*-gnu) diff --git a/debian/patches/ppc-lib-search-order.diff b/debian/patches/ppc-lib-search-order.diff new file mode 100644 index 0000000..8de7c01 --- /dev/null +++ b/debian/patches/ppc-lib-search-order.diff @@ -0,0 +1,28 @@ +# DP: Fix incorrect library search order on PowerPC, taken from the trunk. + +ld/ + +2017-03-13 Alexey Neyman <stilor@att.net> + + * emulparams/elf32ppccommon.sh (LIBPATH_SUFFIX): Set from target + cpu, not host. + +--- a/ld/emulparams/elf32ppccommon.sh ++++ b/ld/emulparams/elf32ppccommon.sh +@@ -44,11 +44,11 @@ fi + + # Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first. + # Similarly, look for 32 bit libraries in /lib32, /usr/lib32 etc. +-case "$host":"$EMULATION_NAME" in +- *le-*:*64lppc*) LIBPATH_SUFFIX=64 ;; +- *le-*:*32lppc*) LIBPATH_SUFFIX=32 ;; +- *le-*:*64*) LIBPATH_SUFFIX=64be ;; +- *le-*:*32*) LIBPATH_SUFFIX=32be ;; ++case `echo "$target" | sed -e 's/-.*//'`:"$EMULATION_NAME" in ++ *le:*64lppc*) LIBPATH_SUFFIX=64 ;; ++ *le:*32lppc*) LIBPATH_SUFFIX=32 ;; ++ *le:*64*) LIBPATH_SUFFIX=64be ;; ++ *le:*32*) LIBPATH_SUFFIX=32be ;; + *:*64lppc*) LIBPATH_SUFFIX=64le ;; + *:*32lppc*) LIBPATH_SUFFIX=32le ;; + *:*64*) LIBPATH_SUFFIX=64 ;; diff --git a/debian/patches/pr21074-revert.diff b/debian/patches/pr21074-revert.diff new file mode 100644 index 0000000..a3a9f79 --- /dev/null +++ b/debian/patches/pr21074-revert.diff @@ -0,0 +1,67 @@ +# DP: Revert commit causing PR 21074. + +Index: b/gold/output.cc +=================================================================== +--- a/gold/output.cc ++++ b/gold/output.cc +@@ -4801,7 +4801,7 @@ Output_segment::first_section() const + return (*p)->output_section(); + } + } +- return NULL; ++ gold_unreachable(); + } + + // Return the number of Output_sections in an Output_segment. +Index: b/gold/output.h +=================================================================== +--- a/gold/output.h ++++ b/gold/output.h +@@ -4741,7 +4741,6 @@ class Output_segment + first_section_load_address() const + { + const Output_section* os = this->first_section(); +- gold_assert(os != NULL); + return os->has_load_address() ? os->load_address() : os->address(); + } + +Index: b/gold/symtab.cc +=================================================================== +--- a/gold/symtab.cc ++++ b/gold/symtab.cc +@@ -3159,14 +3159,7 @@ Symbol_table::sized_write_globals(const + break; + + case Symbol::IN_OUTPUT_SEGMENT: +- { +- Output_segment* oseg = sym->output_segment(); +- Output_section* osect = oseg->first_section(); +- if (osect == NULL) +- shndx = elfcpp::SHN_ABS; +- else +- shndx = osect->out_shndx(); +- } ++ shndx = elfcpp::SHN_ABS; + break; + + case Symbol::IS_CONSTANT: +Index: b/gold/ChangeLog-2016 +=================================================================== +--- a/gold/ChangeLog-2016 ++++ b/gold/ChangeLog-2016 +@@ -87,15 +87,6 @@ + * testsuite/Makefile.in: Regenerate. + * ver_test_8.sh: New test script. + +-2016-12-21 Cary Coutant <ccoutant@gmail.com> +- +- * output.cc (Output_segment::first_section): Return NULL if there are +- no sections in the segment. +- * output.h (Output_segment::first_section_load_address): Assert that +- first section is not NULL. +- * symtab.cc (Symbol_table::sized_write_globals): Attach linker-created +- segment-relative symbols to first section of the segment. +- + 2016-12-21 Alan Modra <amodra@gmail.com> + + * arm.cc: Fix comment chars with high bit set. diff --git a/debian/patches/pr21135.diff b/debian/patches/pr21135.diff new file mode 100644 index 0000000..88b358b --- /dev/null +++ b/debian/patches/pr21135.diff @@ -0,0 +1,106 @@ +# DP: Fix PR binutils/21135, invalid read of section contents. + +From f055032e4e922f1e1a5e11026c7c2669fa2a7d19 Mon Sep 17 00:00:00 2001 +From: Nick Clifton <nickc@redhat.com> +Date: Mon, 13 Feb 2017 15:04:37 +0000 +Subject: [PATCH] Fix invalid read of section contents whilst processing a + corrupt binary. + + PR binutils/21135 + * readelf.c (dump_section_as_bytes): Handle the case where + uncompress_section_contents returns false. + (dump_section_as_bytes, load_specific_debug_section): Likewise. + +--- + binutils/ChangeLog | 6 ++++++ + binutils/readelf.c | 16 ++++++++++++---- + 2 files changed, 18 insertions(+), 4 deletions(-) + +2017-02-13 Nick Clifton <nickc@redhat.com> + + PR binutils/21135 + * readelf.c (dump_section_as_bytes): Handle the case where + uncompress_section_contents returns false. + (dump_section_as_bytes, load_specific_debug_section): Likewise. + +Index: b/binutils/readelf.c +=================================================================== +--- a/binutils/readelf.c ++++ b/binutils/readelf.c +@@ -12668,10 +12668,18 @@ dump_section_as_strings (Elf_Internal_Sh + new_size -= 12; + } + +- if (uncompressed_size +- && uncompress_section_contents (& start, +- uncompressed_size, & new_size)) +- num_bytes = new_size; ++ if (uncompressed_size) ++ { ++ if (uncompress_section_contents (& start, ++ uncompressed_size, & new_size)) ++ num_bytes = new_size; ++ else ++ { ++ error (_("Unable to decompress section %s\n"), ++ printable_section_name (section)); ++ return; ++ } ++ } + } + + /* If the section being dumped has relocations against it the user might +@@ -12802,10 +12810,18 @@ dump_section_as_bytes (Elf_Internal_Shdr + new_size -= 12; + } + +- if (uncompressed_size +- && uncompress_section_contents (& start, uncompressed_size, +- & new_size)) +- section_size = new_size; ++ if (uncompressed_size) ++ { ++ if (uncompress_section_contents (& start, uncompressed_size, ++ & new_size)) ++ section_size = new_size; ++ else ++ { ++ error (_("Unable to decompress section %s\n"), ++ printable_section_name (section)); ++ return; ++ } ++ } + } + + if (relocate) +@@ -12955,14 +12971,22 @@ load_specific_debug_section (enum dwarf_ + size -= 12; + } + +- if (uncompressed_size +- && uncompress_section_contents (&start, uncompressed_size, +- &size)) +- { +- /* Free the compressed buffer, update the section buffer +- and the section size if uncompress is successful. */ +- free (section->start); +- section->start = start; ++ if (uncompressed_size) ++ { ++ if (uncompress_section_contents (&start, uncompressed_size, ++ &size)) ++ { ++ /* Free the compressed buffer, update the section buffer ++ and the section size if uncompress is successful. */ ++ free (section->start); ++ section->start = start; ++ } ++ else ++ { ++ error (_("Unable to decompress section %s\n"), ++ printable_section_name (sec)); ++ return 0; ++ } + } + section->size = size; + } diff --git a/debian/patches/pr21137.diff b/debian/patches/pr21137.diff new file mode 100644 index 0000000..b60ffb3 --- /dev/null +++ b/debian/patches/pr21137.diff @@ -0,0 +1,112 @@ +# DP: Fix PR binutils/21137, readelf writing to illegal addresses. + +From 03f7786e2f440b9892b1c34a58fb26222ce1b493 Mon Sep 17 00:00:00 2001 +From: Nick Clifton <nickc@redhat.com> +Date: Mon, 13 Feb 2017 13:08:32 +0000 +Subject: [PATCH] Fix readelf writing to illegal addresses whilst processing + corrupt input files containing symbol-difference relocations. + + PR binutils/21137 + * readelf.c (target_specific_reloc_handling): Add end parameter. + Check for buffer overflow before writing relocated values. + (apply_relocations): Pass end to target_specific_reloc_handling. +--- + binutils/ChangeLog | 7 +++++++ + binutils/readelf.c | 30 +++++++++++++++++++++++++----- + 2 files changed, 32 insertions(+), 5 deletions(-) + +2017-02-13 Nick Clifton <nickc@redhat.com> + + PR binutils/21137 + * readelf.c (target_specific_reloc_handling): Add end parameter. + Check for buffer overflow before writing relocated values. + (apply_relocations): Pass end to target_specific_reloc_handling. + +diff --git a/binutils/readelf.c b/binutils/readelf.c +index b488714..e474f27 100644 +--- a/binutils/readelf.c ++++ b/binutils/readelf.c +@@ -11591,6 +11591,7 @@ process_syminfo (FILE * file ATTRIBUTE_UNUSED) + static bfd_boolean + target_specific_reloc_handling (Elf_Internal_Rela * reloc, + unsigned char * start, ++ unsigned char * end, + Elf_Internal_Sym * symtab) + { + unsigned int reloc_type = get_reloc_type (reloc->r_info); +@@ -11631,13 +11632,19 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc, + handle_sym_diff: + if (saved_sym != NULL) + { ++ int reloc_size = reloc_type == 1 ? 4 : 2; + bfd_vma value; + + value = reloc->r_addend + + (symtab[get_reloc_symindex (reloc->r_info)].st_value + - saved_sym->st_value); + +- byte_put (start + reloc->r_offset, value, reloc_type == 1 ? 4 : 2); ++ if (start + reloc->r_offset + reloc_size >= end) ++ /* PR 21137 */ ++ error (_("MSP430 sym diff reloc writes past end of section (%p vs %p)\n"), ++ start + reloc->r_offset + reloc_size, end); ++ else ++ byte_put (start + reloc->r_offset, value, reloc_size); + + saved_sym = NULL; + return TRUE; +@@ -11668,13 +11675,18 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc, + case 2: /* R_MN10300_16 */ + if (saved_sym != NULL) + { ++ int reloc_size = reloc_type == 1 ? 4 : 2; + bfd_vma value; + + value = reloc->r_addend + + (symtab[get_reloc_symindex (reloc->r_info)].st_value + - saved_sym->st_value); + +- byte_put (start + reloc->r_offset, value, reloc_type == 1 ? 4 : 2); ++ if (start + reloc->r_offset + reloc_size >= end) ++ error (_("MN10300 sym diff reloc writes past end of section (%p vs %p)\n"), ++ start + reloc->r_offset + reloc_size, end); ++ else ++ byte_put (start + reloc->r_offset, value, reloc_size); + + saved_sym = NULL; + return TRUE; +@@ -11709,12 +11721,20 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc, + break; + + case 0x41: /* R_RL78_ABS32. */ +- byte_put (start + reloc->r_offset, value, 4); ++ if (start + reloc->r_offset + 4 >= end) ++ error (_("RL78 sym diff reloc writes past end of section (%p vs %p)\n"), ++ start + reloc->r_offset + 2, end); ++ else ++ byte_put (start + reloc->r_offset, value, 4); + value = 0; + return TRUE; + + case 0x43: /* R_RL78_ABS16. */ +- byte_put (start + reloc->r_offset, value, 2); ++ if (start + reloc->r_offset + 2 >= end) ++ error (_("RL78 sym diff reloc writes past end of section (%p vs %p)\n"), ++ start + reloc->r_offset + 2, end); ++ else ++ byte_put (start + reloc->r_offset, value, 2); + value = 0; + return TRUE; + +@@ -12340,7 +12360,7 @@ apply_relocations (void * file, + + reloc_type = get_reloc_type (rp->r_info); + +- if (target_specific_reloc_handling (rp, start, symtab)) ++ if (target_specific_reloc_handling (rp, start, end, symtab)) + continue; + else if (is_none_reloc (reloc_type)) + continue; +-- +2.9.3 + diff --git a/debian/patches/pr21139.diff b/debian/patches/pr21139.diff new file mode 100644 index 0000000..0183594 --- /dev/null +++ b/debian/patches/pr21139.diff @@ -0,0 +1,227 @@ +# DP: Fix PR binutils/21139, read-after-free error in readelf. + +From f84ce13b6708801ca1d6289b7c4003e2f5a6d7f9 Mon Sep 17 00:00:00 2001 +From: Nick Clifton <nickc@redhat.com> +Date: Mon, 13 Feb 2017 14:03:22 +0000 +Subject: [PATCH] Fix read-after-free error in readelf when processing + multiple, relocated sections in an MSP430 binary. + + PR binutils/21139 + * readelf.c (target_specific_reloc_handling): Add num_syms + parameter. Check for symbol table overflow before accessing + symbol value. If reloc pointer is NULL, discard all saved state. + (apply_relocations): Pass num_syms to target_specific_reloc_handling. + Call target_specific_reloc_handling with a NULL reloc pointer + after processing all of the relocs. +--- + binutils/ChangeLog | 10 +++++ + binutils/readelf.c | 109 +++++++++++++++++++++++++++++++++++++++++------------ + 2 files changed, 94 insertions(+), 25 deletions(-) + +2017-02-13 Nick Clifton <nickc@redhat.com> + + PR binutils/21139 + * readelf.c (target_specific_reloc_handling): Add num_syms + parameter. Check for symbol table overflow before accessing + symbol value. If reloc pointer is NULL, discard all saved state. + (apply_relocations): Pass num_syms to target_specific_reloc_handling. + Call target_specific_reloc_handling with a NULL reloc pointer + after processing all of the relocs. + +diff --git a/binutils/readelf.c b/binutils/readelf.c +index e474f27..de961c4 100644 +--- a/binutils/readelf.c ++++ b/binutils/readelf.c +@@ -11586,15 +11586,27 @@ process_syminfo (FILE * file ATTRIBUTE_UNUSED) + + /* Check to see if the given reloc needs to be handled in a target specific + manner. If so then process the reloc and return TRUE otherwise return +- FALSE. */ ++ FALSE. ++ ++ If called with reloc == NULL, then this is a signal that reloc processing ++ for the current section has finished, and any saved state should be ++ discarded. */ + + static bfd_boolean + target_specific_reloc_handling (Elf_Internal_Rela * reloc, + unsigned char * start, + unsigned char * end, +- Elf_Internal_Sym * symtab) ++ Elf_Internal_Sym * symtab, ++ unsigned long num_syms) + { +- unsigned int reloc_type = get_reloc_type (reloc->r_info); ++ unsigned int reloc_type = 0; ++ unsigned long sym_index = 0; ++ ++ if (reloc) ++ { ++ reloc_type = get_reloc_type (reloc->r_info); ++ sym_index = get_reloc_symindex (reloc->r_info); ++ } + + switch (elf_header.e_machine) + { +@@ -11603,6 +11615,12 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc, + { + static Elf_Internal_Sym * saved_sym = NULL; + ++ if (reloc == NULL) ++ { ++ saved_sym = NULL; ++ return TRUE; ++ } ++ + switch (reloc_type) + { + case 10: /* R_MSP430_SYM_DIFF */ +@@ -11610,7 +11628,12 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc, + break; + /* Fall through. */ + case 21: /* R_MSP430X_SYM_DIFF */ +- saved_sym = symtab + get_reloc_symindex (reloc->r_info); ++ /* PR 21139. */ ++ if (sym_index >= num_syms) ++ error (_("MSP430 SYM_DIFF reloc contains invalid symbol index %lu\n"), ++ sym_index); ++ else ++ saved_sym = symtab + sym_index; + return TRUE; + + case 1: /* R_MSP430_32 or R_MSP430_ABS32 */ +@@ -11635,16 +11658,21 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc, + int reloc_size = reloc_type == 1 ? 4 : 2; + bfd_vma value; + +- value = reloc->r_addend +- + (symtab[get_reloc_symindex (reloc->r_info)].st_value +- - saved_sym->st_value); +- +- if (start + reloc->r_offset + reloc_size >= end) +- /* PR 21137 */ +- error (_("MSP430 sym diff reloc writes past end of section (%p vs %p)\n"), +- start + reloc->r_offset + reloc_size, end); ++ if (sym_index >= num_syms) ++ error (_("MSP430 reloc contains invalid symbol index %lu\n"), ++ sym_index); + else +- byte_put (start + reloc->r_offset, value, reloc_size); ++ { ++ value = reloc->r_addend + (symtab[sym_index].st_value ++ - saved_sym->st_value); ++ ++ if (start + reloc->r_offset + reloc_size >= end) ++ /* PR 21137 */ ++ error (_("MSP430 sym diff reloc writes past end of section (%p vs %p)\n"), ++ start + reloc->r_offset + reloc_size, end); ++ else ++ byte_put (start + reloc->r_offset, value, reloc_size); ++ } + + saved_sym = NULL; + return TRUE; +@@ -11664,13 +11692,24 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc, + { + static Elf_Internal_Sym * saved_sym = NULL; + ++ if (reloc == NULL) ++ { ++ saved_sym = NULL; ++ return TRUE; ++ } ++ + switch (reloc_type) + { + case 34: /* R_MN10300_ALIGN */ + return TRUE; + case 33: /* R_MN10300_SYM_DIFF */ +- saved_sym = symtab + get_reloc_symindex (reloc->r_info); ++ if (sym_index >= num_syms) ++ error (_("MN10300_SYM_DIFF reloc contains invalid symbol index %lu\n"), ++ sym_index); ++ else ++ saved_sym = symtab + sym_index; + return TRUE; ++ + case 1: /* R_MN10300_32 */ + case 2: /* R_MN10300_16 */ + if (saved_sym != NULL) +@@ -11678,15 +11717,20 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc, + int reloc_size = reloc_type == 1 ? 4 : 2; + bfd_vma value; + +- value = reloc->r_addend +- + (symtab[get_reloc_symindex (reloc->r_info)].st_value +- - saved_sym->st_value); +- +- if (start + reloc->r_offset + reloc_size >= end) +- error (_("MN10300 sym diff reloc writes past end of section (%p vs %p)\n"), +- start + reloc->r_offset + reloc_size, end); ++ if (sym_index >= num_syms) ++ error (_("MN10300 reloc contains invalid symbol index %lu\n"), ++ sym_index); + else +- byte_put (start + reloc->r_offset, value, reloc_size); ++ { ++ value = reloc->r_addend + (symtab[sym_index].st_value ++ - saved_sym->st_value); ++ ++ if (start + reloc->r_offset + reloc_size >= end) ++ error (_("MN10300 sym diff reloc writes past end of section (%p vs %p)\n"), ++ start + reloc->r_offset + reloc_size, end); ++ else ++ byte_put (start + reloc->r_offset, value, reloc_size); ++ } + + saved_sym = NULL; + return TRUE; +@@ -11706,12 +11750,24 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc, + static bfd_vma saved_sym2 = 0; + static bfd_vma value; + ++ if (reloc == NULL) ++ { ++ saved_sym1 = saved_sym2 = 0; ++ return TRUE; ++ } ++ + switch (reloc_type) + { + case 0x80: /* R_RL78_SYM. */ + saved_sym1 = saved_sym2; +- saved_sym2 = symtab[get_reloc_symindex (reloc->r_info)].st_value; +- saved_sym2 += reloc->r_addend; ++ if (sym_index >= num_syms) ++ error (_("RL78_SYM reloc contains invalid symbol index %lu\n"), ++ sym_index); ++ else ++ { ++ saved_sym2 = symtab[sym_index].st_value; ++ saved_sym2 += reloc->r_addend; ++ } + return TRUE; + + case 0x83: /* R_RL78_OPsub. */ +@@ -12360,7 +12416,7 @@ apply_relocations (void * file, + + reloc_type = get_reloc_type (rp->r_info); + +- if (target_specific_reloc_handling (rp, start, end, symtab)) ++ if (target_specific_reloc_handling (rp, start, end, symtab, num_syms)) + continue; + else if (is_none_reloc (reloc_type)) + continue; +@@ -12456,6 +12512,9 @@ apply_relocations (void * file, + } + + free (symtab); ++ /* Let the target specific reloc processing code know that ++ we have finished with these relocs. */ ++ target_specific_reloc_handling (NULL, NULL, NULL, NULL, 0); + + if (relocs_return) + { +-- +2.9.3 + diff --git a/debian/patches/pr21156.diff b/debian/patches/pr21156.diff new file mode 100644 index 0000000..90e33d3 --- /dev/null +++ b/debian/patches/pr21156.diff @@ -0,0 +1,156 @@ +# DP: Fix PR binutils/21156, illegal memory accesses in readelf. + +From b814a36d3440de95f2ac6eaa4fc7935c322ea456 Mon Sep 17 00:00:00 2001 +From: Nick Clifton <nickc@redhat.com> +Date: Fri, 17 Feb 2017 15:59:45 +0000 +Subject: [PATCH] Fix illegal memory accesses in readelf when parsing a corrupt + binary. + + PR binutils/21156 + * readelf.c (find_section_in_set): Test for invalid section + indicies. +--- + binutils/ChangeLog | 6 ++++++ + binutils/readelf.c | 10 ++++++++-- + 2 files changed, 14 insertions(+), 2 deletions(-) + +2017-02-17 Nick Clifton <nickc@redhat.com> + + PR binutils/21156 + * readelf.c (find_section_in_set): Test for invalid section + indicies. + +diff --git a/binutils/readelf.c b/binutils/readelf.c +index ea9da7a..20df6f8 100644 +--- a/binutils/readelf.c ++++ b/binutils/readelf.c +@@ -676,8 +676,14 @@ find_section_in_set (const char * name, unsigned int * set) + if (set != NULL) + { + while ((i = *set++) > 0) +- if (streq (SECTION_NAME (section_headers + i), name)) +- return section_headers + i; ++ { ++ /* See PR 21156 for a reproducer. */ ++ if (i >= elf_header.e_shnum) ++ continue; /* FIXME: Should we issue an error message ? */ ++ ++ if (streq (SECTION_NAME (section_headers + i), name)) ++ return section_headers + i; ++ } + } + + return find_section (name); +-- +2.9.3 + +From 43a444f9c5bfd44b4304eafd78338e21d54bea14 Mon Sep 17 00:00:00 2001 +From: Nick Clifton <nickc@redhat.com> +Date: Mon, 20 Feb 2017 14:40:39 +0000 +Subject: [PATCH] Fix another memory access error in readelf when parsing a + corrupt binary. + + PR binutils/21156 + * dwarf.c (cu_tu_indexes_read): Move into... + (load_cu_tu_indexes): ... here. Change the variable into + tri-state. Change the function into boolean, returning + false if the indicies could not be loaded. + (find_cu_tu_set): Return NULL if the indicies could not be + loaded. +--- + binutils/ChangeLog | 10 ++++++++++ + binutils/dwarf.c | 34 ++++++++++++++++++++-------------- + 2 files changed, 30 insertions(+), 14 deletions(-) + +2017-02-20 Nick Clifton <nickc@redhat.com> + + PR binutils/21156 + * dwarf.c (cu_tu_indexes_read): Move into... + (load_cu_tu_indexes): ... here. Change the variable into + tri-state. Change the function into boolean, returning + false if the indicies could not be loaded. + (find_cu_tu_set): Return NULL if the indicies could not be + loaded. + + +diff --git a/binutils/dwarf.c b/binutils/dwarf.c +index 0184a7a..6d879c9 100644 +--- a/binutils/dwarf.c ++++ b/binutils/dwarf.c +@@ -76,7 +76,6 @@ int dwarf_check = 0; + as a zero-terminated list of section indexes comprising one set of debug + sections from a .dwo file. */ + +-static int cu_tu_indexes_read = 0; + static unsigned int *shndx_pool = NULL; + static unsigned int shndx_pool_size = 0; + static unsigned int shndx_pool_used = 0; +@@ -99,7 +98,7 @@ static int tu_count = 0; + static struct cu_tu_set *cu_sets = NULL; + static struct cu_tu_set *tu_sets = NULL; + +-static void load_cu_tu_indexes (void *file); ++static bfd_boolean load_cu_tu_indexes (void *); + + /* Values for do_debug_lines. */ + #define FLAG_DEBUG_LINES_RAW 1 +@@ -2715,7 +2714,7 @@ load_debug_info (void * file) + return num_debug_info_entries; + + /* If this is a DWARF package file, load the CU and TU indexes. */ +- load_cu_tu_indexes (file); ++ (void) load_cu_tu_indexes (file); + + if (load_debug_section (info, file) + && process_debug_info (&debug_displays [info].section, file, abbrev, 1, 0)) +@@ -7378,21 +7377,27 @@ process_cu_tu_index (struct dwarf_section *section, int do_display) + section sets that we can use to associate a .debug_info.dwo section + with its associated .debug_abbrev.dwo section in a .dwp file. */ + +-static void ++static bfd_boolean + load_cu_tu_indexes (void *file) + { ++ static int cu_tu_indexes_read = -1; /* Tri-state variable. */ ++ + /* If we have already loaded (or tried to load) the CU and TU indexes + then do not bother to repeat the task. */ +- if (cu_tu_indexes_read) +- return; +- +- if (load_debug_section (dwp_cu_index, file)) +- process_cu_tu_index (&debug_displays [dwp_cu_index].section, 0); +- +- if (load_debug_section (dwp_tu_index, file)) +- process_cu_tu_index (&debug_displays [dwp_tu_index].section, 0); ++ if (cu_tu_indexes_read == -1) ++ { ++ cu_tu_indexes_read = TRUE; ++ ++ if (load_debug_section (dwp_cu_index, file)) ++ if (! process_cu_tu_index (&debug_displays [dwp_cu_index].section, 0)) ++ cu_tu_indexes_read = FALSE; ++ ++ if (load_debug_section (dwp_tu_index, file)) ++ if (! process_cu_tu_index (&debug_displays [dwp_tu_index].section, 0)) ++ cu_tu_indexes_read = FALSE; ++ } + +- cu_tu_indexes_read = 1; ++ return (bfd_boolean) cu_tu_indexes_read; + } + + /* Find the set of sections that includes section SHNDX. */ +@@ -7402,7 +7407,8 @@ find_cu_tu_set (void *file, unsigned int shndx) + { + unsigned int i; + +- load_cu_tu_indexes (file); ++ if (! load_cu_tu_indexes (file)) ++ return NULL; + + /* Find SHNDX in the shndx pool. */ + for (i = 0; i < shndx_pool_used; i++) +-- +2.9.3 + diff --git a/debian/patches/pr21157.diff b/debian/patches/pr21157.diff new file mode 100644 index 0000000..a592fc9 --- /dev/null +++ b/debian/patches/pr21157.diff @@ -0,0 +1,60 @@ +# DP: Fix PR binutils/21157, handling of corrupt STABS enum type strings. + +From a2dea0b20bc66a4c287c3c50002b8c3b3e9d953a Mon Sep 17 00:00:00 2001 +From: Nick Clifton <nickc@redhat.com> +Date: Tue, 14 Feb 2017 14:07:29 +0000 +Subject: [PATCH] Fix handling of corrupt STABS enum type strings. + + PR binutils/21157 + * stabs.c (parse_stab_enum_type): Check for corrupt NAME:VALUE + pairs. + (parse_number): Exit early if passed an empty string. +--- + binutils/ChangeLog | 7 +++++++ + binutils/stabs.c | 14 +++++++++++++- + 2 files changed, 20 insertions(+), 1 deletion(-) + +2017-02-14 Nick Clifton <nickc@redhat.com> + + PR binutils/21157 + * stabs.c (parse_stab_enum_type): Check for corrupt NAME:VALUE + pairs. + (parse_number): Exit early if passed an empty string. + +diff --git a/binutils/stabs.c b/binutils/stabs.c +index d3fc4af..3861f83 100644 +--- a/binutils/stabs.c ++++ b/binutils/stabs.c +@@ -232,6 +232,10 @@ parse_number (const char **pp, bfd_boolean *poverflow) + + orig = *pp; + ++ /* Stop early if we are passed an empty string. */ ++ if (*orig == 0) ++ return (bfd_vma) 0; ++ + errno = 0; + ul = strtoul (*pp, (char **) pp, 0); + if (ul + 1 != 0 || errno == 0) +@@ -1975,9 +1979,17 @@ parse_stab_enum_type (void *dhandle, const char **pp) + bfd_signed_vma val; + + p = *pp; +- while (*p != ':') ++ while (*p != ':' && *p != 0) + ++p; + ++ if (*p == 0) ++ { ++ bad_stab (orig); ++ free (names); ++ free (values); ++ return DEBUG_TYPE_NULL; ++ } ++ + name = savestring (*pp, p - *pp); + + *pp = p + 1; +-- +2.9.3 + diff --git a/debian/patches/pr21342.diff b/debian/patches/pr21342.diff new file mode 100644 index 0000000..3c58ed5 --- /dev/null +++ b/debian/patches/pr21342.diff @@ -0,0 +1,99 @@ +# DP: Fix PR binutils/21342, null pointer dereferences when using a link built +# DP: with clang. + +From ad32986fdf9da1c8748e47b8b45100398223dba8 Mon Sep 17 00:00:00 2001 +From: Nick Clifton <nickc@redhat.com> +Date: Tue, 4 Apr 2017 11:23:36 +0100 +Subject: [PATCH] Fix null pointer dereferences when using a link built with + clang. + + PR binutils/21342 + * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer + dereference. + (bfd_elf_final_link): Only initialize the extended symbol index + section if there are extended symbol tables to list. +--- + bfd/ChangeLog | 8 ++++++++ + bfd/elflink.c | 35 +++++++++++++++++++++-------------- + 2 files changed, 29 insertions(+), 14 deletions(-) + +bfd/ + +2017-04-04 Nick Clifton <nickc@redhat.com> + + PR binutils/21342 + * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer + dereference. + (bfd_elf_final_link): Only initialize the extended symbol index + section if there are extended symbol tables to list. + + +diff --git a/bfd/elflink.c b/bfd/elflink.c +index 776357f..9bf75c8 100644 +--- a/bfd/elflink.c ++++ b/bfd/elflink.c +@@ -119,15 +119,18 @@ _bfd_elf_define_linkage_sym (bfd *abfd, + defined in shared libraries can't be overridden, because we + lose the link to the bfd which is via the symbol section. */ + h->root.type = bfd_link_hash_new; ++ bh = &h->root; + } ++ else ++ bh = NULL; + +- bh = &h->root; + bed = get_elf_backend_data (abfd); + if (!_bfd_generic_link_add_one_symbol (info, abfd, name, BSF_GLOBAL, + sec, 0, NULL, FALSE, bed->collect, + &bh)) + return NULL; + h = (struct elf_link_hash_entry *) bh; ++ BFD_ASSERT (h != NULL); + h->def_regular = 1; + h->non_elf = 0; + h->root.linker_def = 1; +@@ -12038,24 +12041,28 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) + { + /* Finish up and write out the symbol string table (.strtab) + section. */ +- Elf_Internal_Shdr *symstrtab_hdr; ++ Elf_Internal_Shdr *symstrtab_hdr = NULL; + file_ptr off = symtab_hdr->sh_offset + symtab_hdr->sh_size; + +- symtab_shndx_hdr = & elf_symtab_shndx_list (abfd)->hdr; +- if (symtab_shndx_hdr != NULL && symtab_shndx_hdr->sh_name != 0) ++ if (elf_symtab_shndx_list (abfd)) + { +- symtab_shndx_hdr->sh_type = SHT_SYMTAB_SHNDX; +- symtab_shndx_hdr->sh_entsize = sizeof (Elf_External_Sym_Shndx); +- symtab_shndx_hdr->sh_addralign = sizeof (Elf_External_Sym_Shndx); +- amt = bfd_get_symcount (abfd) * sizeof (Elf_External_Sym_Shndx); +- symtab_shndx_hdr->sh_size = amt; ++ symtab_shndx_hdr = & elf_symtab_shndx_list (abfd)->hdr; + +- off = _bfd_elf_assign_file_position_for_section (symtab_shndx_hdr, +- off, TRUE); ++ if (symtab_shndx_hdr != NULL && symtab_shndx_hdr->sh_name != 0) ++ { ++ symtab_shndx_hdr->sh_type = SHT_SYMTAB_SHNDX; ++ symtab_shndx_hdr->sh_entsize = sizeof (Elf_External_Sym_Shndx); ++ symtab_shndx_hdr->sh_addralign = sizeof (Elf_External_Sym_Shndx); ++ amt = bfd_get_symcount (abfd) * sizeof (Elf_External_Sym_Shndx); ++ symtab_shndx_hdr->sh_size = amt; + +- if (bfd_seek (abfd, symtab_shndx_hdr->sh_offset, SEEK_SET) != 0 +- || (bfd_bwrite (flinfo.symshndxbuf, amt, abfd) != amt)) +- return FALSE; ++ off = _bfd_elf_assign_file_position_for_section (symtab_shndx_hdr, ++ off, TRUE); ++ ++ if (bfd_seek (abfd, symtab_shndx_hdr->sh_offset, SEEK_SET) != 0 ++ || (bfd_bwrite (flinfo.symshndxbuf, amt, abfd) != amt)) ++ return FALSE; ++ } + } + + symstrtab_hdr = &elf_tdata (abfd)->strtab_hdr; +-- +2.9.3 + diff --git a/debian/patches/pr21412.diff b/debian/patches/pr21412.diff new file mode 100644 index 0000000..c22e327 --- /dev/null +++ b/debian/patches/pr21412.diff @@ -0,0 +1,180 @@ +From bce964aa6c777d236fbd641f2bc7bb931cfe4bf3 Mon Sep 17 00:00:00 2001 +From: Alan Modra <amodra@gmail.com> +Date: Sun, 23 Apr 2017 11:03:34 +0930 +Subject: [PATCH] PR 21412, get_reloc_section assumes .rel/.rela name for + SHT_REL/RELA. + +This patch fixes an assumption made by code that runs for objcopy and +strip, that SHT_REL/SHR_RELA sections are always named starting with a +.rel/.rela prefix. I'm also modifying the interface for +elf_backend_get_reloc_section, so any backend function just needs to +handle name mapping. + + PR 21412 + * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change + parameters and comment. + (_bfd_elf_get_reloc_section): Delete. + (_bfd_elf_plt_get_reloc_section): Declare. + * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section): + New functions. Don't blindly skip over assumed .rel/.rela prefix. + Extracted from.. + (_bfd_elf_get_reloc_section): ..here. Delete. + (assign_section_numbers): Call elf_get_reloc_section. + * elf64-ppc.c (elf_backend_get_reloc_section): Define. + * elfxx-target.h (elf_backend_get_reloc_section): Update. +--- + bfd/ChangeLog | 15 ++++++++++++++ + bfd/elf-bfd.h | 8 ++++--- + bfd/elf.c | 61 +++++++++++++++++++++++++++++++----------------------- + bfd/elf64-ppc.c | 1 + + bfd/elfxx-target.h | 2 +- + 5 files changed, 57 insertions(+), 30 deletions(-) + +diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h +index af377ee..4c0c9e8 100644 +--- a/bfd/elf-bfd.h ++++ b/bfd/elf-bfd.h +@@ -1360,8 +1360,10 @@ struct elf_backend_data + bfd_size_type (*maybe_function_sym) (const asymbol *sym, asection *sec, + bfd_vma *code_off); + +- /* Return the section which RELOC_SEC applies to. */ +- asection *(*get_reloc_section) (asection *reloc_sec); ++ /* Given NAME, the name of a relocation section stripped of its ++ .rel/.rela prefix, return the section in ABFD to which the ++ relocations apply. */ ++ asection *(*get_reloc_section) (bfd *abfd, const char *name); + + /* Called to set the sh_flags, sh_link and sh_info fields of OSECTION which + has a type >= SHT_LOOS. Returns TRUE if the fields were initialised, +@@ -2448,7 +2450,7 @@ extern bfd_boolean _bfd_elf_is_function_type (unsigned int); + extern bfd_size_type _bfd_elf_maybe_function_sym (const asymbol *, asection *, + bfd_vma *); + +-extern asection *_bfd_elf_get_reloc_section (asection *); ++extern asection *_bfd_elf_plt_get_reloc_section (bfd *, const char *); + + extern int bfd_elf_get_default_section_type (flagword); + +diff --git a/bfd/elf.c b/bfd/elf.c +index 18b4bbe..dd1a41f 100644 +--- a/bfd/elf.c ++++ b/bfd/elf.c +@@ -3538,17 +3538,39 @@ bfd_elf_set_group_contents (bfd *abfd, asection *sec, void *failedptrarg) + H_PUT_32 (abfd, sec->flags & SEC_LINK_ONCE ? GRP_COMDAT : 0, loc); + } + +-/* Return the section which RELOC_SEC applies to. */ ++/* Given NAME, the name of a relocation section stripped of its ++ .rel/.rela prefix, return the section in ABFD to which the ++ relocations apply. */ + + asection * +-_bfd_elf_get_reloc_section (asection *reloc_sec) ++_bfd_elf_plt_get_reloc_section (bfd *abfd, const char *name) ++{ ++ /* If a target needs .got.plt section, relocations in rela.plt/rel.plt ++ section likely apply to .got.plt or .got section. */ ++ if (get_elf_backend_data (abfd)->want_got_plt ++ && strcmp (name, ".plt") == 0) ++ { ++ asection *sec; ++ ++ name = ".got.plt"; ++ sec = bfd_get_section_by_name (abfd, name); ++ if (sec != NULL) ++ return sec; ++ name = ".got"; ++ } ++ ++ return bfd_get_section_by_name (abfd, name); ++} ++ ++/* Return the section to which RELOC_SEC applies. */ ++ ++static asection * ++elf_get_reloc_section (asection *reloc_sec) + { + const char *name; + unsigned int type; + bfd *abfd; +- +- if (reloc_sec == NULL) +- return NULL; ++ const struct elf_backend_data *bed; + + type = elf_section_data (reloc_sec)->this_hdr.sh_type; + if (type != SHT_REL && type != SHT_RELA) +@@ -3556,28 +3578,15 @@ _bfd_elf_get_reloc_section (asection *reloc_sec) + + /* We look up the section the relocs apply to by name. */ + name = reloc_sec->name; +- if (type == SHT_REL) +- name += 4; +- else +- name += 5; ++ if (strncmp (name, ".rel", 4) != 0) ++ return NULL; ++ name += 4; ++ if (type == SHT_RELA && *name++ != 'a') ++ return NULL; + +- /* If a target needs .got.plt section, relocations in rela.plt/rel.plt +- section apply to .got.plt section. */ + abfd = reloc_sec->owner; +- if (get_elf_backend_data (abfd)->want_got_plt +- && strcmp (name, ".plt") == 0) +- { +- /* .got.plt is a linker created input section. It may be mapped +- to some other output section. Try two likely sections. */ +- name = ".got.plt"; +- reloc_sec = bfd_get_section_by_name (abfd, name); +- if (reloc_sec != NULL) +- return reloc_sec; +- name = ".got"; +- } +- +- reloc_sec = bfd_get_section_by_name (abfd, name); +- return reloc_sec; ++ bed = get_elf_backend_data (abfd); ++ return bed->get_reloc_section (abfd, name); + } + + /* Assign all ELF section numbers. The dummy first section is handled here +@@ -3841,7 +3850,7 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info) + if (s != NULL) + d->this_hdr.sh_link = elf_section_data (s)->this_idx; + +- s = get_elf_backend_data (abfd)->get_reloc_section (sec); ++ s = elf_get_reloc_section (sec); + if (s != NULL) + { + d->this_hdr.sh_info = elf_section_data (s)->this_idx; +diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c +index fc69964..2e8f338 100644 +--- a/bfd/elf64-ppc.c ++++ b/bfd/elf64-ppc.c +@@ -121,6 +121,7 @@ static bfd_vma opd_entry_value + #define elf_backend_special_sections ppc64_elf_special_sections + #define elf_backend_merge_symbol_attribute ppc64_elf_merge_symbol_attribute + #define elf_backend_merge_symbol ppc64_elf_merge_symbol ++#define elf_backend_get_reloc_section bfd_get_section_by_name + + /* The name of the dynamic interpreter. This is put in the .interp + section. */ +diff --git a/bfd/elfxx-target.h b/bfd/elfxx-target.h +index 6cc9f3f..2551267 100644 +--- a/bfd/elfxx-target.h ++++ b/bfd/elfxx-target.h +@@ -715,7 +715,7 @@ + #endif + + #ifndef elf_backend_get_reloc_section +-#define elf_backend_get_reloc_section _bfd_elf_get_reloc_section ++#define elf_backend_get_reloc_section _bfd_elf_plt_get_reloc_section + #endif + + #ifndef elf_backend_copy_special_section_fields +-- +2.9.3 + diff --git a/debian/patches/pr21414.diff b/debian/patches/pr21414.diff new file mode 100644 index 0000000..c49baec --- /dev/null +++ b/debian/patches/pr21414.diff @@ -0,0 +1,99 @@ +From 7eacd66b086cabb1daab20890d5481894d4f56b2 Mon Sep 17 00:00:00 2001 +From: Alan Modra <amodra@gmail.com> +Date: Sun, 23 Apr 2017 15:21:11 +0930 +Subject: [PATCH] PR 21414, null pointer deref of _bfd_elf_large_com_section + sym + + PR 21414 + * section.c (GLOBAL_SYM_INIT): Make available in bfd.h. + * elf.c (lcomm_sym): New. + (_bfd_elf_large_com_section): Use lcomm_sym section symbol. + * bfd-in2.h: Regenerate. +--- + bfd/ChangeLog | 8 ++++++++ + bfd/bfd-in2.h | 12 ++++++++++++ + bfd/elf.c | 6 ++++-- + bfd/section.c | 24 ++++++++++++------------ + 4 files changed, 36 insertions(+), 14 deletions(-) + +diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h +index 1d73134..17a35c0 100644 +--- a/bfd/bfd-in2.h ++++ b/bfd/bfd-in2.h +@@ -1839,6 +1839,18 @@ extern asection _bfd_std_section[4]; + { NULL }, { NULL } \ + } + ++/* We use a macro to initialize the static asymbol structures because ++ traditional C does not permit us to initialize a union member while ++ gcc warns if we don't initialize it. ++ the_bfd, name, value, attr, section [, udata] */ ++#ifdef __STDC__ ++#define GLOBAL_SYM_INIT(NAME, SECTION) \ ++ { 0, NAME, 0, BSF_SECTION_SYM, SECTION, { 0 }} ++#else ++#define GLOBAL_SYM_INIT(NAME, SECTION) \ ++ { 0, NAME, 0, BSF_SECTION_SYM, SECTION } ++#endif ++ + void bfd_section_list_clear (bfd *); + + asection *bfd_get_section_by_name (bfd *abfd, const char *name); +diff --git a/bfd/elf.c b/bfd/elf.c +index dd1a41f..a08e0f8 100644 +--- a/bfd/elf.c ++++ b/bfd/elf.c +@@ -11244,9 +11244,11 @@ _bfd_elf_get_synthetic_symtab (bfd *abfd, + + /* It is only used by x86-64 so far. + ??? This repeats *COM* id of zero. sec->id is supposed to be unique, +- but current usage would allow all of _bfd_std_section to be zero. t*/ ++ but current usage would allow all of _bfd_std_section to be zero. */ ++static const asymbol lcomm_sym ++ = GLOBAL_SYM_INIT ("LARGE_COMMON", &_bfd_elf_large_com_section); + asection _bfd_elf_large_com_section +- = BFD_FAKE_SECTION (_bfd_elf_large_com_section, NULL, ++ = BFD_FAKE_SECTION (_bfd_elf_large_com_section, &lcomm_sym, + "LARGE_COMMON", 0, SEC_IS_COMMON); + + void +diff --git a/bfd/section.c b/bfd/section.c +index 4b3cf6a..28eee7f 100644 +--- a/bfd/section.c ++++ b/bfd/section.c +@@ -738,20 +738,20 @@ CODE_FRAGMENT + . { NULL }, { NULL } \ + . } + . ++.{* We use a macro to initialize the static asymbol structures because ++. traditional C does not permit us to initialize a union member while ++. gcc warns if we don't initialize it. ++. the_bfd, name, value, attr, section [, udata] *} ++.#ifdef __STDC__ ++.#define GLOBAL_SYM_INIT(NAME, SECTION) \ ++. { 0, NAME, 0, BSF_SECTION_SYM, SECTION, { 0 }} ++.#else ++.#define GLOBAL_SYM_INIT(NAME, SECTION) \ ++. { 0, NAME, 0, BSF_SECTION_SYM, SECTION } ++.#endif ++. + */ + +-/* We use a macro to initialize the static asymbol structures because +- traditional C does not permit us to initialize a union member while +- gcc warns if we don't initialize it. */ +- /* the_bfd, name, value, attr, section [, udata] */ +-#ifdef __STDC__ +-#define GLOBAL_SYM_INIT(NAME, SECTION) \ +- { 0, NAME, 0, BSF_SECTION_SYM, SECTION, { 0 }} +-#else +-#define GLOBAL_SYM_INIT(NAME, SECTION) \ +- { 0, NAME, 0, BSF_SECTION_SYM, SECTION } +-#endif +- + /* These symbols are global, not specific to any BFD. Therefore, anything + that tries to change them is broken, and should be repaired. */ + +-- +2.9.3 + diff --git a/debian/patches/pr21431.diff b/debian/patches/pr21431.diff new file mode 100644 index 0000000..52159fc --- /dev/null +++ b/debian/patches/pr21431.diff @@ -0,0 +1,57 @@ +From e63d123268f23a4cbc45ee55fb6dbc7d84729da3 Mon Sep 17 00:00:00 2001 +From: Nick Clifton <nickc@redhat.com> +Date: Wed, 26 Apr 2017 13:07:49 +0100 +Subject: [PATCH] Fix seg-fault attempting to compress a debug section in a + corrupt binary. + + PR binutils/21431 + * compress.c (bfd_init_section_compress_status): Check the return + value from bfd_malloc. +--- + bfd/ChangeLog | 6 ++++++ + bfd/compress.c | 19 +++++++++---------- + 2 files changed, 15 insertions(+), 10 deletions(-) + +diff --git a/bfd/compress.c b/bfd/compress.c +index f881c07..c854a20 100644 +--- a/bfd/compress.c ++++ b/bfd/compress.c +@@ -542,7 +542,6 @@ bfd_init_section_compress_status (bfd *abfd, sec_ptr sec) + { + bfd_size_type uncompressed_size; + bfd_byte *uncompressed_buffer; +- bfd_boolean ret; + + /* Error if not opened for read. */ + if (abfd->direction != read_direction +@@ -558,18 +557,18 @@ bfd_init_section_compress_status (bfd *abfd, sec_ptr sec) + /* Read in the full section contents and compress it. */ + uncompressed_size = sec->size; + uncompressed_buffer = (bfd_byte *) bfd_malloc (uncompressed_size); ++ /* PR 21431 */ ++ if (uncompressed_buffer == NULL) ++ return FALSE; ++ + if (!bfd_get_section_contents (abfd, sec, uncompressed_buffer, + 0, uncompressed_size)) +- ret = FALSE; +- else +- { +- uncompressed_size = bfd_compress_section_contents (abfd, sec, +- uncompressed_buffer, +- uncompressed_size); +- ret = uncompressed_size != 0; +- } ++ return FALSE; + +- return ret; ++ uncompressed_size = bfd_compress_section_contents (abfd, sec, ++ uncompressed_buffer, ++ uncompressed_size); ++ return uncompressed_size != 0; + } + + /* +-- +2.9.3 + diff --git a/debian/patches/pr21432.diff b/debian/patches/pr21432.diff new file mode 100644 index 0000000..fe4fe60 --- /dev/null +++ b/debian/patches/pr21432.diff @@ -0,0 +1,85 @@ +From a941291cab71b9ac356e1c03968c177c03e602ab Mon Sep 17 00:00:00 2001 +From: Alan Modra <amodra@gmail.com> +Date: Sat, 29 Apr 2017 14:48:16 +0930 +Subject: [PATCH] PR21432, buffer overflow in perform_relocation + +The existing reloc offset range tests didn't catch small negative +offsets less than the size of the reloc field. + + PR 21432 + * reloc.c (reloc_offset_in_range): New function. + (bfd_perform_relocation, bfd_install_relocation): Use it. + (_bfd_final_link_relocate): Likewise. +--- + bfd/ChangeLog | 7 +++++++ + bfd/reloc.c | 32 ++++++++++++++++++++------------ + 2 files changed, 27 insertions(+), 12 deletions(-) + +diff --git a/bfd/reloc.c b/bfd/reloc.c +index 9a04022..12520d1 100644 +--- a/bfd/reloc.c ++++ b/bfd/reloc.c +@@ -538,6 +538,22 @@ bfd_check_overflow (enum complain_overflow how, + return flag; + } + ++/* HOWTO describes a relocation, at offset OCTET. Return whether the ++ relocation field is within SECTION of ABFD. */ ++ ++static bfd_boolean ++reloc_offset_in_range (reloc_howto_type *howto, bfd *abfd, ++ asection *section, bfd_size_type octet) ++{ ++ bfd_size_type octet_end = bfd_get_section_limit_octets (abfd, section); ++ bfd_size_type reloc_size = bfd_get_reloc_size (howto); ++ ++ /* The reloc field must be contained entirely within the section. ++ Allow zero length fields (marker relocs or NONE relocs where no ++ relocation will be performed) at the end of the section. */ ++ return octet <= octet_end && octet + reloc_size <= octet_end; ++} ++ + /* + FUNCTION + bfd_perform_relocation +@@ -619,15 +635,9 @@ bfd_perform_relocation (bfd *abfd, + if (howto == NULL) + return bfd_reloc_undefined; + +- /* Is the address of the relocation really within the section? +- Include the size of the reloc in the test for out of range addresses. +- PR 17512: file: c146ab8b, 46dff27f, 38e53ebf. */ ++ /* Is the address of the relocation really within the section? */ + octets = reloc_entry->address * bfd_octets_per_byte (abfd); +- if (octets + bfd_get_reloc_size (howto) +- > bfd_get_section_limit_octets (abfd, input_section) +- /* Check for an overly large offset which +- masquerades as a negative value too. */ +- || (octets + bfd_get_reloc_size (howto) < bfd_get_reloc_size (howto))) ++ if (!reloc_offset_in_range (howto, abfd, input_section, octets)) + return bfd_reloc_outofrange; + + /* Work out which section the relocation is targeted at and the +@@ -1015,8 +1025,7 @@ bfd_install_relocation (bfd *abfd, + + /* Is the address of the relocation really within the section? */ + octets = reloc_entry->address * bfd_octets_per_byte (abfd); +- if (octets + bfd_get_reloc_size (howto) +- > bfd_get_section_limit_octets (abfd, input_section)) ++ if (!reloc_offset_in_range (howto, abfd, input_section, octets)) + return bfd_reloc_outofrange; + + /* Work out which section the relocation is targeted at and the +@@ -1354,8 +1363,7 @@ _bfd_final_link_relocate (reloc_howto_type *howto, + bfd_size_type octets = address * bfd_octets_per_byte (input_bfd); + + /* Sanity check the address. */ +- if (octets + bfd_get_reloc_size (howto) +- > bfd_get_section_limit_octets (input_bfd, input_section)) ++ if (!reloc_offset_in_range (howto, input_bfd, input_section, octets)) + return bfd_reloc_outofrange; + + /* This function assumes that we are dealing with a basic relocation +-- +2.9.3 + diff --git a/debian/patches/pr21434.diff b/debian/patches/pr21434.diff new file mode 100644 index 0000000..0e6dc41 --- /dev/null +++ b/debian/patches/pr21434.diff @@ -0,0 +1,33 @@ +From 04b31182bf3f8a1a76e995bdfaaaab4c009b9cb2 Mon Sep 17 00:00:00 2001 +From: Nick Clifton <nickc@redhat.com> +Date: Wed, 26 Apr 2017 16:30:22 +0100 +Subject: [PATCH] Fix a seg-fault when processing a corrupt binary containing + reloc(s) with negative addresses. + + PR binutils/21434 + * reloc.c (bfd_perform_relocation): Check for a negative address + in the reloc. +--- + bfd/ChangeLog | 6 ++++++ + bfd/reloc.c | 5 ++++- + 2 files changed, 10 insertions(+), 1 deletion(-) + +diff --git a/bfd/reloc.c b/bfd/reloc.c +index 2791458..9a04022 100644 +--- a/bfd/reloc.c ++++ b/bfd/reloc.c +@@ -624,7 +624,10 @@ bfd_perform_relocation (bfd *abfd, + PR 17512: file: c146ab8b, 46dff27f, 38e53ebf. */ + octets = reloc_entry->address * bfd_octets_per_byte (abfd); + if (octets + bfd_get_reloc_size (howto) +- > bfd_get_section_limit_octets (abfd, input_section)) ++ > bfd_get_section_limit_octets (abfd, input_section) ++ /* Check for an overly large offset which ++ masquerades as a negative value too. */ ++ || (octets + bfd_get_reloc_size (howto) < bfd_get_reloc_size (howto))) + return bfd_reloc_outofrange; + + /* Work out which section the relocation is targeted at and the +-- +2.9.3 + diff --git a/debian/patches/pr21438.diff b/debian/patches/pr21438.diff new file mode 100644 index 0000000..97886b2 --- /dev/null +++ b/debian/patches/pr21438.diff @@ -0,0 +1,125 @@ +From d949ff5607b9f595e0eed2ff15fbe5eb84eb3a34 Mon Sep 17 00:00:00 2001 +From: Nick Clifton <nickc@redhat.com> +Date: Fri, 28 Apr 2017 10:28:04 +0100 +Subject: [PATCH] Fix heap-buffer overflow bugs caused when dumping debug + information from a corrupt binary. + + PR binutils/21438 + * dwarf.c (process_extended_line_op): Do not assume that the + string extracted from the section is NUL terminated. + (fetch_indirect_string): If the string retrieved from the section + is not NUL terminated, return an error message. + (fetch_indirect_line_string): Likewise. + (fetch_indexed_string): Likewise. +--- + binutils/ChangeLog | 10 +++++++++ + binutils/dwarf.c | 66 +++++++++++++++++++++++++++++++++++++++++------------- + 2 files changed, 60 insertions(+), 16 deletions(-) + +Index: b/binutils/dwarf.c +=================================================================== +--- a/binutils/dwarf.c ++++ b/binutils/dwarf.c +@@ -472,15 +472,20 @@ process_extended_line_op (unsigned char + printf (_(" Entry\tDir\tTime\tSize\tName\n")); + printf (" %d\t", ++state_machine_regs.last_file_entry); + +- name = data; +- data += strnlen ((char *) data, end - data) + 1; +- printf ("%s\t", dwarf_vmatoa ("u", read_uleb128 (data, & bytes_read, end))); +- data += bytes_read; +- printf ("%s\t", dwarf_vmatoa ("u", read_uleb128 (data, & bytes_read, end))); +- data += bytes_read; +- printf ("%s\t", dwarf_vmatoa ("u", read_uleb128 (data, & bytes_read, end))); +- data += bytes_read; +- printf ("%s\n\n", name); ++ { ++ size_t l; ++ ++ name = data; ++ l = strnlen ((char *) data, end - data); ++ data += len + 1; ++ printf ("%s\t", dwarf_vmatoa ("u", read_uleb128 (data, & bytes_read, end))); ++ data += bytes_read; ++ printf ("%s\t", dwarf_vmatoa ("u", read_uleb128 (data, & bytes_read, end))); ++ data += bytes_read; ++ printf ("%s\t", dwarf_vmatoa ("u", read_uleb128 (data, & bytes_read, end))); ++ data += bytes_read; ++ printf ("%.*s\n\n", (int) l, name); ++ } + + if (((unsigned int) (data - orig_data) != len) || data == end) + warn (_("DW_LNE_define_file: Bad opcode length\n")); +@@ -597,18 +602,28 @@ static const unsigned char * + fetch_indirect_string (dwarf_vma offset) + { + struct dwarf_section *section = &debug_displays [str].section; ++ const unsigned char * ret; + + if (section->start == NULL) + return (const unsigned char *) _("<no .debug_str section>"); + +- if (offset > section->size) ++ if (offset >= section->size) + { + warn (_("DW_FORM_strp offset too big: %s\n"), + dwarf_vmatoa ("x", offset)); + return (const unsigned char *) _("<offset is too big>"); + } + +- return (const unsigned char *) section->start + offset; ++ ret = section->start + offset; ++ /* Unfortunately we cannot rely upon the .debug_str section ending with a ++ NUL byte. Since our caller is expecting to receive a well formed C ++ string we test for the lack of a terminating byte here. */ ++ if (strnlen ((const char *) ret, section->size - offset) ++ == section->size - offset) ++ ret = (const unsigned char *) ++ _("<no NUL byte at end of .debug_str section>"); ++ ++ return ret; + } + + static const char * +@@ -621,6 +636,7 @@ fetch_indexed_string (dwarf_vma idx, str + struct dwarf_section *str_section = &debug_displays [str_sec_idx].section; + dwarf_vma index_offset = idx * offset_size; + dwarf_vma str_offset; ++ const char * ret; + + if (index_section->start == NULL) + return (dwo ? _("<no .debug_str_offsets.dwo section>") +@@ -628,7 +644,7 @@ fetch_indexed_string (dwarf_vma idx, str + + if (this_set != NULL) + index_offset += this_set->section_offsets [DW_SECT_STR_OFFSETS]; +- if (index_offset > index_section->size) ++ if (index_offset >= index_section->size) + { + warn (_("DW_FORM_GNU_str_index offset too big: %s\n"), + dwarf_vmatoa ("x", index_offset)); +@@ -641,14 +657,22 @@ fetch_indexed_string (dwarf_vma idx, str + + str_offset = byte_get (index_section->start + index_offset, offset_size); + str_offset -= str_section->address; +- if (str_offset > str_section->size) ++ if (str_offset >= str_section->size) + { + warn (_("DW_FORM_GNU_str_index indirect offset too big: %s\n"), + dwarf_vmatoa ("x", str_offset)); + return _("<indirect index offset is too big>"); + } + +- return (const char *) str_section->start + str_offset; ++ ret = (const char *) str_section->start + str_offset; ++ /* Unfortunately we cannot rely upon str_section ending with a NUL byte. ++ Since our caller is expecting to receive a well formed C string we test ++ for the lack of a terminating byte here. */ ++ if (strnlen (ret, str_section->size - str_offset) ++ == str_section->size - str_offset) ++ ret = (const char *) _("<no NUL byte at end of section>"); ++ ++ return ret; + } + + static const char * diff --git a/debian/patches/pr21440.diff b/debian/patches/pr21440.diff new file mode 100644 index 0000000..4dcf83e --- /dev/null +++ b/debian/patches/pr21440.diff @@ -0,0 +1,36 @@ +From 39ff1b79f687b65f4144ddb379f22587003443fb Mon Sep 17 00:00:00 2001 +From: Nick Clifton <nickc@redhat.com> +Date: Tue, 2 May 2017 11:54:53 +0100 +Subject: [PATCH] Prevent memory exhaustion from a corrupt PE binary with an + overlarge number of relocs. + + PR 21440 + * objdump.c (dump_relocs_in_section): Check for an excessive + number of relocs before attempting to dump them. +--- + binutils/ChangeLog | 6 ++++++ + binutils/objdump.c | 8 ++++++++ + 2 files changed, 14 insertions(+) + +diff --git a/binutils/objdump.c b/binutils/objdump.c +index bc61000..5972da1 100644 +--- a/binutils/objdump.c ++++ b/binutils/objdump.c +@@ -3379,6 +3379,14 @@ dump_relocs_in_section (bfd *abfd, + return; + } + ++ if ((bfd_get_file_flags (abfd) & (BFD_IN_MEMORY | BFD_LINKER_CREATED)) == 0 ++ && relsize > get_file_size (bfd_get_filename (abfd))) ++ { ++ printf (" (too many: 0x%x)\n", section->reloc_count); ++ bfd_set_error (bfd_error_file_truncated); ++ bfd_fatal (bfd_get_filename (abfd)); ++ } ++ + relpp = (arelent **) xmalloc (relsize); + relcount = bfd_canonicalize_reloc (abfd, section, relpp, syms); + +-- +2.9.3 + diff --git a/debian/patches/pr70909.diff b/debian/patches/pr70909.diff new file mode 100644 index 0000000..abdf444 --- /dev/null +++ b/debian/patches/pr70909.diff @@ -0,0 +1,343 @@ +2017-03-08 Mark Wielaard <mark@klomp.org> + + PR demangler/70909 + PR demangler/67264 + * include/demangle.h: Add d_printing to struct demangle_component + and pass struct demangle_component as non const. + +libiberty/ + +2017-03-08 Mark Wielaard <mark@klomp.org> + + PR demangler/70909 + PR demangler/67264 + * cp-demangle.c: Fix endless recursion. Pass + struct demangle_component as non const. + (d_make_empty): Initialize variable. + (d_print_comp_inner): Limit recursion. + (d_print_comp): Decrement variable. + * cp-demint.c (cplus_demangle_fill_component): Initialize + variable. + (cplus_demangle_fill_builtin_type): Likewise. + (cplus_demangle_fill_operator): Likewise. + * testsuite/demangle-expected: Add tests. + + +Index: b/include/demangle.h +=================================================================== +--- a/include/demangle.h ++++ b/include/demangle.h +@@ -494,6 +494,11 @@ struct demangle_component + /* The type of this component. */ + enum demangle_component_type type; + ++ /* Guard against recursive component printing. ++ Initialize to zero. Private to d_print_comp. ++ All other fields are final after initialization. */ ++ int d_printing; ++ + union + { + /* For DEMANGLE_COMPONENT_NAME. */ +@@ -688,7 +693,7 @@ cplus_demangle_v3_components (const char + + extern char * + cplus_demangle_print (int options, +- const struct demangle_component *tree, ++ struct demangle_component *tree, + int estimated_length, + size_t *p_allocated_size); + +@@ -708,7 +713,7 @@ cplus_demangle_print (int options, + + extern int + cplus_demangle_print_callback (int options, +- const struct demangle_component *tree, ++ struct demangle_component *tree, + demangle_callbackref callback, void *opaque); + + #ifdef __cplusplus +Index: b/libiberty/testsuite/demangle-expected +=================================================================== +--- a/libiberty/testsuite/demangle-expected ++++ b/libiberty/testsuite/demangle-expected +@@ -4686,3 +4686,34 @@ void g<A>(S<&A::operator+>) + + _Z1gI1AEv1SIXadsrT_plEE + void g<A>(S<&A::operator+>) ++ ++# ++# Test recursion PR67264 ++_Z1KIStcvT_E ++_Z1KIStcvT_E ++ ++_ZcvT_IIS0_EE ++_ZcvT_IIS0_EE ++ ++_ZcvT_IZcvT_E1fE ++_ZcvT_IZcvT_E1fE ++ ++_Z1gINcvT_EE ++_Z1gINcvT_EE ++ ++_ZcvT_ILZcvDTT_EEE ++_ZcvT_ILZcvDTT_EEE ++ ++_Z1gIJOOT_EEOT_c ++_Z1gIJOOT_EEOT_c ++ ++_Z1KMMMMMMMMMMMMMMMA_xooooooooooooooo ++_Z1KMMMMMMMMMMMMMMMA_xooooooooooooooo ++ ++_ZdvMMMMMMMMMMMMMrrrrA_DTdvfp_fp_Eededilfdfdfdfd ++_ZdvMMMMMMMMMMMMMrrrrA_DTdvfp_fp_Eededilfdfdfdfd ++# ++# Test for Infinite Recursion PR70909 ++ ++_Z1MA_aMMMMA_MMA_MMMMMMMMSt1MS_o11T0000000000t2M0oooozoooo ++_Z1MA_aMMMMA_MMA_MMMMMMMMSt1MS_o11T0000000000t2M0oooozoooo +Index: b/libiberty/cp-demint.c +=================================================================== +--- a/libiberty/cp-demint.c ++++ b/libiberty/cp-demint.c +@@ -123,6 +123,7 @@ cplus_demangle_fill_component (struct de + p->type = type; + p->u.s_binary.left = left; + p->u.s_binary.right = right; ++ p->d_printing = 0; + + return 1; + } +@@ -146,6 +147,7 @@ cplus_demangle_fill_builtin_type (struct + { + p->type = DEMANGLE_COMPONENT_BUILTIN_TYPE; + p->u.s_builtin.type = &cplus_demangle_builtin_types[i]; ++ p->d_printing = 0; + return 1; + } + } +@@ -172,6 +174,7 @@ cplus_demangle_fill_operator (struct dem + { + p->type = DEMANGLE_COMPONENT_OPERATOR; + p->u.s_operator.op = &cplus_demangle_operators[i]; ++ p->d_printing = 0; + return 1; + } + } +Index: b/libiberty/cp-demangle.c +=================================================================== +--- a/libiberty/cp-demangle.c ++++ b/libiberty/cp-demangle.c +@@ -173,10 +173,10 @@ static struct demangle_component *d_mang + static struct demangle_component *d_type (struct d_info *); + + #define cplus_demangle_print d_print +-static char *d_print (int, const struct demangle_component *, int, size_t *); ++static char *d_print (int, struct demangle_component *, int, size_t *); + + #define cplus_demangle_print_callback d_print_callback +-static int d_print_callback (int, const struct demangle_component *, ++static int d_print_callback (int, struct demangle_component *, + demangle_callbackref, void *); + + #define cplus_demangle_init_info d_init_info +@@ -265,7 +265,7 @@ struct d_print_mod + in which they appeared in the mangled string. */ + struct d_print_mod *next; + /* The modifier. */ +- const struct demangle_component *mod; ++ struct demangle_component *mod; + /* Whether this modifier was printed. */ + int printed; + /* The list of templates which applies to this modifier. */ +@@ -531,7 +531,7 @@ static inline void d_append_string (stru + static inline char d_last_char (struct d_print_info *); + + static void +-d_print_comp (struct d_print_info *, int, const struct demangle_component *); ++d_print_comp (struct d_print_info *, int, struct demangle_component *); + + static void + d_print_java_identifier (struct d_print_info *, const char *, int); +@@ -540,25 +540,25 @@ static void + d_print_mod_list (struct d_print_info *, int, struct d_print_mod *, int); + + static void +-d_print_mod (struct d_print_info *, int, const struct demangle_component *); ++d_print_mod (struct d_print_info *, int, struct demangle_component *); + + static void + d_print_function_type (struct d_print_info *, int, +- const struct demangle_component *, ++ struct demangle_component *, + struct d_print_mod *); + + static void + d_print_array_type (struct d_print_info *, int, +- const struct demangle_component *, ++ struct demangle_component *, + struct d_print_mod *); + + static void +-d_print_expr_op (struct d_print_info *, int, const struct demangle_component *); ++d_print_expr_op (struct d_print_info *, int, struct demangle_component *); + + static void d_print_cast (struct d_print_info *, int, +- const struct demangle_component *); ++ struct demangle_component *); + static void d_print_conversion (struct d_print_info *, int, +- const struct demangle_component *); ++ struct demangle_component *); + + static int d_demangle_callback (const char *, int, + demangle_callbackref, void *); +@@ -924,6 +924,7 @@ d_make_empty (struct d_info *di) + if (di->next_comp >= di->num_comps) + return NULL; + p = &di->comps[di->next_comp]; ++ p->d_printing = 0; + ++di->next_comp; + return p; + } +@@ -4246,7 +4247,7 @@ d_last_char (struct d_print_info *dpi) + CP_STATIC_IF_GLIBCPP_V3 + int + cplus_demangle_print_callback (int options, +- const struct demangle_component *dc, ++ struct demangle_component *dc, + demangle_callbackref callback, void *opaque) + { + struct d_print_info dpi; +@@ -4289,7 +4290,7 @@ cplus_demangle_print_callback (int optio + + CP_STATIC_IF_GLIBCPP_V3 + char * +-cplus_demangle_print (int options, const struct demangle_component *dc, ++cplus_demangle_print (int options, struct demangle_component *dc, + int estimate, size_t *palc) + { + struct d_growable_string dgs; +@@ -4449,7 +4450,7 @@ d_args_length (struct d_print_info *dpi, + + static void + d_print_subexpr (struct d_print_info *dpi, int options, +- const struct demangle_component *dc) ++ struct demangle_component *dc) + { + int simple = 0; + if (dc->type == DEMANGLE_COMPONENT_NAME +@@ -4525,9 +4526,9 @@ d_get_saved_scope (struct d_print_info * + + static int + d_maybe_print_fold_expression (struct d_print_info *dpi, int options, +- const struct demangle_component *dc) ++ struct demangle_component *dc) + { +- const struct demangle_component *ops, *operator_, *op1, *op2; ++ struct demangle_component *ops, *operator_, *op1, *op2; + int save_idx; + + const char *fold_code = d_left (dc)->u.s_operator.op->code; +@@ -4588,11 +4589,11 @@ d_maybe_print_fold_expression (struct d_ + + static void + d_print_comp_inner (struct d_print_info *dpi, int options, +- const struct demangle_component *dc) ++ struct demangle_component *dc) + { + /* Magic variable to let reference smashing skip over the next modifier + without needing to modify *dc. */ +- const struct demangle_component *mod_inner = NULL; ++ struct demangle_component *mod_inner = NULL; + + /* Variable used to store the current templates while a previously + captured scope is used. */ +@@ -4977,7 +4978,7 @@ d_print_comp_inner (struct d_print_info + case DEMANGLE_COMPONENT_RVALUE_REFERENCE: + { + /* Handle reference smashing: & + && = &. */ +- const struct demangle_component *sub = d_left (dc); ++ struct demangle_component *sub = d_left (dc); + if (!dpi->is_lambda_arg + && sub->type == DEMANGLE_COMPONENT_TEMPLATE_PARAM) + { +@@ -5680,9 +5681,16 @@ d_print_comp_inner (struct d_print_info + + static void + d_print_comp (struct d_print_info *dpi, int options, +- const struct demangle_component *dc) ++ struct demangle_component *dc) + { + struct d_component_stack self; ++ if (dc == NULL || dc->d_printing > 1) ++ { ++ d_print_error (dpi); ++ return; ++ } ++ else ++ dc->d_printing++; + + self.dc = dc; + self.parent = dpi->component_stack; +@@ -5691,6 +5699,7 @@ d_print_comp (struct d_print_info *dpi, + d_print_comp_inner (dpi, options, dc); + + dpi->component_stack = self.parent; ++ dc->d_printing--; + } + + /* Print a Java dentifier. For Java we try to handle encoded extended +@@ -5832,7 +5841,7 @@ d_print_mod_list (struct d_print_info *d + + static void + d_print_mod (struct d_print_info *dpi, int options, +- const struct demangle_component *mod) ++ struct demangle_component *mod) + { + switch (mod->type) + { +@@ -5924,7 +5933,7 @@ d_print_mod (struct d_print_info *dpi, i + + static void + d_print_function_type (struct d_print_info *dpi, int options, +- const struct demangle_component *dc, ++ struct demangle_component *dc, + struct d_print_mod *mods) + { + int need_paren; +@@ -6002,7 +6011,7 @@ d_print_function_type (struct d_print_in + + static void + d_print_array_type (struct d_print_info *dpi, int options, +- const struct demangle_component *dc, ++ struct demangle_component *dc, + struct d_print_mod *mods) + { + int need_space; +@@ -6056,7 +6065,7 @@ d_print_array_type (struct d_print_info + + static void + d_print_expr_op (struct d_print_info *dpi, int options, +- const struct demangle_component *dc) ++ struct demangle_component *dc) + { + if (dc->type == DEMANGLE_COMPONENT_OPERATOR) + d_append_buffer (dpi, dc->u.s_operator.op->name, +@@ -6069,7 +6078,7 @@ d_print_expr_op (struct d_print_info *dp + + static void + d_print_cast (struct d_print_info *dpi, int options, +- const struct demangle_component *dc) ++ struct demangle_component *dc) + { + d_print_comp (dpi, options, d_left (dc)); + } +@@ -6078,7 +6087,7 @@ d_print_cast (struct d_print_info *dpi, + + static void + d_print_conversion (struct d_print_info *dpi, int options, +- const struct demangle_component *dc) ++ struct demangle_component *dc) + { + struct d_print_template dpt; + diff --git a/debian/patches/release-build.diff b/debian/patches/release-build.diff deleted file mode 100644 index 9eba2f0..0000000 --- a/debian/patches/release-build.diff +++ /dev/null @@ -1,10 +0,0 @@ -Index: b/bfd/development.sh -=================================================================== ---- a/bfd/development.sh -+++ b/bfd/development.sh -@@ -16,4 +16,4 @@ - # along with this program. If not, see <http://www.gnu.org/licenses/>. - - # Controls whether to enable development-mode features by default. --development=true -+development=false diff --git a/debian/patches/series b/debian/patches/series index dd54571..3af7896 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1,5 @@ branch-updates.diff -branch-version.diff +#branch-version.diff 001_ld_makefile_patch.patch 002_gprof_profile_arcs.patch 003_gprof_see_also_monitor.patch @@ -12,6 +12,7 @@ branch-version.diff 130_gold_disable_testsuite_build.patch 131_ld_bootstrap_testsuite.patch 135_bfd_version.patch +136_bfd_pic.patch 157_ar_scripts_with_tilde.patch #158_ld_system_root.patch 161_gold_dummy_zoption.diff @@ -23,13 +24,30 @@ gprof-build.diff aarch64-libpath.diff #pr-ld-16428.diff mips64-default-n64.diff +gold-mips.diff +ld-new-dtags-by-default.diff +pr21074-revert.diff +i18n-fr.diff # patches taken from the trunk -zlib-1.2.8.diff -release-build.diff +ppc-lib-search-order.diff +pr21157.diff +pr21137.diff +pr21156.diff +pr21139.diff +pr21135.diff +pr70909.diff +pr21342.diff +pr21412.diff +pr21414.diff +pr21431.diff +pr21434.diff +pr21432.diff +pr21438.diff +pr21440.diff +gold-sparc-fix.diff dyson-biarch.patch dyson-pr14493-sol2.patch dyson-ld_altexec.patch dyson-pr12548-anonymous-version-tag.patch - diff --git a/debian/patches/zlib-1.2.8.diff b/debian/patches/zlib-1.2.8.diff deleted file mode 100644 index ec4ff91..0000000 --- a/debian/patches/zlib-1.2.8.diff +++ /dev/null @@ -1,6777 +0,0 @@ -diff --git a/zlib/CMakeLists.txt b/zlib/CMakeLists.txt -index 7ee3bc4..0c0247c 100644 ---- a/zlib/CMakeLists.txt -+++ b/zlib/CMakeLists.txt -@@ -3,7 +3,10 @@ set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON) - - project(zlib C) - --set(VERSION "1.2.7") -+set(VERSION "1.2.8") -+ -+option(ASM686 "Enable building i686 assembly implementation") -+option(AMD64 "Enable building amd64 assembly implementation") - - set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables") - set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries") -@@ -121,11 +124,44 @@ set(ZLIB_SRCS - ) - - if(NOT MINGW) -- set(ZLIB_SRCS ${ZLIB_SRCS} -+ set(ZLIB_DLL_SRCS - win32/zlib1.rc # If present will override custom build rule below. - ) - endif() - -+if(CMAKE_COMPILER_IS_GNUCC) -+ if(ASM686) -+ set(ZLIB_ASMS contrib/asm686/match.S) -+ elseif (AMD64) -+ set(ZLIB_ASMS contrib/amd64/amd64-match.S) -+ endif () -+ -+ if(ZLIB_ASMS) -+ add_definitions(-DASMV) -+ set_source_files_properties(${ZLIB_ASMS} PROPERTIES LANGUAGE C COMPILE_FLAGS -DNO_UNDERLINE) -+ endif() -+endif() -+ -+if(MSVC) -+ if(ASM686) -+ ENABLE_LANGUAGE(ASM_MASM) -+ set(ZLIB_ASMS -+ contrib/masmx86/inffas32.asm -+ contrib/masmx86/match686.asm -+ ) -+ elseif (AMD64) -+ ENABLE_LANGUAGE(ASM_MASM) -+ set(ZLIB_ASMS -+ contrib/masmx64/gvmat64.asm -+ contrib/masmx64/inffasx64.asm -+ ) -+ endif() -+ -+ if(ZLIB_ASMS) -+ add_definitions(-DASMV -DASMINF) -+ endif() -+endif() -+ - # parse the full version number from zlib.h and include in ZLIB_FULL_VERSION - file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents) - string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*" -@@ -134,7 +170,7 @@ string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*" - if(MINGW) - # This gets us DLL resource information when compiling on MinGW. - if(NOT CMAKE_RC_COMPILER) -- SET(CMAKE_RC_COMPILER windres.exe) -+ set(CMAKE_RC_COMPILER windres.exe) - endif() - - add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj -@@ -144,11 +180,11 @@ if(MINGW) - -I ${CMAKE_CURRENT_BINARY_DIR} - -o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj - -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc) -- set(ZLIB_SRCS ${ZLIB_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) -+ set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) - endif(MINGW) - --add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) --add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) -+add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) -+add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) - set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) - set_target_properties(zlib PROPERTIES SOVERSION 1) - -@@ -166,7 +202,9 @@ endif() - if(UNIX) - # On unix-like platforms the library is almost always called libz - set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) -- set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,${CMAKE_CURRENT_SOURCE_DIR}/zlib.map") -+ if(NOT APPLE) -+ set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"") -+ endif() - elseif(BUILD_SHARED_LIBS AND WIN32) - # Creates zlib1.dll when building shared library version - set_target_properties(zlib PROPERTIES SUFFIX "1.dll") -diff --git a/zlib/ChangeLog b/zlib/ChangeLog -index 3db202f..47cb65d 100644 ---- a/zlib/ChangeLog -+++ b/zlib/ChangeLog -@@ -1,5 +1,68 @@ - -- ChangeLog file for zlib -+ ChangeLog file for zlib -+ -+Changes in 1.2.8 (28 Apr 2013) -+- Update contrib/minizip/iowin32.c for Windows RT [Vollant] -+- Do not force Z_CONST for C++ -+- Clean up contrib/vstudio [Ro§] -+- Correct spelling error in zlib.h -+- Fix mixed line endings in contrib/vstudio -+ -+Changes in 1.2.7.3 (13 Apr 2013) -+- Fix version numbers and DLL names in contrib/vstudio/*/zlib.rc -+ -+Changes in 1.2.7.2 (13 Apr 2013) -+- Change check for a four-byte type back to hexadecimal -+- Fix typo in win32/Makefile.msc -+- Add casts in gzwrite.c for pointer differences -+ -+Changes in 1.2.7.1 (24 Mar 2013) -+- Replace use of unsafe string functions with snprintf if available -+- Avoid including stddef.h on Windows for Z_SOLO compile [Niessink] -+- Fix gzgetc undefine when Z_PREFIX set [Turk] -+- Eliminate use of mktemp in Makefile (not always available) -+- Fix bug in 'F' mode for gzopen() -+- Add inflateGetDictionary() function -+- Correct comment in deflate.h -+- Use _snprintf for snprintf in Microsoft C -+- On Darwin, only use /usr/bin/libtool if libtool is not Apple -+- Delete "--version" file if created by "ar --version" [Richard G.] -+- Fix configure check for veracity of compiler error return codes -+- Fix CMake compilation of static lib for MSVC2010 x64 -+- Remove unused variable in infback9.c -+- Fix argument checks in gzlog_compress() and gzlog_write() -+- Clean up the usage of z_const and respect const usage within zlib -+- Clean up examples/gzlog.[ch] comparisons of different types -+- Avoid shift equal to bits in type (caused endless loop) -+- Fix unintialized value bug in gzputc() introduced by const patches -+- Fix memory allocation error in examples/zran.c [Nor] -+- Fix bug where gzopen(), gzclose() would write an empty file -+- Fix bug in gzclose() when gzwrite() runs out of memory -+- Check for input buffer malloc failure in examples/gzappend.c -+- Add note to contrib/blast to use binary mode in stdio -+- Fix comparisons of differently signed integers in contrib/blast -+- Check for invalid code length codes in contrib/puff -+- Fix serious but very rare decompression bug in inftrees.c -+- Update inflateBack() comments, since inflate() can be faster -+- Use underscored I/O function names for WINAPI_FAMILY -+- Add _tr_flush_bits to the external symbols prefixed by --zprefix -+- Add contrib/vstudio/vc10 pre-build step for static only -+- Quote --version-script argument in CMakeLists.txt -+- Don't specify --version-script on Apple platforms in CMakeLists.txt -+- Fix casting error in contrib/testzlib/testzlib.c -+- Fix types in contrib/minizip to match result of get_crc_table() -+- Simplify contrib/vstudio/vc10 with 'd' suffix -+- Add TOP support to win32/Makefile.msc -+- Suport i686 and amd64 assembler builds in CMakeLists.txt -+- Fix typos in the use of _LARGEFILE64_SOURCE in zconf.h -+- Add vc11 and vc12 build files to contrib/vstudio -+- Add gzvprintf() as an undocumented function in zlib -+- Fix configure for Sun shell -+- Remove runtime check in configure for four-byte integer type -+- Add casts and consts to ease user conversion to C++ -+- Add man pages for minizip and miniunzip -+- In Makefile uninstall, don't rm if preceding cd fails -+- Do not return Z_BUF_ERROR if deflateParam() has nothing to write - - Changes in 1.2.7 (2 May 2012) - - Replace use of memmove() with a simple copy for portability -@@ -1112,15 +1175,15 @@ Changes in 1.0.6 (19 Jan 1998) - - added Makefile.nt (thanks to Stephen Williams) - - added the unsupported "contrib" directory: - contrib/asm386/ by Gilles Vollant <info@winimage.com> -- 386 asm code replacing longest_match(). -+ 386 asm code replacing longest_match(). - contrib/iostream/ by Kevin Ruland <kevin@rodin.wustl.edu> -- A C++ I/O streams interface to the zlib gz* functions -+ A C++ I/O streams interface to the zlib gz* functions - contrib/iostream2/ by Tyge Løvset <Tyge.Lovset@cmr.no> -- Another C++ I/O streams interface -+ Another C++ I/O streams interface - contrib/untgz/ by "Pedro A. Aranda Guti\irrez" <paag@tid.es> -- A very simple tar.gz file extractor using zlib -+ A very simple tar.gz file extractor using zlib - contrib/visual-basic.txt by Carlos Rios <c_rios@sonda.cl> -- How to use compress(), uncompress() and the gz* functions from VB. -+ How to use compress(), uncompress() and the gz* functions from VB. - - pass params -f (filtered data), -h (huffman only), -1 to -9 (compression - level) in minigzip (thanks to Tom Lane) - -diff --git a/zlib/ChangeLog.gcj b/zlib/ChangeLog.gcj -index 736be14..252f229 100644 ---- a/zlib/ChangeLog.gcj -+++ b/zlib/ChangeLog.gcj -@@ -1,8 +1,12 @@ --2015-03-31 H.J. Lu <hongjiu.lu@intel.com> -+2015-11-23 Matthias Klose <doko@ubuntu.com> - -- * configure.ac (AM_ENABLE_MULTILIB): Use only if -- ${with_target_subdir} isn't empty. -- * configure: Regenerated. -+ * Imported zlib 1.2.8; merged local changes. -+ -+2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com> -+ -+ * Makefile.in: Regenerated with automake-1.11.6. -+ * aclocal.m4: Likewise. -+ * configure: Likewise. - - 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> - -diff --git a/zlib/Makefile.in b/zlib/Makefile.in -index 3c8fd59..82b72a1 100644 ---- a/zlib/Makefile.in -+++ b/zlib/Makefile.in -@@ -1,9 +1,9 @@ --# Makefile.in generated by automake 1.11.1 from Makefile.am. -+# Makefile.in generated by automake 1.11.6 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, --# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, --# Inc. -+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -+# Foundation, Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -17,6 +17,23 @@ - - - VPATH = @srcdir@ -+am__make_dryrun = \ -+ { \ -+ am__dry=no; \ -+ case $$MAKEFLAGS in \ -+ *\\[\ \ ]*) \ -+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ -+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ -+ *) \ -+ for am__flg in $$MAKEFLAGS; do \ -+ case $$am__flg in \ -+ *=*|--*) ;; \ -+ *n*) am__dry=yes; break;; \ -+ esac; \ -+ done;; \ -+ esac; \ -+ test $$am__dry = yes; \ -+ } - pkgdatadir = $(datadir)/@PACKAGE@ - pkgincludedir = $(includedir)/@PACKAGE@ - pkglibdir = $(libdir)/@PACKAGE@ -@@ -77,6 +94,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ - am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -+am__uninstall_files_from_dir = { \ -+ test -z "$$files" \ -+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ -+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ -+ $(am__cd) "$$dir" && rm -f $$files; }; \ -+ } - am__installdirs = "$(DESTDIR)$(toolexeclibdir)" - LIBRARIES = $(toolexeclib_LIBRARIES) - ARFLAGS = cru -@@ -120,6 +143,11 @@ MULTIDIRS = - MULTISUBDIR = - MULTIDO = true - MULTICLEAN = true -+am__can_run_installinfo = \ -+ case $$AM_UPDATE_INFO_DIR in \ -+ n|no|NO) false;; \ -+ *) (install-info --version) >/dev/null 2>&1;; \ -+ esac - ETAGS = etags - CTAGS = ctags - ACLOCAL = @ACLOCAL@ -@@ -303,7 +331,7 @@ all: all-am - - .SUFFIXES: - .SUFFIXES: .c .lo .o .obj --am--refresh: -+am--refresh: Makefile - @: - $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ -@@ -339,7 +367,6 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - $(am__aclocal_m4_deps): - install-toolexeclibLIBRARIES: $(toolexeclib_LIBRARIES) - @$(NORMAL_INSTALL) -- test -z "$(toolexeclibdir)" || $(MKDIR_P) "$(DESTDIR)$(toolexeclibdir)" - @list='$(toolexeclib_LIBRARIES)'; test -n "$(toolexeclibdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ -@@ -347,6 +374,8 @@ install-toolexeclibLIBRARIES: $(toolexeclib_LIBRARIES) - else :; fi; \ - done; \ - test -z "$$list2" || { \ -+ echo " $(MKDIR_P) '$(DESTDIR)$(toolexeclibdir)'"; \ -+ $(MKDIR_P) "$(DESTDIR)$(toolexeclibdir)" || exit 1; \ - echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(toolexeclibdir)'"; \ - $(INSTALL_DATA) $$list2 "$(DESTDIR)$(toolexeclibdir)" || exit $$?; } - @$(POST_INSTALL) -@@ -363,13 +392,11 @@ uninstall-toolexeclibLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(toolexeclib_LIBRARIES)'; test -n "$(toolexeclibdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ -- test -n "$$files" || exit 0; \ -- echo " ( cd '$(DESTDIR)$(toolexeclibdir)' && rm -f "$$files" )"; \ -- cd "$(DESTDIR)$(toolexeclibdir)" && rm -f $$files -+ dir='$(DESTDIR)$(toolexeclibdir)'; $(am__uninstall_files_from_dir) - - clean-toolexeclibLIBRARIES: - -test -z "$(toolexeclib_LIBRARIES)" || rm -f $(toolexeclib_LIBRARIES) --libz.a: $(libz_a_OBJECTS) $(libz_a_DEPENDENCIES) -+libz.a: $(libz_a_OBJECTS) $(libz_a_DEPENDENCIES) $(EXTRA_libz_a_DEPENDENCIES) - -rm -f libz.a - $(libz_a_AR) libz.a $(libz_a_OBJECTS) $(libz_a_LIBADD) - $(RANLIB) libz.a -@@ -382,7 +409,7 @@ clean-noinstLTLIBRARIES: - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done --libzgcj_convenience.la: $(libzgcj_convenience_la_OBJECTS) $(libzgcj_convenience_la_DEPENDENCIES) -+libzgcj_convenience.la: $(libzgcj_convenience_la_OBJECTS) $(libzgcj_convenience_la_DEPENDENCIES) $(EXTRA_libzgcj_convenience_la_DEPENDENCIES) - $(LINK) $(am_libzgcj_convenience_la_rpath) $(libzgcj_convenience_la_OBJECTS) $(libzgcj_convenience_la_LIBADD) $(LIBS) - - mostlyclean-compile: -@@ -584,10 +611,15 @@ install-am: all-am - - installcheck: installcheck-am - install-strip: -- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ -- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ -- `test -z '$(STRIP)' || \ -- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -+ if test -z '$(STRIP)'; then \ -+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ -+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ -+ install; \ -+ else \ -+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ -+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ -+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ -+ fi - mostlyclean-generic: - - clean-generic: -diff --git a/zlib/README b/zlib/README -index 7e50f19..9e98215 100644 ---- a/zlib/README -+++ b/zlib/README -@@ -3,7 +3,7 @@ shipped with GCC as convenience. - - ZLIB DATA COMPRESSION LIBRARY - --zlib 1.2.7 is a general purpose data compression library. All the code is -+zlib 1.2.8 is a general purpose data compression library. All the code is - thread safe. The data format used by the zlib library is described by RFCs - (Request for Comments) 1950 to 1952 in the files - http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and -@@ -34,7 +34,7 @@ Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997 - issue of Dr. Dobb's Journal; a copy of the article is available at - http://marknelson.us/1997/01/01/zlib-engine/ . - --The changes made in version 1.2.7 are documented in the file ChangeLog. -+The changes made in version 1.2.8 are documented in the file ChangeLog. - - Unsupported third party contributions are provided in directory contrib/ . - -@@ -87,7 +87,7 @@ Acknowledgments: - - Copyright notice: - -- (C) 1995-2012 Jean-loup Gailly and Mark Adler -+ (C) 1995-2013 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages -diff --git a/zlib/aclocal.m4 b/zlib/aclocal.m4 -index b79c935..fab04ed 100644 ---- a/zlib/aclocal.m4 -+++ b/zlib/aclocal.m4 -@@ -1,7 +1,8 @@ --# generated automatically by aclocal 1.11.1 -*- Autoconf -*- -+# generated automatically by aclocal 1.11.6 -*- Autoconf -*- - - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, --# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, -+# Inc. - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -19,12 +20,15 @@ You have another version of autoconf. It may work, but is not guaranteed to. - If you have problems, you may need to regenerate the build system entirely. - To do so, use the procedure documented by the package, typically `autoreconf'.])]) - --# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software -+# Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. - -+# serial 1 -+ - # AM_AUTOMAKE_VERSION(VERSION) - # ---------------------------- - # Automake X.Y traces this macro to ensure aclocal.m4 has been -@@ -34,7 +38,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], - [am__api_version='1.11' - dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to - dnl require some minimum version. Point them to the right macro. --m4_if([$1], [1.11.1], [], -+m4_if([$1], [1.11.6], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl - ]) - -@@ -50,19 +54,21 @@ m4_define([_AM_AUTOCONF_VERSION], []) - # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. - # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. - AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], --[AM_AUTOMAKE_VERSION([1.11.1])dnl -+[AM_AUTOMAKE_VERSION([1.11.6])dnl - m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl - _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - - # AM_AUX_DIR_EXPAND -*- Autoconf -*- - --# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. - -+# serial 1 -+ - # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets - # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to - # `$srcdir', `$srcdir/..', or `$srcdir/../..'. -@@ -144,14 +150,14 @@ AC_CONFIG_COMMANDS_PRE( - Usually this means the macro was only invoked conditionally.]]) - fi])]) - --# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 --# Free Software Foundation, Inc. -+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, -+# 2010, 2011 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. - --# serial 10 -+# serial 12 - - # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be - # written in clear, in which case automake, when reading aclocal.m4, -@@ -191,6 +197,7 @@ AC_CACHE_CHECK([dependency style of $depcc], - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. -+ rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. -@@ -255,7 +262,7 @@ AC_CACHE_CHECK([dependency style of $depcc], - break - fi - ;; -- msvisualcpp | msvcmsys) -+ msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. -@@ -320,10 +327,13 @@ AC_DEFUN([AM_DEP_TRACK], - if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -+ am__nodep='_no' - fi - AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) - AC_SUBST([AMDEPBACKSLASH])dnl - _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -+AC_SUBST([am__nodep])dnl -+_AM_SUBST_NOTMAKE([am__nodep])dnl - ]) - - # Generate code to set up dependency tracking. -*- Autoconf -*- -@@ -545,12 +555,15 @@ for _am_header in $config_headers :; do - done - echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - --# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. -+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, -+# Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. - -+# serial 1 -+ - # AM_PROG_INSTALL_SH - # ------------------ - # Define $install_sh. -@@ -569,8 +582,8 @@ AC_SUBST(install_sh)]) - # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- - # From Jim Meyering - --# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 --# Free Software Foundation, Inc. -+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, -+# 2011 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -590,7 +603,7 @@ AC_DEFUN([AM_MAINTAINER_MODE], - [disable], [m4_define([am_maintainer_other], [enable])], - [m4_define([am_maintainer_other], [enable]) - m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) --AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) -+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) - dnl maintainer-mode's default is 'disable' unless 'enable' is passed - AC_ARG_ENABLE([maintainer-mode], - [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful -@@ -701,12 +714,15 @@ else - fi - ]) - --# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, -+# Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. - -+# serial 1 -+ - # AM_PROG_MKDIR_P - # --------------- - # Check for `mkdir -p'. -@@ -729,13 +745,14 @@ esac - - # Helper functions for option handling. -*- Autoconf -*- - --# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. -+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software -+# Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. - --# serial 4 -+# serial 5 - - # _AM_MANGLE_OPTION(NAME) - # ----------------------- -@@ -743,13 +760,13 @@ AC_DEFUN([_AM_MANGLE_OPTION], - [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - - # _AM_SET_OPTION(NAME) --# ------------------------------ -+# -------------------- - # Set option NAME. Presently that only means defining a flag for this option. - AC_DEFUN([_AM_SET_OPTION], - [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - - # _AM_SET_OPTIONS(OPTIONS) --# ---------------------------------- -+# ------------------------ - # OPTIONS is a space-separated list of Automake options. - AC_DEFUN([_AM_SET_OPTIONS], - [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) -@@ -825,12 +842,14 @@ Check your system clock]) - fi - AC_MSG_RESULT(yes)]) - --# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. - -+# serial 1 -+ - # AM_PROG_INSTALL_STRIP - # --------------------- - # One issue with vendor `install' (even GNU) is that you can't -@@ -853,13 +872,13 @@ fi - INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - AC_SUBST([INSTALL_STRIP_PROGRAM])]) - --# Copyright (C) 2006, 2008 Free Software Foundation, Inc. -+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. - --# serial 2 -+# serial 3 - - # _AM_SUBST_NOTMAKE(VARIABLE) - # --------------------------- -@@ -868,13 +887,13 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) - AC_DEFUN([_AM_SUBST_NOTMAKE]) - - # AM_SUBST_NOTMAKE(VARIABLE) --# --------------------------- -+# -------------------------- - # Public sister of _AM_SUBST_NOTMAKE. - AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - - # Check how to create a tarball. -*- Autoconf -*- - --# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -896,10 +915,11 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - # a tarball read from stdin. - # $(am__untar) < result.tar - AC_DEFUN([_AM_PROG_TAR], --[# Always define AMTAR for backward compatibility. --AM_MISSING_PROG([AMTAR], [tar]) -+[# Always define AMTAR for backward compatibility. Yes, it's still used -+# in the wild :-( We should find a proper way to deprecate it ... -+AC_SUBST([AMTAR], ['$${TAR-tar}']) - m4_if([$1], [v7], -- [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], -+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) - AC_MSG_CHECKING([how to create a $1 tar archive]) -diff --git a/zlib/as400/bndsrc b/zlib/as400/bndsrc -index 52cc661..98814fd 100644 ---- a/zlib/as400/bndsrc -+++ b/zlib/as400/bndsrc -@@ -202,4 +202,14 @@ STRPGMEXP PGMLVL(*CURRENT) SIGNATURE('ZLIB') - - EXPORT SYMBOL("inflateResetKeep") - -+/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ -+/* Version 1.2.8 additional entry points. */ -+/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ -+ -+/********************************************************************/ -+/* *MODULE INFLATE ZLIB 01/02/01 00:15:09 */ -+/********************************************************************/ -+ -+ EXPORT SYMBOL("inflateGetDictionary") -+ - ENDPGMEXP -diff --git a/zlib/as400/compile.clp b/zlib/as400/compile.clp -index 8d0c58f..e3f47c6 100644 ---- a/zlib/as400/compile.clp -+++ b/zlib/as400/compile.clp -@@ -105,6 +105,6 @@ - &MODLIB/TREES &MODLIB/UNCOMPR + - &MODLIB/ZUTIL) + - SRCFILE(&SRCLIB/&CTLFILE) SRCMBR(BNDSRC) + -- TEXT('ZLIB 1.2.7') TGTRLS(&TGTRLS) -+ TEXT('ZLIB 1.2.8') TGTRLS(&TGTRLS) - - ENDPGM -diff --git a/zlib/as400/readme.txt b/zlib/as400/readme.txt -index 23cd1b8..7b5d93b 100644 ---- a/zlib/as400/readme.txt -+++ b/zlib/as400/readme.txt -@@ -1,4 +1,4 @@ -- ZLIB version 1.2.7 for AS400 installation instructions -+ ZLIB version 1.2.8 for AS400 installation instructions - - I) From an AS400 *SAVF file: - -diff --git a/zlib/as400/zlib.inc b/zlib/as400/zlib.inc -index 747c598..7341a6d 100644 ---- a/zlib/as400/zlib.inc -+++ b/zlib/as400/zlib.inc -@@ -1,7 +1,7 @@ - * ZLIB.INC - Interface to the general purpose compression library - * - * ILE RPG400 version by Patrick Monnerat, DATASPHERE. -- * Version 1.2.7 -+ * Version 1.2.8 - * - * - * WARNING: -@@ -22,12 +22,12 @@ - * - * Versioning information. - * -- D ZLIB_VERSION C '1.2.7' -- D ZLIB_VERNUM C X'1270' -+ D ZLIB_VERSION C '1.2.8' -+ D ZLIB_VERNUM C X'1280' - D ZLIB_VER_MAJOR C 1 - D ZLIB_VER_MINOR C 2 - D ZLIB_VER_REVISION... -- D C 7 -+ D C 8 - D ZLIB_VER_SUBREVISION... - D C 0 - * -@@ -359,6 +359,12 @@ - D dictionary 65535 const options(*varsize) Dictionary bytes - D dictLength 10U 0 value Dictionary length - * -+ D inflateGetDictionary... -+ D PR 10I 0 extproc('inflateGetDictionary') Get dictionary -+ D strm like(z_stream) Expansion stream -+ D dictionary 65535 options(*varsize) Dictionary bytes -+ D dictLength 10U 0 Dictionary length -+ * - D inflateSync PR 10I 0 extproc('inflateSync') Sync. expansion - D strm like(z_stream) Expansion stream - * -diff --git a/zlib/compress.c b/zlib/compress.c -index 7de9766..5dfe73b 100644 ---- a/zlib/compress.c -+++ b/zlib/compress.c -@@ -29,7 +29,7 @@ int ZEXPORT compress2 (dest, destLen, source, sourceLen, level) - z_stream stream; - int err; - -- stream.next_in = (Bytef*)source; -+ stream.next_in = (z_const Bytef *)source; - stream.avail_in = (uInt)sourceLen; - #ifdef MAXSEG_64K - /* Check for source > 64K on 16-bit machine: */ -diff --git a/zlib/configure b/zlib/configure -index 8378857..9f7b1c6 100755 ---- a/zlib/configure -+++ b/zlib/configure -@@ -630,6 +630,7 @@ LIBTOOL - am__fastdepCC_FALSE - am__fastdepCC_TRUE - CCDEPMODE -+am__nodep - AMDEPBACKSLASH - AMDEP_FALSE - AMDEP_TRUE -@@ -2828,11 +2829,11 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - - # We need awk for the "check" target. The system "awk" is bad on - # some platforms. --# Always define AMTAR for backward compatibility. -+# Always define AMTAR for backward compatibility. Yes, it's still used -+# in the wild :-( We should find a proper way to deprecate it ... -+AMTAR='$${TAR-tar}' - --AMTAR=${AMTAR-"${am_missing_run}tar"} -- --am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' -+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' - - - -@@ -3757,6 +3758,7 @@ fi - if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -+ am__nodep='_no' - fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= -@@ -3781,6 +3783,7 @@ else - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. -+ rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. -@@ -3840,7 +3843,7 @@ else - break - fi - ;; -- msvisualcpp | msvcmsys) -+ msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. -@@ -10405,7 +10408,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 10408 "configure" -+#line 10411 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -10511,7 +10514,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 10514 "configure" -+#line 10517 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -diff --git a/zlib/contrib/README.contrib b/zlib/contrib/README.contrib -index dd2285d..c66349b 100644 ---- a/zlib/contrib/README.contrib -+++ b/zlib/contrib/README.contrib -@@ -75,3 +75,4 @@ untgz/ by Pedro A. Aranda Gutierrez <paag@tid.es> - - vstudio/ by Gilles Vollant <info@winimage.com> - Building a minizip-enhanced zlib with Microsoft Visual Studio -+ Includes vc11 from kreuzerkrieg and vc12 from davispuh -diff --git a/zlib/contrib/blast/blast.c b/zlib/contrib/blast/blast.c -index 4ce697a..69ef0fe 100644 ---- a/zlib/contrib/blast/blast.c -+++ b/zlib/contrib/blast/blast.c -@@ -1,7 +1,7 @@ - /* blast.c -- * Copyright (C) 2003 Mark Adler -+ * Copyright (C) 2003, 2012 Mark Adler - * For conditions of distribution and use, see copyright notice in blast.h -- * version 1.1, 16 Feb 2003 -+ * version 1.2, 24 Oct 2012 - * - * blast.c decompresses data compressed by the PKWare Compression Library. - * This function provides functionality similar to the explode() function of -@@ -22,6 +22,8 @@ - * - * 1.0 12 Feb 2003 - First version - * 1.1 16 Feb 2003 - Fixed distance check for > 4 GB uncompressed data -+ * 1.2 24 Oct 2012 - Add note about using binary mode in stdio -+ * - Fix comparisons of differently signed integers - */ - - #include <setjmp.h> /* for setjmp(), longjmp(), and jmp_buf */ -@@ -279,7 +281,7 @@ local int decomp(struct state *s) - int dict; /* log2(dictionary size) - 6 */ - int symbol; /* decoded symbol, extra bits for distance */ - int len; /* length for copy */ -- int dist; /* distance for copy */ -+ unsigned dist; /* distance for copy */ - int copy; /* copy counter */ - unsigned char *from, *to; /* copy pointers */ - static int virgin = 1; /* build tables once */ -diff --git a/zlib/contrib/blast/blast.h b/zlib/contrib/blast/blast.h -index ce9e541..658cfd3 100644 ---- a/zlib/contrib/blast/blast.h -+++ b/zlib/contrib/blast/blast.h -@@ -1,6 +1,6 @@ - /* blast.h -- interface for blast.c -- Copyright (C) 2003 Mark Adler -- version 1.1, 16 Feb 2003 -+ Copyright (C) 2003, 2012 Mark Adler -+ version 1.2, 24 Oct 2012 - - This software is provided 'as-is', without any express or implied - warranty. In no event will the author be held liable for any damages -@@ -28,6 +28,10 @@ - * that library. (Note: PKWare overused the "implode" verb, and the format - * used by their library implode() function is completely different and - * incompatible with the implode compression method supported by PKZIP.) -+ * -+ * The binary mode for stdio functions should be used to assure that the -+ * compressed data is not corrupted when read or written. For example: -+ * fopen(..., "rb") and fopen(..., "wb"). - */ - - -diff --git a/zlib/contrib/delphi/ZLib.pas b/zlib/contrib/delphi/ZLib.pas -index f24bb3e..a579974 100644 ---- a/zlib/contrib/delphi/ZLib.pas -+++ b/zlib/contrib/delphi/ZLib.pas -@@ -152,7 +152,7 @@ procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer; - const OutBuf: Pointer; BufSize: Integer); - - const -- zlib_version = '1.2.7'; -+ zlib_version = '1.2.8'; - - type - EZlibError = class(Exception); -diff --git a/zlib/contrib/dotzlib/DotZLib/UnitTests.cs b/zlib/contrib/dotzlib/DotZLib/UnitTests.cs -index 1090288..b273d54 100644 ---- a/zlib/contrib/dotzlib/DotZLib/UnitTests.cs -+++ b/zlib/contrib/dotzlib/DotZLib/UnitTests.cs -@@ -1,5 +1,5 @@ - //
--// © Copyright Henrik Ravn 2004
-+// © Copyright Henrik Ravn 2004
- //
- // Use, modification and distribution are subject to the Boost Software License, Version 1.0.
- // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-@@ -156,7 +156,7 @@ namespace DotZLibTests - public void Info_Version()
- {
- Info info = new Info();
-- Assert.AreEqual("1.2.7", Info.Version);
-+ Assert.AreEqual("1.2.8", Info.Version);
- Assert.AreEqual(32, info.SizeOfUInt);
- Assert.AreEqual(32, info.SizeOfULong);
- Assert.AreEqual(32, info.SizeOfPointer);
-diff --git a/zlib/contrib/infback9/infback9.c b/zlib/contrib/infback9/infback9.c -index 7bbe90c..05fb3e3 100644 ---- a/zlib/contrib/infback9/infback9.c -+++ b/zlib/contrib/infback9/infback9.c -@@ -222,14 +222,13 @@ out_func out; - void FAR *out_desc; - { - struct inflate_state FAR *state; -- unsigned char FAR *next; /* next input */ -+ z_const unsigned char FAR *next; /* next input */ - unsigned char FAR *put; /* next output */ - unsigned have; /* available input */ - unsigned long left; /* available output */ - inflate_mode mode; /* current inflate mode */ - int lastblock; /* true if processing last block */ - int wrap; /* true if the window has wrapped */ -- unsigned long write; /* window write index */ - unsigned char FAR *window; /* allocated sliding window, if needed */ - unsigned long hold; /* bit buffer */ - unsigned bits; /* bits in bit buffer */ -@@ -259,7 +258,6 @@ void FAR *out_desc; - strm->msg = Z_NULL; - mode = TYPE; - lastblock = 0; -- write = 0; - wrap = 0; - window = state->window; - next = strm->next_in; -diff --git a/zlib/contrib/infback9/inftree9.c b/zlib/contrib/infback9/inftree9.c -index 5a0b328..4a73ad2 100644 ---- a/zlib/contrib/infback9/inftree9.c -+++ b/zlib/contrib/infback9/inftree9.c -@@ -1,5 +1,5 @@ - /* inftree9.c -- generate Huffman trees for efficient decoding -- * Copyright (C) 1995-2012 Mark Adler -+ * Copyright (C) 1995-2013 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -@@ -9,7 +9,7 @@ - #define MAXBITS 15 - - const char inflate9_copyright[] = -- " inflate9 1.2.7 Copyright 1995-2012 Mark Adler "; -+ " inflate9 1.2.8 Copyright 1995-2013 Mark Adler "; - /* - If you use the zlib library in a product, an acknowledgment is welcome - in the documentation of your product. If for some reason you cannot -@@ -64,7 +64,7 @@ unsigned short FAR *work; - static const unsigned short lext[31] = { /* Length codes 257..285 extra */ - 128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129, - 130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132, -- 133, 133, 133, 133, 144, 78, 68}; -+ 133, 133, 133, 133, 144, 72, 78}; - static const unsigned short dbase[32] = { /* Distance codes 0..31 base */ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, - 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, -diff --git a/zlib/contrib/minizip/configure.ac b/zlib/contrib/minizip/configure.ac -index 6a9af21..827a4e0 100644 ---- a/zlib/contrib/minizip/configure.ac -+++ b/zlib/contrib/minizip/configure.ac -@@ -1,7 +1,7 @@ - # -*- Autoconf -*- - # Process this file with autoconf to produce a configure script. - --AC_INIT([minizip], [1.2.7], [bugzilla.redhat.com]) -+AC_INIT([minizip], [1.2.8], [bugzilla.redhat.com]) - AC_CONFIG_SRCDIR([minizip.c]) - AM_INIT_AUTOMAKE([foreign]) - LT_INIT -diff --git a/zlib/contrib/minizip/crypt.h b/zlib/contrib/minizip/crypt.h -index a01d08d..1e9e820 100644 ---- a/zlib/contrib/minizip/crypt.h -+++ b/zlib/contrib/minizip/crypt.h -@@ -32,7 +32,7 @@ - /*********************************************************************** - * Return the next byte in the pseudo-random sequence - */ --static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab) -+static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab) - { - unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an - * unpredictable manner on 16-bit systems; not a problem -@@ -45,7 +45,7 @@ static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab) - /*********************************************************************** - * Update the encryption keys with the next byte of plain text - */ --static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int c) -+static int update_keys(unsigned long* pkeys,const z_crc_t* pcrc_32_tab,int c) - { - (*(pkeys+0)) = CRC32((*(pkeys+0)), c); - (*(pkeys+1)) += (*(pkeys+0)) & 0xff; -@@ -62,7 +62,7 @@ static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int - * Initialize the encryption keys and the random header according to - * the given password. - */ --static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned long* pcrc_32_tab) -+static void init_keys(const char* passwd,unsigned long* pkeys,const z_crc_t* pcrc_32_tab) - { - *(pkeys+0) = 305419896L; - *(pkeys+1) = 591751049L; -@@ -91,7 +91,7 @@ static int crypthead(const char* passwd, /* password string */ - unsigned char* buf, /* where to write header */ - int bufSize, - unsigned long* pkeys, -- const unsigned long* pcrc_32_tab, -+ const z_crc_t* pcrc_32_tab, - unsigned long crcForCrypting) - { - int n; /* index in random header */ -diff --git a/zlib/contrib/minizip/iowin32.c b/zlib/contrib/minizip/iowin32.c -index 6a2a883..a46d96c 100644 ---- a/zlib/contrib/minizip/iowin32.c -+++ b/zlib/contrib/minizip/iowin32.c -@@ -25,6 +25,13 @@ - #define INVALID_SET_FILE_POINTER ((DWORD)-1) - #endif - -+ -+#if defined(WINAPI_FAMILY_PARTITION) && (!(defined(IOWIN32_USING_WINRT_API))) -+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) -+#define IOWIN32_USING_WINRT_API 1 -+#endif -+#endif -+ - voidpf ZCALLBACK win32_open_file_func OF((voidpf opaque, const char* filename, int mode)); - uLong ZCALLBACK win32_read_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size)); - uLong ZCALLBACK win32_write_file_func OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); -@@ -93,8 +100,22 @@ voidpf ZCALLBACK win32_open64_file_func (voidpf opaque,const void* filename,int - - win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes); - -+#ifdef IOWIN32_USING_WINRT_API -+#ifdef UNICODE -+ if ((filename!=NULL) && (dwDesiredAccess != 0)) -+ hFile = CreateFile2((LPCTSTR)filename, dwDesiredAccess, dwShareMode, dwCreationDisposition, NULL); -+#else -+ if ((filename!=NULL) && (dwDesiredAccess != 0)) -+ { -+ WCHAR filenameW[FILENAME_MAX + 0x200 + 1]; -+ MultiByteToWideChar(CP_ACP,0,(const char*)filename,-1,filenameW,FILENAME_MAX + 0x200); -+ hFile = CreateFile2(filenameW, dwDesiredAccess, dwShareMode, dwCreationDisposition, NULL); -+ } -+#endif -+#else - if ((filename!=NULL) && (dwDesiredAccess != 0)) - hFile = CreateFile((LPCTSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL); -+#endif - - return win32_build_iowin(hFile); - } -@@ -108,8 +129,17 @@ voidpf ZCALLBACK win32_open64_file_funcA (voidpf opaque,const void* filename,int - - win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes); - -+#ifdef IOWIN32_USING_WINRT_API -+ if ((filename!=NULL) && (dwDesiredAccess != 0)) -+ { -+ WCHAR filenameW[FILENAME_MAX + 0x200 + 1]; -+ MultiByteToWideChar(CP_ACP,0,(const char*)filename,-1,filenameW,FILENAME_MAX + 0x200); -+ hFile = CreateFile2(filenameW, dwDesiredAccess, dwShareMode, dwCreationDisposition, NULL); -+ } -+#else - if ((filename!=NULL) && (dwDesiredAccess != 0)) - hFile = CreateFileA((LPCSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL); -+#endif - - return win32_build_iowin(hFile); - } -@@ -123,8 +153,13 @@ voidpf ZCALLBACK win32_open64_file_funcW (voidpf opaque,const void* filename,int - - win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes); - -+#ifdef IOWIN32_USING_WINRT_API -+ if ((filename!=NULL) && (dwDesiredAccess != 0)) -+ hFile = CreateFile2((LPCWSTR)filename, dwDesiredAccess, dwShareMode, dwCreationDisposition,NULL); -+#else - if ((filename!=NULL) && (dwDesiredAccess != 0)) - hFile = CreateFileW((LPCWSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL); -+#endif - - return win32_build_iowin(hFile); - } -@@ -138,8 +173,22 @@ voidpf ZCALLBACK win32_open_file_func (voidpf opaque,const char* filename,int mo - - win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes); - -+#ifdef IOWIN32_USING_WINRT_API -+#ifdef UNICODE -+ if ((filename!=NULL) && (dwDesiredAccess != 0)) -+ hFile = CreateFile2((LPCTSTR)filename, dwDesiredAccess, dwShareMode, dwCreationDisposition, NULL); -+#else -+ if ((filename!=NULL) && (dwDesiredAccess != 0)) -+ { -+ WCHAR filenameW[FILENAME_MAX + 0x200 + 1]; -+ MultiByteToWideChar(CP_ACP,0,(const char*)filename,-1,filenameW,FILENAME_MAX + 0x200); -+ hFile = CreateFile2(filenameW, dwDesiredAccess, dwShareMode, dwCreationDisposition, NULL); -+ } -+#endif -+#else - if ((filename!=NULL) && (dwDesiredAccess != 0)) - hFile = CreateFile((LPCTSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL); -+#endif - - return win32_build_iowin(hFile); - } -@@ -188,6 +237,26 @@ uLong ZCALLBACK win32_write_file_func (voidpf opaque,voidpf stream,const void* b - return ret; - } - -+static BOOL MySetFilePointerEx(HANDLE hFile, LARGE_INTEGER pos, LARGE_INTEGER *newPos, DWORD dwMoveMethod) -+{ -+#ifdef IOWIN32_USING_WINRT_API -+ return SetFilePointerEx(hFile, pos, newPos, dwMoveMethod); -+#else -+ LONG lHigh = pos.HighPart; -+ DWORD dwNewPos = SetFilePointer(hFile, pos.LowPart, &lHigh, FILE_CURRENT); -+ BOOL fOk = TRUE; -+ if (dwNewPos == 0xFFFFFFFF) -+ if (GetLastError() != NO_ERROR) -+ fOk = FALSE; -+ if ((newPos != NULL) && (fOk)) -+ { -+ newPos->LowPart = dwNewPos; -+ newPos->HighPart = lHigh; -+ } -+ return fOk; -+#endif -+} -+ - long ZCALLBACK win32_tell_file_func (voidpf opaque,voidpf stream) - { - long ret=-1; -@@ -196,15 +265,17 @@ long ZCALLBACK win32_tell_file_func (voidpf opaque,voidpf stream) - hFile = ((WIN32FILE_IOWIN*)stream) -> hf; - if (hFile != NULL) - { -- DWORD dwSet = SetFilePointer(hFile, 0, NULL, FILE_CURRENT); -- if (dwSet == INVALID_SET_FILE_POINTER) -+ LARGE_INTEGER pos; -+ pos.QuadPart = 0; -+ -+ if (!MySetFilePointerEx(hFile, pos, &pos, FILE_CURRENT)) - { - DWORD dwErr = GetLastError(); - ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr; - ret = -1; - } - else -- ret=(long)dwSet; -+ ret=(long)pos.LowPart; - } - return ret; - } -@@ -218,17 +289,17 @@ ZPOS64_T ZCALLBACK win32_tell64_file_func (voidpf opaque, voidpf stream) - - if (hFile) - { -- LARGE_INTEGER li; -- li.QuadPart = 0; -- li.u.LowPart = SetFilePointer(hFile, li.u.LowPart, &li.u.HighPart, FILE_CURRENT); -- if ( (li.LowPart == 0xFFFFFFFF) && (GetLastError() != NO_ERROR)) -+ LARGE_INTEGER pos; -+ pos.QuadPart = 0; -+ -+ if (!MySetFilePointerEx(hFile, pos, &pos, FILE_CURRENT)) - { - DWORD dwErr = GetLastError(); - ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr; - ret = (ZPOS64_T)-1; - } - else -- ret=li.QuadPart; -+ ret=pos.QuadPart; - } - return ret; - } -@@ -258,8 +329,9 @@ long ZCALLBACK win32_seek_file_func (voidpf opaque,voidpf stream,uLong offset,in - - if (hFile != NULL) - { -- DWORD dwSet = SetFilePointer(hFile, offset, NULL, dwMoveMethod); -- if (dwSet == INVALID_SET_FILE_POINTER) -+ LARGE_INTEGER pos; -+ pos.QuadPart = offset; -+ if (!MySetFilePointerEx(hFile, pos, NULL, dwMoveMethod)) - { - DWORD dwErr = GetLastError(); - ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr; -@@ -296,9 +368,9 @@ long ZCALLBACK win32_seek64_file_func (voidpf opaque, voidpf stream,ZPOS64_T off - - if (hFile) - { -- LARGE_INTEGER* li = (LARGE_INTEGER*)&offset; -- DWORD dwSet = SetFilePointer(hFile, li->u.LowPart, &li->u.HighPart, dwMoveMethod); -- if (dwSet == INVALID_SET_FILE_POINTER) -+ LARGE_INTEGER pos; -+ pos.QuadPart = offset; -+ if (!MySetFilePointerEx(hFile, pos, NULL, FILE_CURRENT)) - { - DWORD dwErr = GetLastError(); - ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr; -diff --git a/zlib/contrib/minizip/miniunzip.1 b/zlib/contrib/minizip/miniunzip.1 -new file mode 100644 -index 0000000..111ac69 ---- /dev/null -+++ b/zlib/contrib/minizip/miniunzip.1 -@@ -0,0 +1,63 @@ -+.\" Hey, EMACS: -*- nroff -*- -+.TH miniunzip 1 "Nov 7, 2001" -+.\" Please adjust this date whenever revising the manpage. -+.\" -+.\" Some roff macros, for reference: -+.\" .nh disable hyphenation -+.\" .hy enable hyphenation -+.\" .ad l left justify -+.\" .ad b justify to both left and right margins -+.\" .nf disable filling -+.\" .fi enable filling -+.\" .br insert line break -+.\" .sp <n> insert n+1 empty lines -+.\" for manpage-specific macros, see man(7) -+.SH NAME -+miniunzip - uncompress and examine ZIP archives -+.SH SYNOPSIS -+.B miniunzip -+.RI [ -exvlo ] -+zipfile [ files_to_extract ] [-d tempdir] -+.SH DESCRIPTION -+.B minizip -+is a simple tool which allows the extraction of compressed file -+archives in the ZIP format used by the MS-DOS utility PKZIP. It was -+written as a demonstration of the -+.IR zlib (3) -+library and therefore lack many of the features of the -+.IR unzip (1) -+program. -+.SH OPTIONS -+A number of options are supported. With the exception of -+.BI \-d\ tempdir -+these must be supplied before any -+other arguments and are: -+.TP -+.BI \-l\ ,\ \-\-v -+List the files in the archive without extracting them. -+.TP -+.B \-o -+Overwrite files without prompting for confirmation. -+.TP -+.B \-x -+Extract files (default). -+.PP -+The -+.I zipfile -+argument is the name of the archive to process. The next argument can be used -+to specify a single file to extract from the archive. -+ -+Lastly, the following option can be specified at the end of the command-line: -+.TP -+.BI \-d\ tempdir -+Extract the archive in the directory -+.I tempdir -+rather than the current directory. -+.SH SEE ALSO -+.BR minizip (1), -+.BR zlib (3), -+.BR unzip (1). -+.SH AUTHOR -+This program was written by Gilles Vollant. This manual page was -+written by Mark Brown <broonie@sirena.org.uk>. The -d tempdir option -+was added by Dirk Eddelbuettel <edd@debian.org>. -diff --git a/zlib/contrib/minizip/minizip.1 b/zlib/contrib/minizip/minizip.1 -new file mode 100644 -index 0000000..1154484 ---- /dev/null -+++ b/zlib/contrib/minizip/minizip.1 -@@ -0,0 +1,46 @@ -+.\" Hey, EMACS: -*- nroff -*- -+.TH minizip 1 "May 2, 2001" -+.\" Please adjust this date whenever revising the manpage. -+.\" -+.\" Some roff macros, for reference: -+.\" .nh disable hyphenation -+.\" .hy enable hyphenation -+.\" .ad l left justify -+.\" .ad b justify to both left and right margins -+.\" .nf disable filling -+.\" .fi enable filling -+.\" .br insert line break -+.\" .sp <n> insert n+1 empty lines -+.\" for manpage-specific macros, see man(7) -+.SH NAME -+minizip - create ZIP archives -+.SH SYNOPSIS -+.B minizip -+.RI [ -o ] -+zipfile [ " files" ... ] -+.SH DESCRIPTION -+.B minizip -+is a simple tool which allows the creation of compressed file archives -+in the ZIP format used by the MS-DOS utility PKZIP. It was written as -+a demonstration of the -+.IR zlib (3) -+library and therefore lack many of the features of the -+.IR zip (1) -+program. -+.SH OPTIONS -+The first argument supplied is the name of the ZIP archive to create or -+.RI -o -+in which case it is ignored and the second argument treated as the -+name of the ZIP file. If the ZIP file already exists it will be -+overwritten. -+.PP -+Subsequent arguments specify a list of files to place in the ZIP -+archive. If none are specified then an empty archive will be created. -+.SH SEE ALSO -+.BR miniunzip (1), -+.BR zlib (3), -+.BR zip (1). -+.SH AUTHOR -+This program was written by Gilles Vollant. This manual page was -+written by Mark Brown <broonie@sirena.org.uk>. -+ -diff --git a/zlib/contrib/minizip/unzip.c b/zlib/contrib/minizip/unzip.c -index affad4b..9093504 100644 ---- a/zlib/contrib/minizip/unzip.c -+++ b/zlib/contrib/minizip/unzip.c -@@ -188,7 +188,7 @@ typedef struct - - # ifndef NOUNCRYPT - unsigned long keys[3]; /* keys defining the pseudo-random sequence */ -- const unsigned long* pcrc_32_tab; -+ const z_crc_t* pcrc_32_tab; - # endif - } unz64_s; - -@@ -801,9 +801,9 @@ extern unzFile ZEXPORT unzOpen64 (const void *path) - } - - /* -- Close a ZipFile opened with unzipOpen. -- If there is files inside the .Zip opened with unzipOpenCurrentFile (see later), -- these files MUST be closed with unzipCloseCurrentFile before call unzipClose. -+ Close a ZipFile opened with unzOpen. -+ If there is files inside the .Zip opened with unzOpenCurrentFile (see later), -+ these files MUST be closed with unzCloseCurrentFile before call unzClose. - return UNZ_OK if there is no problem. */ - extern int ZEXPORT unzClose (unzFile file) - { -@@ -1223,7 +1223,7 @@ extern int ZEXPORT unzGoToNextFile (unzFile file) - - /* - Try locate the file szFileName in the zipfile. -- For the iCaseSensitivity signification, see unzipStringFileNameCompare -+ For the iCaseSensitivity signification, see unzStringFileNameCompare - - return value : - UNZ_OK if the file is found. It becomes the current file. -@@ -1998,7 +1998,7 @@ extern int ZEXPORT unzGetLocalExtrafield (unzFile file, voidp buf, unsigned len) - } - - /* -- Close the file in zip opened with unzipOpenCurrentFile -+ Close the file in zip opened with unzOpenCurrentFile - Return UNZ_CRCERROR if all the file was read but the CRC is not good - */ - extern int ZEXPORT unzCloseCurrentFile (unzFile file) -diff --git a/zlib/contrib/minizip/unzip.h b/zlib/contrib/minizip/unzip.h -index 3183968..2104e39 100644 ---- a/zlib/contrib/minizip/unzip.h -+++ b/zlib/contrib/minizip/unzip.h -@@ -197,9 +197,9 @@ extern unzFile ZEXPORT unzOpen2_64 OF((const void *path, - - extern int ZEXPORT unzClose OF((unzFile file)); - /* -- Close a ZipFile opened with unzipOpen. -+ Close a ZipFile opened with unzOpen. - If there is files inside the .Zip opened with unzOpenCurrentFile (see later), -- these files MUST be closed with unzipCloseCurrentFile before call unzipClose. -+ these files MUST be closed with unzCloseCurrentFile before call unzClose. - return UNZ_OK if there is no problem. */ - - extern int ZEXPORT unzGetGlobalInfo OF((unzFile file, -diff --git a/zlib/contrib/minizip/zip.c b/zlib/contrib/minizip/zip.c -index 147934c..ea54853 100644 ---- a/zlib/contrib/minizip/zip.c -+++ b/zlib/contrib/minizip/zip.c -@@ -157,7 +157,7 @@ typedef struct - ZPOS64_T totalUncompressedData; - #ifndef NOCRYPT - unsigned long keys[3]; /* keys defining the pseudo-random sequence */ -- const unsigned long* pcrc_32_tab; -+ const z_crc_t* pcrc_32_tab; - int crypt_header_size; - #endif - } curfile64_info; -diff --git a/zlib/contrib/pascal/zlibpas.pas b/zlib/contrib/pascal/zlibpas.pas -index 7abd862..e6a0782 100644 ---- a/zlib/contrib/pascal/zlibpas.pas -+++ b/zlib/contrib/pascal/zlibpas.pas -@@ -10,8 +10,8 @@ unit zlibpas; - interface - - const -- ZLIB_VERSION = '1.2.7'; -- ZLIB_VERNUM = $1270; -+ ZLIB_VERSION = '1.2.8'; -+ ZLIB_VERNUM = $1280; - - type - alloc_func = function(opaque: Pointer; items, size: Integer): Pointer; -diff --git a/zlib/contrib/puff/puff.c b/zlib/contrib/puff/puff.c -index df8470c..ba58483 100644 ---- a/zlib/contrib/puff/puff.c -+++ b/zlib/contrib/puff/puff.c -@@ -1,8 +1,8 @@ - /* - * puff.c -- * Copyright (C) 2002-2010 Mark Adler -+ * Copyright (C) 2002-2013 Mark Adler - * For conditions of distribution and use, see copyright notice in puff.h -- * version 2.2, 25 Apr 2010 -+ * version 2.3, 21 Jan 2013 - * - * puff.c is a simple inflate written to be an unambiguous way to specify the - * deflate format. It is not written for speed but rather simplicity. As a -@@ -76,6 +76,7 @@ - * - Move NIL to puff.h - * - Allow incomplete code only if single code length is 1 - * - Add full code coverage test to Makefile -+ * 2.3 21 Jan 2013 - Check for invalid code length codes in dynamic blocks - */ - - #include <setjmp.h> /* for setjmp(), longjmp(), and jmp_buf */ -@@ -704,6 +705,8 @@ local int dynamic(struct state *s) - int len; /* last length to repeat */ - - symbol = decode(s, &lencode); -+ if (symbol < 0) -+ return symbol; /* invalid symbol */ - if (symbol < 16) /* length in 0..15 */ - lengths[index++] = symbol; - else { /* repeat instruction */ -diff --git a/zlib/contrib/puff/puff.h b/zlib/contrib/puff/puff.h -index 6a0080a..e23a245 100644 ---- a/zlib/contrib/puff/puff.h -+++ b/zlib/contrib/puff/puff.h -@@ -1,6 +1,6 @@ - /* puff.h -- Copyright (C) 2002-2010 Mark Adler, all rights reserved -- version 2.2, 25 Apr 2010 -+ Copyright (C) 2002-2013 Mark Adler, all rights reserved -+ version 2.3, 21 Jan 2013 - - This software is provided 'as-is', without any express or implied - warranty. In no event will the author be held liable for any damages -diff --git a/zlib/contrib/puff/pufftest.c b/zlib/contrib/puff/pufftest.c -index 76e35f6..7764814 100644 ---- a/zlib/contrib/puff/pufftest.c -+++ b/zlib/contrib/puff/pufftest.c -@@ -1,8 +1,8 @@ - /* - * pufftest.c -- * Copyright (C) 2002-2010 Mark Adler -+ * Copyright (C) 2002-2013 Mark Adler - * For conditions of distribution and use, see copyright notice in puff.h -- * version 2.2, 25 Apr 2010 -+ * version 2.3, 21 Jan 2013 - */ - - /* Example of how to use puff(). -diff --git a/zlib/contrib/testzlib/testzlib.c b/zlib/contrib/testzlib/testzlib.c -index 135888e..5f659de 100644 ---- a/zlib/contrib/testzlib/testzlib.c -+++ b/zlib/contrib/testzlib/testzlib.c -@@ -116,10 +116,10 @@ DWORD GetMsecSincePerfCounter(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPe - return dwRet;
- }
-
--int ReadFileMemory(const char* filename,long* plFileSize,void** pFilePtr)
-+int ReadFileMemory(const char* filename,long* plFileSize,unsigned char** pFilePtr)
- {
- FILE* stream;
-- void* ptr;
-+ unsigned char* ptr;
- int retVal=1;
- stream=fopen(filename, "rb");
- if (stream==NULL)
-diff --git a/zlib/contrib/vstudio/readme.txt b/zlib/contrib/vstudio/readme.txt -index 59c8b8b..bfdcd9d 100644 ---- a/zlib/contrib/vstudio/readme.txt -+++ b/zlib/contrib/vstudio/readme.txt -@@ -1,4 +1,4 @@ --Building instructions for the DLL versions of Zlib 1.2.7
-+Building instructions for the DLL versions of Zlib 1.2.8
- ========================================================
-
- This directory contains projects that build zlib and minizip using
-@@ -28,6 +28,11 @@ Build instructions for Visual Studio 2010 (32 bits or 64 bits) - - Uncompress current zlib, including all contrib/* files
- - Open contrib\vstudio\vc10\zlibvc.sln with Microsoft Visual C++ 2010
-
-+Build instructions for Visual Studio 2012 (32 bits or 64 bits)
-+--------------------------------------------------------------
-+- Uncompress current zlib, including all contrib/* files
-+- Open contrib\vstudio\vc11\zlibvc.sln with Microsoft Visual C++ 2012
-+
-
- Important
- ---------
-diff --git a/zlib/contrib/vstudio/vc10/miniunz.vcxproj.user b/zlib/contrib/vstudio/vc10/miniunz.vcxproj.user -deleted file mode 100644 -index 695b5c7..0000000 ---- a/zlib/contrib/vstudio/vc10/miniunz.vcxproj.user -+++ /dev/null -@@ -1,3 +0,0 @@ --<?xml version="1.0" encoding="utf-8"?>
--<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
--</Project> -\ No newline at end of file -diff --git a/zlib/contrib/vstudio/vc10/minizip.vcxproj.user b/zlib/contrib/vstudio/vc10/minizip.vcxproj.user -deleted file mode 100644 -index 695b5c7..0000000 ---- a/zlib/contrib/vstudio/vc10/minizip.vcxproj.user -+++ /dev/null -@@ -1,3 +0,0 @@ --<?xml version="1.0" encoding="utf-8"?>
--<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
--</Project> -\ No newline at end of file -diff --git a/zlib/contrib/vstudio/vc10/testzlib.vcxproj.user b/zlib/contrib/vstudio/vc10/testzlib.vcxproj.user -deleted file mode 100644 -index 695b5c7..0000000 ---- a/zlib/contrib/vstudio/vc10/testzlib.vcxproj.user -+++ /dev/null -@@ -1,3 +0,0 @@ --<?xml version="1.0" encoding="utf-8"?>
--<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
--</Project> -\ No newline at end of file -diff --git a/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.user b/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.user -deleted file mode 100644 -index 695b5c7..0000000 ---- a/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.user -+++ /dev/null -@@ -1,3 +0,0 @@ --<?xml version="1.0" encoding="utf-8"?>
--<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
--</Project> -\ No newline at end of file -diff --git a/zlib/contrib/vstudio/vc10/zlib.rc b/zlib/contrib/vstudio/vc10/zlib.rc -index 8eca4db..73f6476 100644 ---- a/zlib/contrib/vstudio/vc10/zlib.rc -+++ b/zlib/contrib/vstudio/vc10/zlib.rc -@@ -2,8 +2,8 @@ -
- #define IDR_VERSION1 1
- IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
-- FILEVERSION 1.2.7,0
-- PRODUCTVERSION 1.2.7,0
-+ FILEVERSION 1,2,8,0
-+ PRODUCTVERSION 1,2,8,0
- FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
- FILEFLAGS 0
- FILEOS VOS_DOS_WINDOWS32
-@@ -17,12 +17,12 @@ BEGIN -
- BEGIN
- VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
-- VALUE "FileVersion", "1.2.7\0"
-+ VALUE "FileVersion", "1.2.8\0"
- VALUE "InternalName", "zlib\0"
-- VALUE "OriginalFilename", "zlib.dll\0"
-+ VALUE "OriginalFilename", "zlibwapi.dll\0"
- VALUE "ProductName", "ZLib.DLL\0"
- VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
-- VALUE "LegalCopyright", "(C) 1995-2012 Jean-loup Gailly & Mark Adler\0"
-+ VALUE "LegalCopyright", "(C) 1995-2013 Jean-loup Gailly & Mark Adler\0"
- END
- END
- BLOCK "VarFileInfo"
-diff --git a/zlib/contrib/vstudio/vc10/zlibstat.vcxproj b/zlib/contrib/vstudio/vc10/zlibstat.vcxproj -index 2682fca..b9f2bbe 100644 ---- a/zlib/contrib/vstudio/vc10/zlibstat.vcxproj -+++ b/zlib/contrib/vstudio/vc10/zlibstat.vcxproj -@@ -182,6 +182,10 @@ - <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- </Lib>
-+ <PreBuildEvent>
-+ <Command>cd ..\..\masmx86
-+bld_ml32.bat</Command>
-+ </PreBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
-@@ -210,6 +214,10 @@ - <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- </Lib>
-+ <PreBuildEvent>
-+ <Command>cd ..\..\masmx86
-+bld_ml32.bat</Command>
-+ </PreBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
- <ClCompile>
-@@ -266,6 +274,10 @@ - <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- </Lib>
-+ <PreBuildEvent>
-+ <Command>cd ..\..\masmx64
-+bld_ml64.bat</Command>
-+ </PreBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
- <Midl>
-@@ -326,6 +338,10 @@ - <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- </Lib>
-+ <PreBuildEvent>
-+ <Command>cd ..\..\masmx64
-+bld_ml64.bat</Command>
-+ </PreBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
- <Midl>
-diff --git a/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.user b/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.user -deleted file mode 100644 -index 695b5c7..0000000 ---- a/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.user -+++ /dev/null -@@ -1,3 +0,0 @@ --<?xml version="1.0" encoding="utf-8"?>
--<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
--</Project> -\ No newline at end of file -diff --git a/zlib/contrib/vstudio/vc10/zlibvc.def b/zlib/contrib/vstudio/vc10/zlibvc.def -index 18ddf50..6367046 100644 ---- a/zlib/contrib/vstudio/vc10/zlibvc.def -+++ b/zlib/contrib/vstudio/vc10/zlibvc.def -@@ -1,7 +1,7 @@ - LIBRARY
- ; zlib data compression and ZIP file I/O library
-
--VERSION 1.2.7
-+VERSION 1.2.8
-
- EXPORTS
- adler32 @1
-@@ -134,6 +134,10 @@ EXPORTS - gzgetc_ @161
- inflateResetKeep @163
- deflateResetKeep @164
-- --; zlib1 v1.2.7 added: -- gzopen_w @165 -+
-+; zlib1 v1.2.7 added:
-+ gzopen_w @165
-+
-+; zlib1 v1.2.8 added:
-+ inflateGetDictionary @166
-+ gzvprintf @167
-diff --git a/zlib/contrib/vstudio/vc10/zlibvc.vcxproj b/zlib/contrib/vstudio/vc10/zlibvc.vcxproj -index 9218fdc..6ff9ddb 100644 ---- a/zlib/contrib/vstudio/vc10/zlibvc.vcxproj -+++ b/zlib/contrib/vstudio/vc10/zlibvc.vcxproj -@@ -180,10 +180,10 @@ - <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
-- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">zlibwapi</TargetName>
-+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">zlibwapid</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">zlibwapi</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">zlibwapi</TargetName>
-- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">zlibwapi</TargetName>
-+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">zlibwapid</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">zlibwapi</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">zlibwapi</TargetName>
- </PropertyGroup>
-@@ -220,18 +220,14 @@ - <Link>
- <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
- <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
-- <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
-- <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
- <GenerateMapFile>true</GenerateMapFile>
-- <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
-- <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
- </Link>
- <PreBuildEvent>
- <Command>cd ..\..\masmx86
-@@ -272,18 +268,14 @@ bld_ml32.bat</Command> - </ResourceCompile>
- <Link>
- <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
-- <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
- <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
-- <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
- <GenerateMapFile>true</GenerateMapFile>
-- <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
-- <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-@@ -321,18 +313,14 @@ bld_ml32.bat</Command> - <Link>
- <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
- <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
-- <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
- <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
-- <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
- <GenerateMapFile>true</GenerateMapFile>
-- <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
-- <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
- </Link>
- <PreBuildEvent>
- <Command>cd ..\..\masmx86
-@@ -371,19 +359,15 @@ bld_ml32.bat</Command> - </ResourceCompile>
- <Link>
- <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
-- <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
-- <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
- <GenerateMapFile>true</GenerateMapFile>
-- <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
- <SubSystem>Windows</SubSystem>
-- <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- <PreBuildEvent>
-- <Command>cd ..\..\contrib\masmx64
-+ <Command>cd ..\..\masmx64
- bld_ml64.bat</Command>
- </PreBuildEvent>
- </ItemDefinitionGroup>
-@@ -463,15 +447,11 @@ bld_ml64.bat</Command> - <Culture>0x040c</Culture>
- </ResourceCompile>
- <Link>
-- <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
- <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
-- <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
- <GenerateMapFile>true</GenerateMapFile>
-- <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
- <SubSystem>Windows</SubSystem>
-- <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
-@@ -554,15 +534,11 @@ bld_ml64.bat</Command> - </ResourceCompile>
- <Link>
- <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
-- <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
- <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
-- <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
- <GenerateMapFile>true</GenerateMapFile>
-- <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
- <SubSystem>Windows</SubSystem>
-- <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- <PreBuildEvent>
-diff --git a/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.user b/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.user -deleted file mode 100644 -index 695b5c7..0000000 ---- a/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.user -+++ /dev/null -@@ -1,3 +0,0 @@ --<?xml version="1.0" encoding="utf-8"?>
--<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
--</Project> -\ No newline at end of file -diff --git a/zlib/contrib/vstudio/vc11/miniunz.vcxproj b/zlib/contrib/vstudio/vc11/miniunz.vcxproj -new file mode 100644 -index 0000000..8f9f20b ---- /dev/null -+++ b/zlib/contrib/vstudio/vc11/miniunz.vcxproj -@@ -0,0 +1,314 @@ -+<?xml version="1.0" encoding="utf-8"?>
-+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-+ <ItemGroup Label="ProjectConfigurations">
-+ <ProjectConfiguration Include="Debug|Itanium">
-+ <Configuration>Debug</Configuration>
-+ <Platform>Itanium</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Debug|Win32">
-+ <Configuration>Debug</Configuration>
-+ <Platform>Win32</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Debug|x64">
-+ <Configuration>Debug</Configuration>
-+ <Platform>x64</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Release|Itanium">
-+ <Configuration>Release</Configuration>
-+ <Platform>Itanium</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Release|Win32">
-+ <Configuration>Release</Configuration>
-+ <Platform>Win32</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Release|x64">
-+ <Configuration>Release</Configuration>
-+ <Platform>x64</Platform>
-+ </ProjectConfiguration>
-+ </ItemGroup>
-+ <PropertyGroup Label="Globals">
-+ <ProjectGuid>{C52F9E7B-498A-42BE-8DB4-85A15694382A}</ProjectGuid>
-+ <Keyword>Win32Proj</Keyword>
-+ </PropertyGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <CharacterSet>Unicode</CharacterSet>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-+ <ImportGroup Label="ExtensionSettings">
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <PropertyGroup Label="UserMacros" />
-+ <PropertyGroup>
-+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniUnzip$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniUnzip$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniUnzip$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniUnzip$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\MiniUnzip$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\MiniUnzip$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\MiniUnzip$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\MiniUnzip$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\MiniUnzip$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\MiniUnzip$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\MiniUnzip$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\MiniUnzip$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</GenerateManifest>
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
-+ </PropertyGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-+ <ClCompile>
-+ <Optimization>Disabled</Optimization>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <MinimalRebuild>true</MinimalRebuild>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
-+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <ProgramDatabaseFile>$(OutDir)miniunz.pdb</ProgramDatabaseFile>
-+ <SubSystem>Console</SubSystem>
-+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
-+ <DataExecutionPrevention>
-+ </DataExecutionPrevention>
-+ <TargetMachine>MachineX86</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-+ <ClCompile>
-+ <Optimization>MaxSpeed</Optimization>
-+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-+ <OmitFramePointers>true</OmitFramePointers>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <StringPooling>true</StringPooling>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <FunctionLevelLinking>true</FunctionLevelLinking>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
-+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <SubSystem>Console</SubSystem>
-+ <OptimizeReferences>true</OptimizeReferences>
-+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
-+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
-+ <DataExecutionPrevention>
-+ </DataExecutionPrevention>
-+ <TargetMachine>MachineX86</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-+ <Midl>
-+ <TargetEnvironment>X64</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <Optimization>Disabled</Optimization>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <MinimalRebuild>true</MinimalRebuild>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
-+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <ProgramDatabaseFile>$(OutDir)miniunz.pdb</ProgramDatabaseFile>
-+ <SubSystem>Console</SubSystem>
-+ <TargetMachine>MachineX64</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
-+ <Midl>
-+ <TargetEnvironment>Itanium</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <Optimization>Disabled</Optimization>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <MinimalRebuild>true</MinimalRebuild>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
-+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <ProgramDatabaseFile>$(OutDir)miniunz.pdb</ProgramDatabaseFile>
-+ <SubSystem>Console</SubSystem>
-+ <TargetMachine>MachineIA64</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-+ <Midl>
-+ <TargetEnvironment>X64</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <Optimization>MaxSpeed</Optimization>
-+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-+ <OmitFramePointers>true</OmitFramePointers>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <StringPooling>true</StringPooling>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <FunctionLevelLinking>true</FunctionLevelLinking>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
-+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <SubSystem>Console</SubSystem>
-+ <OptimizeReferences>true</OptimizeReferences>
-+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
-+ <TargetMachine>MachineX64</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
-+ <Midl>
-+ <TargetEnvironment>Itanium</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <Optimization>MaxSpeed</Optimization>
-+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-+ <OmitFramePointers>true</OmitFramePointers>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <StringPooling>true</StringPooling>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <FunctionLevelLinking>true</FunctionLevelLinking>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
-+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <SubSystem>Console</SubSystem>
-+ <OptimizeReferences>true</OptimizeReferences>
-+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
-+ <TargetMachine>MachineIA64</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemGroup>
-+ <ClCompile Include="..\..\minizip\miniunz.c" />
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ProjectReference Include="zlibvc.vcxproj">
-+ <Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
-+ </ProjectReference>
-+ </ItemGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-+ <ImportGroup Label="ExtensionTargets">
-+ </ImportGroup>
-+</Project> -\ No newline at end of file -diff --git a/zlib/contrib/vstudio/vc11/minizip.vcxproj b/zlib/contrib/vstudio/vc11/minizip.vcxproj -new file mode 100644 -index 0000000..c93d9e6 ---- /dev/null -+++ b/zlib/contrib/vstudio/vc11/minizip.vcxproj -@@ -0,0 +1,311 @@ -+<?xml version="1.0" encoding="utf-8"?>
-+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-+ <ItemGroup Label="ProjectConfigurations">
-+ <ProjectConfiguration Include="Debug|Itanium">
-+ <Configuration>Debug</Configuration>
-+ <Platform>Itanium</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Debug|Win32">
-+ <Configuration>Debug</Configuration>
-+ <Platform>Win32</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Debug|x64">
-+ <Configuration>Debug</Configuration>
-+ <Platform>x64</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Release|Itanium">
-+ <Configuration>Release</Configuration>
-+ <Platform>Itanium</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Release|Win32">
-+ <Configuration>Release</Configuration>
-+ <Platform>Win32</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Release|x64">
-+ <Configuration>Release</Configuration>
-+ <Platform>x64</Platform>
-+ </ProjectConfiguration>
-+ </ItemGroup>
-+ <PropertyGroup Label="Globals">
-+ <ProjectGuid>{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}</ProjectGuid>
-+ <Keyword>Win32Proj</Keyword>
-+ </PropertyGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <CharacterSet>Unicode</CharacterSet>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-+ <ImportGroup Label="ExtensionSettings">
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <PropertyGroup Label="UserMacros" />
-+ <PropertyGroup>
-+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniZip$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniZip$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniZip$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniZip$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\$(Configuration)\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\$(Configuration)\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\$(Configuration)\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\$(Configuration)\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
-+ </PropertyGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-+ <ClCompile>
-+ <Optimization>Disabled</Optimization>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <MinimalRebuild>true</MinimalRebuild>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
-+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <ProgramDatabaseFile>$(OutDir)minizip.pdb</ProgramDatabaseFile>
-+ <SubSystem>Console</SubSystem>
-+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
-+ <DataExecutionPrevention>
-+ </DataExecutionPrevention>
-+ <TargetMachine>MachineX86</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-+ <ClCompile>
-+ <Optimization>MaxSpeed</Optimization>
-+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-+ <OmitFramePointers>true</OmitFramePointers>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <StringPooling>true</StringPooling>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <FunctionLevelLinking>true</FunctionLevelLinking>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
-+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <SubSystem>Console</SubSystem>
-+ <OptimizeReferences>true</OptimizeReferences>
-+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
-+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
-+ <DataExecutionPrevention>
-+ </DataExecutionPrevention>
-+ <TargetMachine>MachineX86</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-+ <Midl>
-+ <TargetEnvironment>X64</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <Optimization>Disabled</Optimization>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <MinimalRebuild>true</MinimalRebuild>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
-+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <ProgramDatabaseFile>$(OutDir)minizip.pdb</ProgramDatabaseFile>
-+ <SubSystem>Console</SubSystem>
-+ <TargetMachine>MachineX64</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
-+ <Midl>
-+ <TargetEnvironment>Itanium</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <Optimization>Disabled</Optimization>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <MinimalRebuild>true</MinimalRebuild>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
-+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <ProgramDatabaseFile>$(OutDir)minizip.pdb</ProgramDatabaseFile>
-+ <SubSystem>Console</SubSystem>
-+ <TargetMachine>MachineIA64</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-+ <Midl>
-+ <TargetEnvironment>X64</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <Optimization>MaxSpeed</Optimization>
-+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-+ <OmitFramePointers>true</OmitFramePointers>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <StringPooling>true</StringPooling>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <FunctionLevelLinking>true</FunctionLevelLinking>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
-+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <SubSystem>Console</SubSystem>
-+ <OptimizeReferences>true</OptimizeReferences>
-+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
-+ <TargetMachine>MachineX64</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
-+ <Midl>
-+ <TargetEnvironment>Itanium</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <Optimization>MaxSpeed</Optimization>
-+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-+ <OmitFramePointers>true</OmitFramePointers>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <StringPooling>true</StringPooling>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <FunctionLevelLinking>true</FunctionLevelLinking>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
-+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <SubSystem>Console</SubSystem>
-+ <OptimizeReferences>true</OptimizeReferences>
-+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
-+ <TargetMachine>MachineIA64</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemGroup>
-+ <ClCompile Include="..\..\minizip\minizip.c" />
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ProjectReference Include="zlibvc.vcxproj">
-+ <Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
-+ </ProjectReference>
-+ </ItemGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-+ <ImportGroup Label="ExtensionTargets">
-+ </ImportGroup>
-+</Project> -\ No newline at end of file -diff --git a/zlib/contrib/vstudio/vc11/testzlib.vcxproj b/zlib/contrib/vstudio/vc11/testzlib.vcxproj -new file mode 100644 -index 0000000..6d55954 ---- /dev/null -+++ b/zlib/contrib/vstudio/vc11/testzlib.vcxproj -@@ -0,0 +1,426 @@ -+<?xml version="1.0" encoding="utf-8"?>
-+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-+ <ItemGroup Label="ProjectConfigurations">
-+ <ProjectConfiguration Include="Debug|Itanium">
-+ <Configuration>Debug</Configuration>
-+ <Platform>Itanium</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Debug|Win32">
-+ <Configuration>Debug</Configuration>
-+ <Platform>Win32</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Debug|x64">
-+ <Configuration>Debug</Configuration>
-+ <Platform>x64</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="ReleaseWithoutAsm|Itanium">
-+ <Configuration>ReleaseWithoutAsm</Configuration>
-+ <Platform>Itanium</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="ReleaseWithoutAsm|Win32">
-+ <Configuration>ReleaseWithoutAsm</Configuration>
-+ <Platform>Win32</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="ReleaseWithoutAsm|x64">
-+ <Configuration>ReleaseWithoutAsm</Configuration>
-+ <Platform>x64</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Release|Itanium">
-+ <Configuration>Release</Configuration>
-+ <Platform>Itanium</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Release|Win32">
-+ <Configuration>Release</Configuration>
-+ <Platform>Win32</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Release|x64">
-+ <Configuration>Release</Configuration>
-+ <Platform>x64</Platform>
-+ </ProjectConfiguration>
-+ </ItemGroup>
-+ <PropertyGroup Label="Globals">
-+ <ProjectGuid>{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}</ProjectGuid>
-+ <RootNamespace>testzlib</RootNamespace>
-+ <Keyword>Win32Proj</Keyword>
-+ </PropertyGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ <WholeProgramOptimization>true</WholeProgramOptimization>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ <WholeProgramOptimization>true</WholeProgramOptimization>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <CharacterSet>Unicode</CharacterSet>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ <WholeProgramOptimization>true</WholeProgramOptimization>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ <WholeProgramOptimization>true</WholeProgramOptimization>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <WholeProgramOptimization>true</WholeProgramOptimization>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <WholeProgramOptimization>true</WholeProgramOptimization>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-+ <ImportGroup Label="ExtensionSettings">
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <PropertyGroup Label="UserMacros" />
-+ <PropertyGroup>
-+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlib$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlib$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\TestZlib$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\TestZlib$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlib$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlib$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlib$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlib$(Configuration)\Tmp\</IntDir>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\TestZlib$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\TestZlib$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\TestZlib$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\TestZlib$(Configuration)\Tmp\</IntDir>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\TestZlib$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\TestZlib$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">false</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlib$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlib$(Configuration)\Tmp\</IntDir>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\TestZlib$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\TestZlib$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</GenerateManifest>
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
-+ </PropertyGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-+ <ClCompile>
-+ <Optimization>Disabled</Optimization>
-+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <MinimalRebuild>true</MinimalRebuild>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
-+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
-+ <SubSystem>Console</SubSystem>
-+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
-+ <DataExecutionPrevention>
-+ </DataExecutionPrevention>
-+ <TargetMachine>MachineX86</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
-+ <ClCompile>
-+ <Optimization>MaxSpeed</Optimization>
-+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-+ <OmitFramePointers>true</OmitFramePointers>
-+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <StringPooling>true</StringPooling>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <FunctionLevelLinking>true</FunctionLevelLinking>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <SubSystem>Console</SubSystem>
-+ <OptimizeReferences>true</OptimizeReferences>
-+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
-+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
-+ <DataExecutionPrevention>
-+ </DataExecutionPrevention>
-+ <TargetMachine>MachineX86</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-+ <ClCompile>
-+ <Optimization>MaxSpeed</Optimization>
-+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-+ <OmitFramePointers>true</OmitFramePointers>
-+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <StringPooling>true</StringPooling>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <FunctionLevelLinking>true</FunctionLevelLinking>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
-+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <SubSystem>Console</SubSystem>
-+ <OptimizeReferences>true</OptimizeReferences>
-+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
-+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
-+ <DataExecutionPrevention>
-+ </DataExecutionPrevention>
-+ <TargetMachine>MachineX86</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-+ <ClCompile>
-+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
-+ <Midl>
-+ <TargetEnvironment>Itanium</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <Optimization>Disabled</Optimization>
-+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <MinimalRebuild>true</MinimalRebuild>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
-+ <SubSystem>Console</SubSystem>
-+ <TargetMachine>MachineIA64</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">
-+ <ClCompile>
-+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">
-+ <Midl>
-+ <TargetEnvironment>Itanium</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <Optimization>MaxSpeed</Optimization>
-+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-+ <OmitFramePointers>true</OmitFramePointers>
-+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <StringPooling>true</StringPooling>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <FunctionLevelLinking>true</FunctionLevelLinking>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <SubSystem>Console</SubSystem>
-+ <OptimizeReferences>true</OptimizeReferences>
-+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
-+ <TargetMachine>MachineIA64</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-+ <ClCompile>
-+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
-+ <Midl>
-+ <TargetEnvironment>Itanium</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <Optimization>MaxSpeed</Optimization>
-+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-+ <OmitFramePointers>true</OmitFramePointers>
-+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <StringPooling>true</StringPooling>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <FunctionLevelLinking>true</FunctionLevelLinking>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <SubSystem>Console</SubSystem>
-+ <OptimizeReferences>true</OptimizeReferences>
-+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
-+ <TargetMachine>MachineIA64</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemGroup>
-+ <ClCompile Include="..\..\..\adler32.c" />
-+ <ClCompile Include="..\..\..\compress.c" />
-+ <ClCompile Include="..\..\..\crc32.c" />
-+ <ClCompile Include="..\..\..\deflate.c" />
-+ <ClCompile Include="..\..\..\infback.c" />
-+ <ClCompile Include="..\..\masmx64\inffas8664.c">
-+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
-+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
-+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
-+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
-+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-+ </ClCompile>
-+ <ClCompile Include="..\..\..\inffast.c" />
-+ <ClCompile Include="..\..\..\inflate.c" />
-+ <ClCompile Include="..\..\..\inftrees.c" />
-+ <ClCompile Include="..\..\testzlib\testzlib.c" />
-+ <ClCompile Include="..\..\..\trees.c" />
-+ <ClCompile Include="..\..\..\uncompr.c" />
-+ <ClCompile Include="..\..\..\zutil.c" />
-+ </ItemGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-+ <ImportGroup Label="ExtensionTargets">
-+ </ImportGroup>
-+</Project> -\ No newline at end of file -diff --git a/zlib/contrib/vstudio/vc11/testzlibdll.vcxproj b/zlib/contrib/vstudio/vc11/testzlibdll.vcxproj -new file mode 100644 -index 0000000..9f20c78 ---- /dev/null -+++ b/zlib/contrib/vstudio/vc11/testzlibdll.vcxproj -@@ -0,0 +1,314 @@ -+<?xml version="1.0" encoding="utf-8"?>
-+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-+ <ItemGroup Label="ProjectConfigurations">
-+ <ProjectConfiguration Include="Debug|Itanium">
-+ <Configuration>Debug</Configuration>
-+ <Platform>Itanium</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Debug|Win32">
-+ <Configuration>Debug</Configuration>
-+ <Platform>Win32</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Debug|x64">
-+ <Configuration>Debug</Configuration>
-+ <Platform>x64</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Release|Itanium">
-+ <Configuration>Release</Configuration>
-+ <Platform>Itanium</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Release|Win32">
-+ <Configuration>Release</Configuration>
-+ <Platform>Win32</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Release|x64">
-+ <Configuration>Release</Configuration>
-+ <Platform>x64</Platform>
-+ </ProjectConfiguration>
-+ </ItemGroup>
-+ <PropertyGroup Label="Globals">
-+ <ProjectGuid>{C52F9E7B-498A-42BE-8DB4-85A15694366A}</ProjectGuid>
-+ <Keyword>Win32Proj</Keyword>
-+ </PropertyGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <CharacterSet>Unicode</CharacterSet>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-+ <ImportGroup Label="ExtensionSettings">
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <PropertyGroup Label="UserMacros" />
-+ <PropertyGroup>
-+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlibDll$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlibDll$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlibDll$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlibDll$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlibDll$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlibDll$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\TestZlibDll$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\TestZlibDll$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlibDll$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlibDll$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\TestZlibDll$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\TestZlibDll$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</GenerateManifest>
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
-+ </PropertyGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-+ <ClCompile>
-+ <Optimization>Disabled</Optimization>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <MinimalRebuild>true</MinimalRebuild>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
-+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
-+ <SubSystem>Console</SubSystem>
-+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
-+ <DataExecutionPrevention>
-+ </DataExecutionPrevention>
-+ <TargetMachine>MachineX86</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-+ <ClCompile>
-+ <Optimization>MaxSpeed</Optimization>
-+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-+ <OmitFramePointers>true</OmitFramePointers>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <StringPooling>true</StringPooling>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <FunctionLevelLinking>true</FunctionLevelLinking>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
-+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <SubSystem>Console</SubSystem>
-+ <OptimizeReferences>true</OptimizeReferences>
-+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
-+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
-+ <DataExecutionPrevention>
-+ </DataExecutionPrevention>
-+ <TargetMachine>MachineX86</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-+ <Midl>
-+ <TargetEnvironment>X64</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <Optimization>Disabled</Optimization>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <MinimalRebuild>true</MinimalRebuild>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
-+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
-+ <SubSystem>Console</SubSystem>
-+ <TargetMachine>MachineX64</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
-+ <Midl>
-+ <TargetEnvironment>Itanium</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <Optimization>Disabled</Optimization>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <MinimalRebuild>true</MinimalRebuild>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
-+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
-+ <SubSystem>Console</SubSystem>
-+ <TargetMachine>MachineIA64</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-+ <Midl>
-+ <TargetEnvironment>X64</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <Optimization>MaxSpeed</Optimization>
-+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-+ <OmitFramePointers>true</OmitFramePointers>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <StringPooling>true</StringPooling>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <FunctionLevelLinking>true</FunctionLevelLinking>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
-+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <SubSystem>Console</SubSystem>
-+ <OptimizeReferences>true</OptimizeReferences>
-+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
-+ <TargetMachine>MachineX64</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
-+ <Midl>
-+ <TargetEnvironment>Itanium</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <Optimization>MaxSpeed</Optimization>
-+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-+ <OmitFramePointers>true</OmitFramePointers>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <StringPooling>true</StringPooling>
-+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
-+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <FunctionLevelLinking>true</FunctionLevelLinking>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
-+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <SubSystem>Console</SubSystem>
-+ <OptimizeReferences>true</OptimizeReferences>
-+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
-+ <TargetMachine>MachineIA64</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemGroup>
-+ <ClCompile Include="..\..\testzlib\testzlib.c" />
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ProjectReference Include="zlibvc.vcxproj">
-+ <Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
-+ </ProjectReference>
-+ </ItemGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-+ <ImportGroup Label="ExtensionTargets">
-+ </ImportGroup>
-+</Project> -\ No newline at end of file -diff --git a/zlib/contrib/vstudio/vc11/zlib.rc b/zlib/contrib/vstudio/vc11/zlib.rc -new file mode 100644 -index 0000000..73f6476 ---- /dev/null -+++ b/zlib/contrib/vstudio/vc11/zlib.rc -@@ -0,0 +1,32 @@ -+#include <windows.h>
-+
-+#define IDR_VERSION1 1
-+IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
-+ FILEVERSION 1,2,8,0
-+ PRODUCTVERSION 1,2,8,0
-+ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
-+ FILEFLAGS 0
-+ FILEOS VOS_DOS_WINDOWS32
-+ FILETYPE VFT_DLL
-+ FILESUBTYPE 0 // not used
-+BEGIN
-+ BLOCK "StringFileInfo"
-+ BEGIN
-+ BLOCK "040904E4"
-+ //language ID = U.S. English, char set = Windows, Multilingual
-+
-+ BEGIN
-+ VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
-+ VALUE "FileVersion", "1.2.8\0"
-+ VALUE "InternalName", "zlib\0"
-+ VALUE "OriginalFilename", "zlibwapi.dll\0"
-+ VALUE "ProductName", "ZLib.DLL\0"
-+ VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
-+ VALUE "LegalCopyright", "(C) 1995-2013 Jean-loup Gailly & Mark Adler\0"
-+ END
-+ END
-+ BLOCK "VarFileInfo"
-+ BEGIN
-+ VALUE "Translation", 0x0409, 1252
-+ END
-+END
-diff --git a/zlib/contrib/vstudio/vc11/zlibstat.vcxproj b/zlib/contrib/vstudio/vc11/zlibstat.vcxproj -new file mode 100644 -index 0000000..806b76a ---- /dev/null -+++ b/zlib/contrib/vstudio/vc11/zlibstat.vcxproj -@@ -0,0 +1,464 @@ -+<?xml version="1.0" encoding="utf-8"?>
-+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-+ <ItemGroup Label="ProjectConfigurations">
-+ <ProjectConfiguration Include="Debug|Itanium">
-+ <Configuration>Debug</Configuration>
-+ <Platform>Itanium</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Debug|Win32">
-+ <Configuration>Debug</Configuration>
-+ <Platform>Win32</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Debug|x64">
-+ <Configuration>Debug</Configuration>
-+ <Platform>x64</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="ReleaseWithoutAsm|Itanium">
-+ <Configuration>ReleaseWithoutAsm</Configuration>
-+ <Platform>Itanium</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="ReleaseWithoutAsm|Win32">
-+ <Configuration>ReleaseWithoutAsm</Configuration>
-+ <Platform>Win32</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="ReleaseWithoutAsm|x64">
-+ <Configuration>ReleaseWithoutAsm</Configuration>
-+ <Platform>x64</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Release|Itanium">
-+ <Configuration>Release</Configuration>
-+ <Platform>Itanium</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Release|Win32">
-+ <Configuration>Release</Configuration>
-+ <Platform>Win32</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Release|x64">
-+ <Configuration>Release</Configuration>
-+ <Platform>x64</Platform>
-+ </ProjectConfiguration>
-+ </ItemGroup>
-+ <PropertyGroup Label="Globals">
-+ <ProjectGuid>{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}</ProjectGuid>
-+ </PropertyGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="Configuration">
-+ <ConfigurationType>StaticLibrary</ConfigurationType>
-+ <UseOfMfc>false</UseOfMfc>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-+ <ConfigurationType>StaticLibrary</ConfigurationType>
-+ <UseOfMfc>false</UseOfMfc>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-+ <ConfigurationType>StaticLibrary</ConfigurationType>
-+ <UseOfMfc>false</UseOfMfc>
-+ <PlatformToolset>v110</PlatformToolset>
-+ <CharacterSet>Unicode</CharacterSet>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="Configuration">
-+ <ConfigurationType>StaticLibrary</ConfigurationType>
-+ <UseOfMfc>false</UseOfMfc>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
-+ <ConfigurationType>StaticLibrary</ConfigurationType>
-+ <UseOfMfc>false</UseOfMfc>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
-+ <ConfigurationType>StaticLibrary</ConfigurationType>
-+ <UseOfMfc>false</UseOfMfc>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="Configuration">
-+ <ConfigurationType>StaticLibrary</ConfigurationType>
-+ <UseOfMfc>false</UseOfMfc>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-+ <ConfigurationType>StaticLibrary</ConfigurationType>
-+ <UseOfMfc>false</UseOfMfc>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-+ <ConfigurationType>StaticLibrary</ConfigurationType>
-+ <UseOfMfc>false</UseOfMfc>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-+ <ImportGroup Label="ExtensionSettings">
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <PropertyGroup Label="UserMacros" />
-+ <PropertyGroup>
-+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibStat$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibStat$(Configuration)\Tmp\</IntDir>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibStat$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibStat$(Configuration)\Tmp\</IntDir>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibStat$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibStat$(Configuration)\Tmp\</IntDir>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibStat$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibStat$(Configuration)\Tmp\</IntDir>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\ZlibStat$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\ZlibStat$(Configuration)\Tmp\</IntDir>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibStat$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibStat$(Configuration)\Tmp\</IntDir>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\ZlibStat$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\ZlibStat$(Configuration)\Tmp\</IntDir>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibStat$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibStat$(Configuration)\Tmp\</IntDir>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\ZlibStat$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\ZlibStat$(Configuration)\Tmp\</IntDir>
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
-+ </PropertyGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-+ <ClCompile>
-+ <Optimization>Disabled</Optimization>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <ExceptionHandling>
-+ </ExceptionHandling>
-+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <ObjectFileName>$(IntDir)</ObjectFileName>
-+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
-+ <WarningLevel>Level3</WarningLevel>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ <DebugInformationFormat>OldStyle</DebugInformationFormat>
-+ </ClCompile>
-+ <ResourceCompile>
-+ <Culture>0x040c</Culture>
-+ </ResourceCompile>
-+ <Lib>
-+ <AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
-+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ </Lib>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-+ <ClCompile>
-+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <StringPooling>true</StringPooling>
-+ <ExceptionHandling>
-+ </ExceptionHandling>
-+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <FunctionLevelLinking>true</FunctionLevelLinking>
-+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <ObjectFileName>$(IntDir)</ObjectFileName>
-+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
-+ <WarningLevel>Level3</WarningLevel>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ </ClCompile>
-+ <ResourceCompile>
-+ <Culture>0x040c</Culture>
-+ </ResourceCompile>
-+ <Lib>
-+ <AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
-+ <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
-+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ </Lib>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
-+ <ClCompile>
-+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <StringPooling>true</StringPooling>
-+ <ExceptionHandling>
-+ </ExceptionHandling>
-+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <FunctionLevelLinking>true</FunctionLevelLinking>
-+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <ObjectFileName>$(IntDir)</ObjectFileName>
-+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
-+ <WarningLevel>Level3</WarningLevel>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ </ClCompile>
-+ <ResourceCompile>
-+ <Culture>0x040c</Culture>
-+ </ResourceCompile>
-+ <Lib>
-+ <AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
-+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ </Lib>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-+ <Midl>
-+ <TargetEnvironment>X64</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <Optimization>Disabled</Optimization>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <ExceptionHandling>
-+ </ExceptionHandling>
-+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <ObjectFileName>$(IntDir)</ObjectFileName>
-+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
-+ <WarningLevel>Level3</WarningLevel>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ <DebugInformationFormat>OldStyle</DebugInformationFormat>
-+ </ClCompile>
-+ <ResourceCompile>
-+ <Culture>0x040c</Culture>
-+ </ResourceCompile>
-+ <Lib>
-+ <AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
-+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ </Lib>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
-+ <Midl>
-+ <TargetEnvironment>Itanium</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <Optimization>Disabled</Optimization>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <ExceptionHandling>
-+ </ExceptionHandling>
-+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <ObjectFileName>$(IntDir)</ObjectFileName>
-+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
-+ <WarningLevel>Level3</WarningLevel>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ <DebugInformationFormat>OldStyle</DebugInformationFormat>
-+ </ClCompile>
-+ <ResourceCompile>
-+ <Culture>0x040c</Culture>
-+ </ResourceCompile>
-+ <Lib>
-+ <AdditionalOptions>/MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
-+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ </Lib>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-+ <Midl>
-+ <TargetEnvironment>X64</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <StringPooling>true</StringPooling>
-+ <ExceptionHandling>
-+ </ExceptionHandling>
-+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <FunctionLevelLinking>true</FunctionLevelLinking>
-+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <ObjectFileName>$(IntDir)</ObjectFileName>
-+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
-+ <WarningLevel>Level3</WarningLevel>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ </ClCompile>
-+ <ResourceCompile>
-+ <Culture>0x040c</Culture>
-+ </ResourceCompile>
-+ <Lib>
-+ <AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
-+ <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
-+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ </Lib>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
-+ <Midl>
-+ <TargetEnvironment>Itanium</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <StringPooling>true</StringPooling>
-+ <ExceptionHandling>
-+ </ExceptionHandling>
-+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <FunctionLevelLinking>true</FunctionLevelLinking>
-+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <ObjectFileName>$(IntDir)</ObjectFileName>
-+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
-+ <WarningLevel>Level3</WarningLevel>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ </ClCompile>
-+ <ResourceCompile>
-+ <Culture>0x040c</Culture>
-+ </ResourceCompile>
-+ <Lib>
-+ <AdditionalOptions>/MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
-+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ </Lib>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">
-+ <Midl>
-+ <TargetEnvironment>X64</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <StringPooling>true</StringPooling>
-+ <ExceptionHandling>
-+ </ExceptionHandling>
-+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <FunctionLevelLinking>true</FunctionLevelLinking>
-+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <ObjectFileName>$(IntDir)</ObjectFileName>
-+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
-+ <WarningLevel>Level3</WarningLevel>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ </ClCompile>
-+ <ResourceCompile>
-+ <Culture>0x040c</Culture>
-+ </ResourceCompile>
-+ <Lib>
-+ <AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
-+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ </Lib>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">
-+ <Midl>
-+ <TargetEnvironment>Itanium</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <StringPooling>true</StringPooling>
-+ <ExceptionHandling>
-+ </ExceptionHandling>
-+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <FunctionLevelLinking>true</FunctionLevelLinking>
-+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <ObjectFileName>$(IntDir)</ObjectFileName>
-+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
-+ <WarningLevel>Level3</WarningLevel>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ </ClCompile>
-+ <ResourceCompile>
-+ <Culture>0x040c</Culture>
-+ </ResourceCompile>
-+ <Lib>
-+ <AdditionalOptions>/MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
-+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ </Lib>
-+ </ItemDefinitionGroup>
-+ <ItemGroup>
-+ <ClCompile Include="..\..\..\adler32.c" />
-+ <ClCompile Include="..\..\..\compress.c" />
-+ <ClCompile Include="..\..\..\crc32.c" />
-+ <ClCompile Include="..\..\..\deflate.c" />
-+ <ClCompile Include="..\..\..\gzclose.c" />
-+ <ClCompile Include="..\..\..\gzlib.c" />
-+ <ClCompile Include="..\..\..\gzread.c" />
-+ <ClCompile Include="..\..\..\gzwrite.c" />
-+ <ClCompile Include="..\..\..\infback.c" />
-+ <ClCompile Include="..\..\masmx64\inffas8664.c">
-+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
-+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
-+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
-+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
-+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-+ </ClCompile>
-+ <ClCompile Include="..\..\..\inffast.c" />
-+ <ClCompile Include="..\..\..\inflate.c" />
-+ <ClCompile Include="..\..\..\inftrees.c" />
-+ <ClCompile Include="..\..\minizip\ioapi.c" />
-+ <ClCompile Include="..\..\..\trees.c" />
-+ <ClCompile Include="..\..\..\uncompr.c" />
-+ <ClCompile Include="..\..\minizip\unzip.c" />
-+ <ClCompile Include="..\..\minizip\zip.c" />
-+ <ClCompile Include="..\..\..\zutil.c" />
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ResourceCompile Include="zlib.rc" />
-+ </ItemGroup>
-+ <ItemGroup>
-+ <None Include="zlibvc.def" />
-+ </ItemGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-+ <ImportGroup Label="ExtensionTargets">
-+ </ImportGroup>
-+</Project> -\ No newline at end of file -diff --git a/zlib/contrib/vstudio/vc11/zlibvc.def b/zlib/contrib/vstudio/vc11/zlibvc.def -new file mode 100644 -index 0000000..6367046 ---- /dev/null -+++ b/zlib/contrib/vstudio/vc11/zlibvc.def -@@ -0,0 +1,143 @@ -+LIBRARY
-+; zlib data compression and ZIP file I/O library
-+
-+VERSION 1.2.8
-+
-+EXPORTS
-+ adler32 @1
-+ compress @2
-+ crc32 @3
-+ deflate @4
-+ deflateCopy @5
-+ deflateEnd @6
-+ deflateInit2_ @7
-+ deflateInit_ @8
-+ deflateParams @9
-+ deflateReset @10
-+ deflateSetDictionary @11
-+ gzclose @12
-+ gzdopen @13
-+ gzerror @14
-+ gzflush @15
-+ gzopen @16
-+ gzread @17
-+ gzwrite @18
-+ inflate @19
-+ inflateEnd @20
-+ inflateInit2_ @21
-+ inflateInit_ @22
-+ inflateReset @23
-+ inflateSetDictionary @24
-+ inflateSync @25
-+ uncompress @26
-+ zlibVersion @27
-+ gzprintf @28
-+ gzputc @29
-+ gzgetc @30
-+ gzseek @31
-+ gzrewind @32
-+ gztell @33
-+ gzeof @34
-+ gzsetparams @35
-+ zError @36
-+ inflateSyncPoint @37
-+ get_crc_table @38
-+ compress2 @39
-+ gzputs @40
-+ gzgets @41
-+ inflateCopy @42
-+ inflateBackInit_ @43
-+ inflateBack @44
-+ inflateBackEnd @45
-+ compressBound @46
-+ deflateBound @47
-+ gzclearerr @48
-+ gzungetc @49
-+ zlibCompileFlags @50
-+ deflatePrime @51
-+ deflatePending @52
-+
-+ unzOpen @61
-+ unzClose @62
-+ unzGetGlobalInfo @63
-+ unzGetCurrentFileInfo @64
-+ unzGoToFirstFile @65
-+ unzGoToNextFile @66
-+ unzOpenCurrentFile @67
-+ unzReadCurrentFile @68
-+ unzOpenCurrentFile3 @69
-+ unztell @70
-+ unzeof @71
-+ unzCloseCurrentFile @72
-+ unzGetGlobalComment @73
-+ unzStringFileNameCompare @74
-+ unzLocateFile @75
-+ unzGetLocalExtrafield @76
-+ unzOpen2 @77
-+ unzOpenCurrentFile2 @78
-+ unzOpenCurrentFilePassword @79
-+
-+ zipOpen @80
-+ zipOpenNewFileInZip @81
-+ zipWriteInFileInZip @82
-+ zipCloseFileInZip @83
-+ zipClose @84
-+ zipOpenNewFileInZip2 @86
-+ zipCloseFileInZipRaw @87
-+ zipOpen2 @88
-+ zipOpenNewFileInZip3 @89
-+
-+ unzGetFilePos @100
-+ unzGoToFilePos @101
-+
-+ fill_win32_filefunc @110
-+
-+; zlibwapi v1.2.4 added:
-+ fill_win32_filefunc64 @111
-+ fill_win32_filefunc64A @112
-+ fill_win32_filefunc64W @113
-+
-+ unzOpen64 @120
-+ unzOpen2_64 @121
-+ unzGetGlobalInfo64 @122
-+ unzGetCurrentFileInfo64 @124
-+ unzGetCurrentFileZStreamPos64 @125
-+ unztell64 @126
-+ unzGetFilePos64 @127
-+ unzGoToFilePos64 @128
-+
-+ zipOpen64 @130
-+ zipOpen2_64 @131
-+ zipOpenNewFileInZip64 @132
-+ zipOpenNewFileInZip2_64 @133
-+ zipOpenNewFileInZip3_64 @134
-+ zipOpenNewFileInZip4_64 @135
-+ zipCloseFileInZipRaw64 @136
-+
-+; zlib1 v1.2.4 added:
-+ adler32_combine @140
-+ crc32_combine @142
-+ deflateSetHeader @144
-+ deflateTune @145
-+ gzbuffer @146
-+ gzclose_r @147
-+ gzclose_w @148
-+ gzdirect @149
-+ gzoffset @150
-+ inflateGetHeader @156
-+ inflateMark @157
-+ inflatePrime @158
-+ inflateReset2 @159
-+ inflateUndermine @160
-+
-+; zlib1 v1.2.6 added:
-+ gzgetc_ @161
-+ inflateResetKeep @163
-+ deflateResetKeep @164
-+
-+; zlib1 v1.2.7 added:
-+ gzopen_w @165
-+
-+; zlib1 v1.2.8 added:
-+ inflateGetDictionary @166
-+ gzvprintf @167
-diff --git a/zlib/contrib/vstudio/vc11/zlibvc.sln b/zlib/contrib/vstudio/vc11/zlibvc.sln -new file mode 100644 -index 0000000..9fcbafd ---- /dev/null -+++ b/zlib/contrib/vstudio/vc11/zlibvc.sln -@@ -0,0 +1,117 @@ -+
-+Microsoft Visual Studio Solution File, Format Version 12.00
-+# Visual Studio 2012
-+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}"
-+EndProject
-+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}"
-+EndProject
-+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcxproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}"
-+EndProject
-+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlibdll", "testzlibdll.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}"
-+EndProject
-+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcxproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}"
-+EndProject
-+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}"
-+EndProject
-+Global
-+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
-+ Debug|Itanium = Debug|Itanium
-+ Debug|Win32 = Debug|Win32
-+ Debug|x64 = Debug|x64
-+ Release|Itanium = Release|Itanium
-+ Release|Win32 = Release|Win32
-+ Release|x64 = Release|x64
-+ ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium
-+ ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32
-+ ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64
-+ EndGlobalSection
-+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
-+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Win32
-+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32
-+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32
-+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64
-+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64
-+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Win32
-+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32
-+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32
-+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64
-+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64
-+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32
-+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32
-+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32
-+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64
-+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64
-+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Win32
-+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32
-+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32
-+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64
-+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64
-+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Win32
-+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32
-+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32
-+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64
-+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64
-+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32
-+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32
-+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32
-+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64
-+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64
-+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32
-+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32
-+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32
-+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64
-+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64
-+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32
-+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32
-+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32
-+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64
-+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64
-+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32
-+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32
-+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32
-+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64
-+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64
-+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Win32
-+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32
-+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32
-+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64
-+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64
-+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Win32
-+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32
-+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32
-+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64
-+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64
-+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32
-+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32
-+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64
-+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32
-+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32
-+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32
-+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64
-+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64
-+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32
-+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32
-+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32
-+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64
-+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64
-+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32
-+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32
-+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64
-+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Win32
-+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32
-+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32
-+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64
-+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64
-+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Win32
-+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32
-+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32
-+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64
-+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64
-+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32
-+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32
-+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64
-+ EndGlobalSection
-+ GlobalSection(SolutionProperties) = preSolution
-+ HideSolutionNode = FALSE
-+ EndGlobalSection
-+EndGlobal
-diff --git a/zlib/contrib/vstudio/vc11/zlibvc.vcxproj b/zlib/contrib/vstudio/vc11/zlibvc.vcxproj -new file mode 100644 -index 0000000..c65b95f ---- /dev/null -+++ b/zlib/contrib/vstudio/vc11/zlibvc.vcxproj -@@ -0,0 +1,688 @@ -+<?xml version="1.0" encoding="utf-8"?>
-+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-+ <ItemGroup Label="ProjectConfigurations">
-+ <ProjectConfiguration Include="Debug|Itanium">
-+ <Configuration>Debug</Configuration>
-+ <Platform>Itanium</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Debug|Win32">
-+ <Configuration>Debug</Configuration>
-+ <Platform>Win32</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Debug|x64">
-+ <Configuration>Debug</Configuration>
-+ <Platform>x64</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="ReleaseWithoutAsm|Itanium">
-+ <Configuration>ReleaseWithoutAsm</Configuration>
-+ <Platform>Itanium</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="ReleaseWithoutAsm|Win32">
-+ <Configuration>ReleaseWithoutAsm</Configuration>
-+ <Platform>Win32</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="ReleaseWithoutAsm|x64">
-+ <Configuration>ReleaseWithoutAsm</Configuration>
-+ <Platform>x64</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Release|Itanium">
-+ <Configuration>Release</Configuration>
-+ <Platform>Itanium</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Release|Win32">
-+ <Configuration>Release</Configuration>
-+ <Platform>Win32</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Release|x64">
-+ <Configuration>Release</Configuration>
-+ <Platform>x64</Platform>
-+ </ProjectConfiguration>
-+ </ItemGroup>
-+ <PropertyGroup Label="Globals">
-+ <ProjectGuid>{8FD826F8-3739-44E6-8CC8-997122E53B8D}</ProjectGuid>
-+ </PropertyGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-+ <ConfigurationType>DynamicLibrary</ConfigurationType>
-+ <UseOfMfc>false</UseOfMfc>
-+ <WholeProgramOptimization>true</WholeProgramOptimization>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="Configuration">
-+ <ConfigurationType>DynamicLibrary</ConfigurationType>
-+ <UseOfMfc>false</UseOfMfc>
-+ <WholeProgramOptimization>true</WholeProgramOptimization>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-+ <ConfigurationType>DynamicLibrary</ConfigurationType>
-+ <UseOfMfc>false</UseOfMfc>
-+ <PlatformToolset>v110</PlatformToolset>
-+ <CharacterSet>Unicode</CharacterSet>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
-+ <ConfigurationType>DynamicLibrary</ConfigurationType>
-+ <UseOfMfc>false</UseOfMfc>
-+ <WholeProgramOptimization>true</WholeProgramOptimization>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="Configuration">
-+ <ConfigurationType>DynamicLibrary</ConfigurationType>
-+ <UseOfMfc>false</UseOfMfc>
-+ <WholeProgramOptimization>true</WholeProgramOptimization>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
-+ <ConfigurationType>DynamicLibrary</ConfigurationType>
-+ <UseOfMfc>false</UseOfMfc>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-+ <ConfigurationType>DynamicLibrary</ConfigurationType>
-+ <UseOfMfc>false</UseOfMfc>
-+ <WholeProgramOptimization>true</WholeProgramOptimization>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="Configuration">
-+ <ConfigurationType>DynamicLibrary</ConfigurationType>
-+ <UseOfMfc>false</UseOfMfc>
-+ <WholeProgramOptimization>true</WholeProgramOptimization>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-+ <ConfigurationType>DynamicLibrary</ConfigurationType>
-+ <UseOfMfc>false</UseOfMfc>
-+ <PlatformToolset>v110</PlatformToolset>
-+ </PropertyGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-+ <ImportGroup Label="ExtensionSettings">
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <PropertyGroup Label="UserMacros" />
-+ <PropertyGroup>
-+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibDll$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibDll$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibDll$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibDll$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibDll$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibDll$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibDll$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibDll$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\ZlibDll$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\ZlibDll$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibDll$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibDll$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">false</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\ZlibDll$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\ZlibDll$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">false</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibDll$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibDll$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
-+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\ZlibDll$(Configuration)\</OutDir>
-+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\ZlibDll$(Configuration)\Tmp\</IntDir>
-+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
-+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</GenerateManifest>
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
-+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
-+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
-+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
-+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">zlibwapi</TargetName>
-+ <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">zlibwapi</TargetName>
-+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">zlibwapi</TargetName>
-+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">zlibwapi</TargetName>
-+ <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">zlibwapi</TargetName>
-+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">zlibwapi</TargetName>
-+ </PropertyGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-+ <Midl>
-+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <MkTypLibCompatible>true</MkTypLibCompatible>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ <TargetEnvironment>Win32</TargetEnvironment>
-+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
-+ </Midl>
-+ <ClCompile>
-+ <Optimization>Disabled</Optimization>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <ExceptionHandling>
-+ </ExceptionHandling>
-+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <ObjectFileName>$(IntDir)</ObjectFileName>
-+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
-+ <BrowseInformation>
-+ </BrowseInformation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <ResourceCompile>
-+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <Culture>0x040c</Culture>
-+ </ResourceCompile>
-+ <Link>
-+ <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
-+ <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
-+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
-+ <GenerateMapFile>true</GenerateMapFile>
-+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
-+ <SubSystem>Windows</SubSystem>
-+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
-+ <DataExecutionPrevention>
-+ </DataExecutionPrevention>
-+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
-+ </Link>
-+ <PreBuildEvent>
-+ <Command>cd ..\..\masmx86
-+bld_ml32.bat</Command>
-+ </PreBuildEvent>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
-+ <Midl>
-+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <MkTypLibCompatible>true</MkTypLibCompatible>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ <TargetEnvironment>Win32</TargetEnvironment>
-+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
-+ </Midl>
-+ <ClCompile>
-+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <StringPooling>true</StringPooling>
-+ <ExceptionHandling>
-+ </ExceptionHandling>
-+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <FunctionLevelLinking>true</FunctionLevelLinking>
-+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
-+ <AssemblerOutput>All</AssemblerOutput>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <ObjectFileName>$(IntDir)</ObjectFileName>
-+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
-+ <BrowseInformation>
-+ </BrowseInformation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ </ClCompile>
-+ <ResourceCompile>
-+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <Culture>0x040c</Culture>
-+ </ResourceCompile>
-+ <Link>
-+ <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
-+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
-+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
-+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
-+ <GenerateMapFile>true</GenerateMapFile>
-+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
-+ <SubSystem>Windows</SubSystem>
-+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
-+ <DataExecutionPrevention>
-+ </DataExecutionPrevention>
-+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-+ <Midl>
-+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <MkTypLibCompatible>true</MkTypLibCompatible>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ <TargetEnvironment>Win32</TargetEnvironment>
-+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
-+ </Midl>
-+ <ClCompile>
-+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <StringPooling>true</StringPooling>
-+ <ExceptionHandling>
-+ </ExceptionHandling>
-+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <FunctionLevelLinking>true</FunctionLevelLinking>
-+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
-+ <AssemblerOutput>All</AssemblerOutput>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <ObjectFileName>$(IntDir)</ObjectFileName>
-+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
-+ <BrowseInformation>
-+ </BrowseInformation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ </ClCompile>
-+ <ResourceCompile>
-+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <Culture>0x040c</Culture>
-+ </ResourceCompile>
-+ <Link>
-+ <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
-+ <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
-+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
-+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
-+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
-+ <GenerateMapFile>true</GenerateMapFile>
-+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
-+ <SubSystem>Windows</SubSystem>
-+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
-+ <DataExecutionPrevention>
-+ </DataExecutionPrevention>
-+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
-+ </Link>
-+ <PreBuildEvent>
-+ <Command>cd ..\..\masmx86
-+bld_ml32.bat</Command>
-+ </PreBuildEvent>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-+ <Midl>
-+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <MkTypLibCompatible>true</MkTypLibCompatible>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ <TargetEnvironment>X64</TargetEnvironment>
-+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
-+ </Midl>
-+ <ClCompile>
-+ <Optimization>Disabled</Optimization>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <ExceptionHandling>
-+ </ExceptionHandling>
-+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <ObjectFileName>$(IntDir)</ObjectFileName>
-+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
-+ <BrowseInformation>
-+ </BrowseInformation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <ResourceCompile>
-+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <Culture>0x040c</Culture>
-+ </ResourceCompile>
-+ <Link>
-+ <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
-+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
-+ <GenerateMapFile>true</GenerateMapFile>
-+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
-+ <SubSystem>Windows</SubSystem>
-+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
-+ <TargetMachine>MachineX64</TargetMachine>
-+ </Link>
-+ <PreBuildEvent>
-+ <Command>cd ..\..\contrib\masmx64
-+bld_ml64.bat</Command>
-+ </PreBuildEvent>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
-+ <Midl>
-+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <MkTypLibCompatible>true</MkTypLibCompatible>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ <TargetEnvironment>Itanium</TargetEnvironment>
-+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
-+ </Midl>
-+ <ClCompile>
-+ <Optimization>Disabled</Optimization>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <ExceptionHandling>
-+ </ExceptionHandling>
-+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <ObjectFileName>$(IntDir)</ObjectFileName>
-+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
-+ <BrowseInformation>
-+ </BrowseInformation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <ResourceCompile>
-+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <Culture>0x040c</Culture>
-+ </ResourceCompile>
-+ <Link>
-+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
-+ <GenerateMapFile>true</GenerateMapFile>
-+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
-+ <SubSystem>Windows</SubSystem>
-+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
-+ <TargetMachine>MachineIA64</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">
-+ <Midl>
-+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <MkTypLibCompatible>true</MkTypLibCompatible>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ <TargetEnvironment>X64</TargetEnvironment>
-+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
-+ </Midl>
-+ <ClCompile>
-+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <StringPooling>true</StringPooling>
-+ <ExceptionHandling>
-+ </ExceptionHandling>
-+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <FunctionLevelLinking>true</FunctionLevelLinking>
-+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
-+ <AssemblerOutput>All</AssemblerOutput>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <ObjectFileName>$(IntDir)</ObjectFileName>
-+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
-+ <BrowseInformation>
-+ </BrowseInformation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ </ClCompile>
-+ <ResourceCompile>
-+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <Culture>0x040c</Culture>
-+ </ResourceCompile>
-+ <Link>
-+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
-+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
-+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
-+ <GenerateMapFile>true</GenerateMapFile>
-+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
-+ <SubSystem>Windows</SubSystem>
-+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
-+ <TargetMachine>MachineX64</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">
-+ <Midl>
-+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <MkTypLibCompatible>true</MkTypLibCompatible>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ <TargetEnvironment>Itanium</TargetEnvironment>
-+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
-+ </Midl>
-+ <ClCompile>
-+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <StringPooling>true</StringPooling>
-+ <ExceptionHandling>
-+ </ExceptionHandling>
-+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <FunctionLevelLinking>true</FunctionLevelLinking>
-+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
-+ <AssemblerOutput>All</AssemblerOutput>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <ObjectFileName>$(IntDir)</ObjectFileName>
-+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
-+ <BrowseInformation>
-+ </BrowseInformation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ </ClCompile>
-+ <ResourceCompile>
-+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <Culture>0x040c</Culture>
-+ </ResourceCompile>
-+ <Link>
-+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
-+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
-+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
-+ <GenerateMapFile>true</GenerateMapFile>
-+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
-+ <SubSystem>Windows</SubSystem>
-+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
-+ <TargetMachine>MachineIA64</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-+ <Midl>
-+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <MkTypLibCompatible>true</MkTypLibCompatible>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ <TargetEnvironment>X64</TargetEnvironment>
-+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
-+ </Midl>
-+ <ClCompile>
-+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <StringPooling>true</StringPooling>
-+ <ExceptionHandling>
-+ </ExceptionHandling>
-+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <FunctionLevelLinking>true</FunctionLevelLinking>
-+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
-+ <AssemblerOutput>All</AssemblerOutput>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <ObjectFileName>$(IntDir)</ObjectFileName>
-+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
-+ <BrowseInformation>
-+ </BrowseInformation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ </ClCompile>
-+ <ResourceCompile>
-+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <Culture>0x040c</Culture>
-+ </ResourceCompile>
-+ <Link>
-+ <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
-+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
-+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
-+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
-+ <GenerateMapFile>true</GenerateMapFile>
-+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
-+ <SubSystem>Windows</SubSystem>
-+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
-+ <TargetMachine>MachineX64</TargetMachine>
-+ </Link>
-+ <PreBuildEvent>
-+ <Command>cd ..\..\masmx64
-+bld_ml64.bat</Command>
-+ </PreBuildEvent>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
-+ <Midl>
-+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <MkTypLibCompatible>true</MkTypLibCompatible>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ <TargetEnvironment>Itanium</TargetEnvironment>
-+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
-+ </Midl>
-+ <ClCompile>
-+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-+ <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <StringPooling>true</StringPooling>
-+ <ExceptionHandling>
-+ </ExceptionHandling>
-+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-+ <BufferSecurityCheck>false</BufferSecurityCheck>
-+ <FunctionLevelLinking>true</FunctionLevelLinking>
-+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
-+ <AssemblerOutput>All</AssemblerOutput>
-+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
-+ <ObjectFileName>$(IntDir)</ObjectFileName>
-+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
-+ <BrowseInformation>
-+ </BrowseInformation>
-+ <WarningLevel>Level3</WarningLevel>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ </ClCompile>
-+ <ResourceCompile>
-+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <Culture>0x040c</Culture>
-+ </ResourceCompile>
-+ <Link>
-+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
-+ <SuppressStartupBanner>true</SuppressStartupBanner>
-+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
-+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
-+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
-+ <GenerateMapFile>true</GenerateMapFile>
-+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
-+ <SubSystem>Windows</SubSystem>
-+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
-+ <TargetMachine>MachineIA64</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemGroup>
-+ <ClCompile Include="..\..\..\adler32.c" />
-+ <ClCompile Include="..\..\..\compress.c" />
-+ <ClCompile Include="..\..\..\crc32.c" />
-+ <ClCompile Include="..\..\..\deflate.c" />
-+ <ClCompile Include="..\..\..\gzclose.c" />
-+ <ClCompile Include="..\..\..\gzlib.c" />
-+ <ClCompile Include="..\..\..\gzread.c" />
-+ <ClCompile Include="..\..\..\gzwrite.c" />
-+ <ClCompile Include="..\..\..\infback.c" />
-+ <ClCompile Include="..\..\masmx64\inffas8664.c">
-+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
-+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
-+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
-+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
-+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-+ </ClCompile>
-+ <ClCompile Include="..\..\..\inffast.c" />
-+ <ClCompile Include="..\..\..\inflate.c" />
-+ <ClCompile Include="..\..\..\inftrees.c" />
-+ <ClCompile Include="..\..\minizip\ioapi.c" />
-+ <ClCompile Include="..\..\minizip\iowin32.c" />
-+ <ClCompile Include="..\..\..\trees.c" />
-+ <ClCompile Include="..\..\..\uncompr.c" />
-+ <ClCompile Include="..\..\minizip\unzip.c">
-+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ </ClCompile>
-+ <ClCompile Include="..\..\minizip\zip.c">
-+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ </ClCompile>
-+ <ClCompile Include="..\..\..\zutil.c" />
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ResourceCompile Include="zlib.rc" />
-+ </ItemGroup>
-+ <ItemGroup>
-+ <None Include="zlibvc.def" />
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ClInclude Include="..\..\..\deflate.h" />
-+ <ClInclude Include="..\..\..\infblock.h" />
-+ <ClInclude Include="..\..\..\infcodes.h" />
-+ <ClInclude Include="..\..\..\inffast.h" />
-+ <ClInclude Include="..\..\..\inftrees.h" />
-+ <ClInclude Include="..\..\..\infutil.h" />
-+ <ClInclude Include="..\..\..\zconf.h" />
-+ <ClInclude Include="..\..\..\zlib.h" />
-+ <ClInclude Include="..\..\..\zutil.h" />
-+ </ItemGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-+ <ImportGroup Label="ExtensionTargets">
-+ </ImportGroup>
-+</Project> -\ No newline at end of file -diff --git a/zlib/contrib/vstudio/vc9/zlib.rc b/zlib/contrib/vstudio/vc9/zlib.rc -index 8eca4db..73f6476 100644 ---- a/zlib/contrib/vstudio/vc9/zlib.rc -+++ b/zlib/contrib/vstudio/vc9/zlib.rc -@@ -2,8 +2,8 @@ -
- #define IDR_VERSION1 1
- IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
-- FILEVERSION 1.2.7,0
-- PRODUCTVERSION 1.2.7,0
-+ FILEVERSION 1,2,8,0
-+ PRODUCTVERSION 1,2,8,0
- FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
- FILEFLAGS 0
- FILEOS VOS_DOS_WINDOWS32
-@@ -17,12 +17,12 @@ BEGIN -
- BEGIN
- VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
-- VALUE "FileVersion", "1.2.7\0"
-+ VALUE "FileVersion", "1.2.8\0"
- VALUE "InternalName", "zlib\0"
-- VALUE "OriginalFilename", "zlib.dll\0"
-+ VALUE "OriginalFilename", "zlibwapi.dll\0"
- VALUE "ProductName", "ZLib.DLL\0"
- VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
-- VALUE "LegalCopyright", "(C) 1995-2012 Jean-loup Gailly & Mark Adler\0"
-+ VALUE "LegalCopyright", "(C) 1995-2013 Jean-loup Gailly & Mark Adler\0"
- END
- END
- BLOCK "VarFileInfo"
-diff --git a/zlib/contrib/vstudio/vc9/zlibvc.def b/zlib/contrib/vstudio/vc9/zlibvc.def -index 2df8bb3..6367046 100644 ---- a/zlib/contrib/vstudio/vc9/zlibvc.def -+++ b/zlib/contrib/vstudio/vc9/zlibvc.def -@@ -1,7 +1,7 @@ - LIBRARY
- ; zlib data compression and ZIP file I/O library
-
--VERSION 1.2.7
-+VERSION 1.2.8
-
- EXPORTS
- adler32 @1
-@@ -133,7 +133,11 @@ EXPORTS - ; zlib1 v1.2.6 added:
- gzgetc_ @161
- inflateResetKeep @163
-- deflateResetKeep @164 -- --; zlib1 v1.2.7 added: -- gzopen_w @165 -+ deflateResetKeep @164
-+
-+; zlib1 v1.2.7 added:
-+ gzopen_w @165
-+
-+; zlib1 v1.2.8 added:
-+ inflateGetDictionary @166
-+ gzvprintf @167
-diff --git a/zlib/deflate.c b/zlib/deflate.c -index 99184ff..03e76ab 100644 ---- a/zlib/deflate.c -+++ b/zlib/deflate.c -@@ -1,5 +1,5 @@ - /* deflate.c -- compress data using the deflation algorithm -- * Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler -+ * Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -@@ -52,7 +52,7 @@ - #include "deflate.h" - - const char deflate_copyright[] = -- " deflate 1.2.7 Copyright 1995-2012 Jean-loup Gailly and Mark Adler "; -+ " deflate 1.2.8 Copyright 1995-2013 Jean-loup Gailly and Mark Adler "; - /* - If you use the zlib library in a product, an acknowledgment is welcome - in the documentation of your product. If for some reason you cannot -@@ -305,7 +305,7 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, - if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL || - s->pending_buf == Z_NULL) { - s->status = FINISH_STATE; -- strm->msg = (char*)ERR_MSG(Z_MEM_ERROR); -+ strm->msg = ERR_MSG(Z_MEM_ERROR); - deflateEnd (strm); - return Z_MEM_ERROR; - } -@@ -329,7 +329,7 @@ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) - uInt str, n; - int wrap; - unsigned avail; -- unsigned char *next; -+ z_const unsigned char *next; - - if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL) - return Z_STREAM_ERROR; -@@ -359,7 +359,7 @@ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) - avail = strm->avail_in; - next = strm->next_in; - strm->avail_in = dictLength; -- strm->next_in = (Bytef *)dictionary; -+ strm->next_in = (z_const Bytef *)dictionary; - fill_window(s); - while (s->lookahead >= MIN_MATCH) { - str = s->strstart; -@@ -513,6 +513,8 @@ int ZEXPORT deflateParams(strm, level, strategy) - strm->total_in != 0) { - /* Flush the last buffer: */ - err = deflate(strm, Z_BLOCK); -+ if (err == Z_BUF_ERROR && s->pending == 0) -+ err = Z_OK; - } - if (s->level != level) { - s->level = level; -diff --git a/zlib/deflate.h b/zlib/deflate.h -index da72661..1eba665 100644 ---- a/zlib/deflate.h -+++ b/zlib/deflate.h -@@ -104,7 +104,7 @@ typedef struct internal_state { - int wrap; /* bit 0 true for zlib, bit 1 true for gzip */ - gz_headerp gzhead; /* gzip header information to write */ - uInt gzindex; /* where in extra, name, or comment */ -- Byte method; /* STORED (for zip only) or DEFLATED */ -+ Byte method; /* can only be DEFLATED */ - int last_flush; /* value of flush param for previous deflate call */ - - /* used by deflate.c: */ -diff --git a/zlib/examples/enough.c b/zlib/examples/enough.c -index c40410b..b991144 100644 ---- a/zlib/examples/enough.c -+++ b/zlib/examples/enough.c -@@ -1,7 +1,7 @@ - /* enough.c -- determine the maximum size of inflate's Huffman code tables over - * all possible valid and complete Huffman codes, subject to a length limit. -- * Copyright (C) 2007, 2008 Mark Adler -- * Version 1.3 17 February 2008 Mark Adler -+ * Copyright (C) 2007, 2008, 2012 Mark Adler -+ * Version 1.4 18 August 2012 Mark Adler - */ - - /* Version history: -@@ -14,6 +14,9 @@ - 1.3 17 Feb 2008 Add argument for initial root table size - Fix bug for initial root table size == max - 1 - Use a macro to compute the history index -+ 1.4 18 Aug 2012 Avoid shifts more than bits in type (caused endless loop!) -+ Clean up comparisons of different types -+ Clean up code indentation - */ - - /* -@@ -236,8 +239,8 @@ local big_t count(int syms, int len, int left) - for (use = least; use <= most; use++) { - got = count(syms - use, len + 1, (left - use) << 1); - sum += got; -- if (got == -1 || sum < got) /* overflow */ -- return -1; -+ if (got == (big_t)0 - 1 || sum < got) /* overflow */ -+ return (big_t)0 - 1; - } - - /* verify that all recursive calls are productive */ -@@ -458,6 +461,7 @@ int main(int argc, char **argv) - int n; /* number of symbols to code for this run */ - big_t got; /* return value of count() */ - big_t sum; /* accumulated number of codes over n */ -+ code_t word; /* for counting bits in code_t */ - - /* set up globals for cleanup() */ - code = NULL; -@@ -466,19 +470,19 @@ int main(int argc, char **argv) - - /* get arguments -- default to the deflate literal/length code */ - syms = 286; -- root = 9; -+ root = 9; - max = 15; - if (argc > 1) { - syms = atoi(argv[1]); - if (argc > 2) { - root = atoi(argv[2]); -- if (argc > 3) -- max = atoi(argv[3]); -- } -+ if (argc > 3) -+ max = atoi(argv[3]); -+ } - } - if (argc > 4 || syms < 2 || root < 1 || max < 1) { - fputs("invalid arguments, need: [sym >= 2 [root >= 1 [max >= 1]]]\n", -- stderr); -+ stderr); - return 1; - } - -@@ -487,18 +491,17 @@ int main(int argc, char **argv) - max = syms - 1; - - /* determine the number of bits in a code_t */ -- n = 0; -- while (((code_t)1 << n) != 0) -- n++; -+ for (n = 0, word = 1; word; n++, word <<= 1) -+ ; - - /* make sure that the calculation of most will not overflow */ -- if (max > n || syms - 2 >= (((code_t)0 - 1) >> (max - 1))) { -+ if (max > n || (code_t)(syms - 2) >= (((code_t)0 - 1) >> (max - 1))) { - fputs("abort: code length too long for internal types\n", stderr); - return 1; - } - - /* reject impossible code requests */ -- if (syms - 1 > ((code_t)1 << max) - 1) { -+ if ((code_t)(syms - 1) > ((code_t)1 << max) - 1) { - fprintf(stderr, "%d symbols cannot be coded in %d bits\n", - syms, max); - return 1; -@@ -532,7 +535,7 @@ int main(int argc, char **argv) - for (n = 2; n <= syms; n++) { - got = count(n, 1, 2); - sum += got; -- if (got == -1 || sum < got) { /* overflow */ -+ if (got == (big_t)0 - 1 || sum < got) { /* overflow */ - fputs("abort: can't count that high!\n", stderr); - cleanup(); - return 1; -@@ -556,9 +559,9 @@ int main(int argc, char **argv) - } - - /* find and show maximum inflate table usage */ -- if (root > max) /* reduce root to max length */ -- root = max; -- if (syms < ((code_t)1 << (root + 1))) -+ if (root > max) /* reduce root to max length */ -+ root = max; -+ if ((code_t)syms < ((code_t)1 << (root + 1))) - enough(syms); - else - puts("cannot handle minimum code lengths > root"); -diff --git a/zlib/examples/gun.c b/zlib/examples/gun.c -index 72b0882..89e484f 100644 ---- a/zlib/examples/gun.c -+++ b/zlib/examples/gun.c -@@ -1,7 +1,7 @@ - /* gun.c -- simple gunzip to give an example of the use of inflateBack() -- * Copyright (C) 2003, 2005, 2008, 2010 Mark Adler -+ * Copyright (C) 2003, 2005, 2008, 2010, 2012 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h -- Version 1.6 17 January 2010 Mark Adler */ -+ Version 1.7 12 August 2012 Mark Adler */ - - /* Version history: - 1.0 16 Feb 2003 First version for testing of inflateBack() -@@ -18,6 +18,7 @@ - 1.4 8 Dec 2006 LZW decompression speed improvements - 1.5 9 Feb 2008 Avoid warning in latest version of gcc - 1.6 17 Jan 2010 Avoid signed/unsigned comparison warnings -+ 1.7 12 Aug 2012 Update for z_const usage in zlib 1.2.8 - */ - - /* -@@ -85,7 +86,7 @@ struct ind { - /* Load input buffer, assumed to be empty, and return bytes loaded and a - pointer to them. read() is called until the buffer is full, or until it - returns end-of-file or error. Return 0 on error. */ --local unsigned in(void *in_desc, unsigned char **buf) -+local unsigned in(void *in_desc, z_const unsigned char **buf) - { - int ret; - unsigned len; -@@ -196,7 +197,7 @@ unsigned char match[65280 + 2]; /* buffer for reversed match or gzip - file, read error, or write error (a write error indicated by strm->next_in - not equal to Z_NULL), or Z_DATA_ERROR for invalid input. - */ --local int lunpipe(unsigned have, unsigned char *next, struct ind *indp, -+local int lunpipe(unsigned have, z_const unsigned char *next, struct ind *indp, - int outfile, z_stream *strm) - { - int last; /* last byte read by NEXT(), or -1 if EOF */ -@@ -383,7 +384,7 @@ local int gunpipe(z_stream *strm, int infile, int outfile) - { - int ret, first, last; - unsigned have, flags, len; -- unsigned char *next = NULL; -+ z_const unsigned char *next = NULL; - struct ind ind, *indp; - struct outd outd; - -diff --git a/zlib/examples/gzappend.c b/zlib/examples/gzappend.c -index e9e878e..662dec3 100644 ---- a/zlib/examples/gzappend.c -+++ b/zlib/examples/gzappend.c -@@ -1,7 +1,7 @@ - /* gzappend -- command to append to a gzip file - -- Copyright (C) 2003 Mark Adler, all rights reserved -- version 1.1, 4 Nov 2003 -+ Copyright (C) 2003, 2012 Mark Adler, all rights reserved -+ version 1.2, 11 Oct 2012 - - This software is provided 'as-is', without any express or implied - warranty. In no event will the author be held liable for any damages -@@ -39,6 +39,8 @@ - * - Keep gzip file clean on appended file read errors - * - Use in-place rotate instead of auxiliary buffer - * (Why you ask? Because it was fun to write!) -+ * 1.2 11 Oct 2012 - Fix for proper z_const usage -+ * - Check for input buffer malloc failure - */ - - /* -@@ -170,7 +172,7 @@ typedef struct { - int size; /* 1 << size is bytes in buf */ - unsigned left; /* bytes available at next */ - unsigned char *buf; /* buffer */ -- unsigned char *next; /* next byte in buffer */ -+ z_const unsigned char *next; /* next byte in buffer */ - char *name; /* file name for error messages */ - } file; - -@@ -399,14 +401,14 @@ local void gztack(char *name, int gd, z_stream *strm, int last) - } - - /* allocate buffers */ -- in = fd == -1 ? NULL : malloc(CHUNK); -+ in = malloc(CHUNK); - out = malloc(CHUNK); -- if (out == NULL) bye("out of memory", ""); -+ if (in == NULL || out == NULL) bye("out of memory", ""); - - /* compress input file and append to gzip file */ - do { - /* get more input */ -- len = fd == -1 ? 0 : read(fd, in, CHUNK); -+ len = read(fd, in, CHUNK); - if (len == -1) { - fprintf(stderr, - "gzappend warning: error reading %s, skipping rest ...\n", -@@ -453,7 +455,7 @@ local void gztack(char *name, int gd, z_stream *strm, int last) - - /* clean up and return */ - free(out); -- if (in != NULL) free(in); -+ free(in); - if (fd > 0) close(fd); - } - -@@ -467,11 +469,13 @@ int main(int argc, char **argv) - z_stream strm; - - /* ignore command name */ -- argv++; -+ argc--; argv++; - - /* provide usage if no arguments */ - if (*argv == NULL) { -- printf("gzappend 1.1 (4 Nov 2003) Copyright (C) 2003 Mark Adler\n"); -+ printf( -+ "gzappend 1.2 (11 Oct 2012) Copyright (C) 2003, 2012 Mark Adler\n" -+ ); - printf( - "usage: gzappend [-level] file.gz [ addthis [ andthis ... ]]\n"); - return 0; -diff --git a/zlib/examples/gzjoin.c b/zlib/examples/gzjoin.c -index 129347c..89e8098 100644 ---- a/zlib/examples/gzjoin.c -+++ b/zlib/examples/gzjoin.c -@@ -1,7 +1,7 @@ - /* gzjoin -- command to join gzip files into one gzip file - -- Copyright (C) 2004 Mark Adler, all rights reserved -- version 1.0, 11 Dec 2004 -+ Copyright (C) 2004, 2005, 2012 Mark Adler, all rights reserved -+ version 1.2, 14 Aug 2012 - - This software is provided 'as-is', without any express or implied - warranty. In no event will the author be held liable for any damages -@@ -27,6 +27,7 @@ - * - * 1.0 11 Dec 2004 - First version - * 1.1 12 Jun 2005 - Changed ssize_t to long for portability -+ * 1.2 14 Aug 2012 - Clean up for z_const usage - */ - - /* -@@ -308,7 +309,7 @@ local void gzcopy(char *name, int clr, unsigned long *crc, unsigned long *tot, - /* inflate and copy compressed data, clear last-block bit if requested */ - len = 0; - zpull(&strm, in); -- start = strm.next_in; -+ start = in->next; - last = start[0] & 1; - if (last && clr) - start[0] &= ~1; -@@ -351,7 +352,7 @@ local void gzcopy(char *name, int clr, unsigned long *crc, unsigned long *tot, - pos = 0x100 >> pos; - last = strm.next_in[-1] & pos; - if (last && clr) -- strm.next_in[-1] &= ~pos; -+ in->buf[strm.next_in - in->buf - 1] &= ~pos; - } - else { - /* next last-block bit is in next unused byte */ -@@ -364,14 +365,14 @@ local void gzcopy(char *name, int clr, unsigned long *crc, unsigned long *tot, - } - last = strm.next_in[0] & 1; - if (last && clr) -- strm.next_in[0] &= ~1; -+ in->buf[strm.next_in - in->buf] &= ~1; - } - } - } - - /* update buffer with unused input */ - in->left = strm.avail_in; -- in->next = strm.next_in; -+ in->next = in->buf + (strm.next_in - in->buf); - - /* copy used input, write empty blocks to get to byte boundary */ - pos = strm.data_type & 7; -diff --git a/zlib/examples/gzlog.c b/zlib/examples/gzlog.c -index d70aaca..922f878 100644 ---- a/zlib/examples/gzlog.c -+++ b/zlib/examples/gzlog.c -@@ -1,8 +1,8 @@ - /* - * gzlog.c -- * Copyright (C) 2004, 2008 Mark Adler, all rights reserved -+ * Copyright (C) 2004, 2008, 2012 Mark Adler, all rights reserved - * For conditions of distribution and use, see copyright notice in gzlog.h -- * version 2.0, 25 Apr 2008 -+ * version 2.2, 14 Aug 2012 - */ - - /* -@@ -750,7 +750,8 @@ local int log_recover(struct log *log, int op) - strcpy(log->end, ".add"); - if (stat(log->path, &st) == 0 && st.st_size) { - len = (size_t)(st.st_size); -- if (len != st.st_size || (data = malloc(st.st_size)) == NULL) { -+ if ((off_t)len != st.st_size || -+ (data = malloc(st.st_size)) == NULL) { - log_log(log, op, "allocation failure"); - return -2; - } -@@ -758,7 +759,7 @@ local int log_recover(struct log *log, int op) - log_log(log, op, ".add file read failure"); - return -1; - } -- ret = read(fd, data, len) != len; -+ ret = (size_t)read(fd, data, len) != len; - close(fd); - if (ret) { - log_log(log, op, ".add file read failure"); -@@ -913,7 +914,7 @@ int gzlog_compress(gzlog *logd) - struct log *log = logd; - - /* check arguments */ -- if (log == NULL || strcmp(log->id, LOGID) || len < 0) -+ if (log == NULL || strcmp(log->id, LOGID)) - return -3; - - /* see if we lost the lock -- if so get it again and reload the extra -@@ -952,7 +953,7 @@ int gzlog_compress(gzlog *logd) - fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644); - if (fd < 0) - break; -- ret = write(fd, data, len) != len; -+ ret = (size_t)write(fd, data, len) != len; - if (ret | close(fd)) - break; - log_touch(log); -@@ -963,7 +964,7 @@ int gzlog_compress(gzlog *logd) - if (fd < 0) - break; - next = DICT > len ? len : DICT; -- ret = write(fd, (char *)data + len - next, next) != next; -+ ret = (size_t)write(fd, (char *)data + len - next, next) != next; - if (ret | close(fd)) - break; - log_touch(log); -@@ -997,9 +998,9 @@ int gzlog_write(gzlog *logd, void *data, size_t len) - struct log *log = logd; - - /* check arguments */ -- if (log == NULL || strcmp(log->id, LOGID) || len < 0) -+ if (log == NULL || strcmp(log->id, LOGID)) - return -3; -- if (data == NULL || len == 0) -+ if (data == NULL || len <= 0) - return 0; - - /* see if we lost the lock -- if so get it again and reload the extra -@@ -1013,7 +1014,7 @@ int gzlog_write(gzlog *logd, void *data, size_t len) - fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644); - if (fd < 0) - return -1; -- ret = write(fd, data, len) != len; -+ ret = (size_t)write(fd, data, len) != len; - if (ret | close(fd)) - return -1; - log_touch(log); -diff --git a/zlib/examples/gzlog.h b/zlib/examples/gzlog.h -index c461426..86f0cec 100644 ---- a/zlib/examples/gzlog.h -+++ b/zlib/examples/gzlog.h -@@ -1,6 +1,6 @@ - /* gzlog.h -- Copyright (C) 2004, 2008 Mark Adler, all rights reserved -- version 2.0, 25 Apr 2008 -+ Copyright (C) 2004, 2008, 2012 Mark Adler, all rights reserved -+ version 2.2, 14 Aug 2012 - - This software is provided 'as-is', without any express or implied - warranty. In no event will the author be held liable for any damages -@@ -27,6 +27,8 @@ - Interface changed slightly in that now path is a prefix - Compression now occurs as needed during gzlog_write() - gzlog_write() now always leaves the log file as valid gzip -+ 2.1 8 Jul 2012 Fix argument checks in gzlog_compress() and gzlog_write() -+ 2.2 14 Aug 2012 Clean up signed comparisons - */ - - /* -diff --git a/zlib/examples/zran.c b/zlib/examples/zran.c -index 617a130..278f9ad 100644 ---- a/zlib/examples/zran.c -+++ b/zlib/examples/zran.c -@@ -1,7 +1,12 @@ - /* zran.c -- example of zlib/gzip stream indexing and random access -- * Copyright (C) 2005 Mark Adler -+ * Copyright (C) 2005, 2012 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h -- Version 1.0 29 May 2005 Mark Adler */ -+ Version 1.1 29 Sep 2012 Mark Adler */ -+ -+/* Version History: -+ 1.0 29 May 2005 First version -+ 1.1 29 Sep 2012 Fix memory reallocation error -+ */ - - /* Illustrate the use of Z_BLOCK, inflatePrime(), and inflateSetDictionary() - for random access of a compressed file. A file containing a zlib or gzip -@@ -221,7 +226,7 @@ local int build_index(FILE *in, off_t span, struct access **built) - - /* clean up and return index (release unused entries in list) */ - (void)inflateEnd(&strm); -- index = realloc(index, sizeof(struct point) * index->have); -+ index->list = realloc(index->list, sizeof(struct point) * index->have); - index->size = index->have; - *built = index; - return index->size; -diff --git a/zlib/gzguts.h b/zlib/gzguts.h -index ee3f281..d87659d 100644 ---- a/zlib/gzguts.h -+++ b/zlib/gzguts.h -@@ -1,5 +1,5 @@ - /* gzguts.h -- zlib internal header definitions for gz* operations -- * Copyright (C) 2004, 2005, 2010, 2011, 2012 Mark Adler -+ * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -@@ -35,6 +35,13 @@ - # include <io.h> - #endif - -+#ifdef WINAPI_FAMILY -+# define open _open -+# define read _read -+# define write _write -+# define close _close -+#endif -+ - #ifdef NO_DEFLATE /* for compatibility with old definition */ - # define NO_GZCOMPRESS - #endif -@@ -60,7 +67,7 @@ - #ifndef HAVE_VSNPRINTF - # ifdef MSDOS - /* vsnprintf may exist on some MS-DOS compilers (DJGPP?), -- but for now we just assume it doesn't. */ -+ but for now we just assume it doesn't. */ - # define NO_vsnprintf - # endif - # ifdef __TURBOC__ -@@ -88,6 +95,14 @@ - # endif - #endif - -+/* unlike snprintf (which is required in C99, yet still not supported by -+ Microsoft more than a decade later!), _snprintf does not guarantee null -+ termination of the result -- however this is only used in gzlib.c where -+ the result is assured to fit in the space provided */ -+#ifdef _MSC_VER -+# define snprintf _snprintf -+#endif -+ - #ifndef local - # define local static - #endif -@@ -127,7 +142,8 @@ - # define DEF_MEM_LEVEL MAX_MEM_LEVEL - #endif - --/* default i/o buffer size -- double this for output when reading */ -+/* default i/o buffer size -- double this for output when reading (this and -+ twice this must be able to fit in an unsigned type) */ - #define GZBUFSIZE 8192 - - /* gzip modes, also provide a little integrity check on the passed structure */ -diff --git a/zlib/gzlib.c b/zlib/gzlib.c -index ca55c6e..fae202e 100644 ---- a/zlib/gzlib.c -+++ b/zlib/gzlib.c -@@ -1,5 +1,5 @@ - /* gzlib.c -- zlib functions common to reading and writing gzip files -- * Copyright (C) 2004, 2010, 2011, 2012 Mark Adler -+ * Copyright (C) 2004, 2010, 2011, 2012, 2013 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -@@ -108,7 +108,7 @@ local gzFile gz_open(path, fd, mode) - return NULL; - - /* allocate gzFile structure to return */ -- state = malloc(sizeof(gz_state)); -+ state = (gz_statep)malloc(sizeof(gz_state)); - if (state == NULL) - return NULL; - state->size = 0; /* no buffers allocated yet */ -@@ -162,8 +162,10 @@ local gzFile gz_open(path, fd, mode) - break; - case 'F': - state->strategy = Z_FIXED; -+ break; - case 'T': - state->direct = 1; -+ break; - default: /* could consider as an error, but just ignore */ - ; - } -@@ -194,8 +196,8 @@ local gzFile gz_open(path, fd, mode) - } - else - #endif -- len = strlen(path); -- state->path = malloc(len + 1); -+ len = strlen((const char *)path); -+ state->path = (char *)malloc(len + 1); - if (state->path == NULL) { - free(state); - return NULL; -@@ -208,7 +210,11 @@ local gzFile gz_open(path, fd, mode) - *(state->path) = 0; - else - #endif -+#if !defined(NO_snprintf) && !defined(NO_vsnprintf) -+ snprintf(state->path, len + 1, "%s", (const char *)path); -+#else - strcpy(state->path, path); -+#endif - - /* compute the flags for open() */ - oflag = -@@ -236,7 +242,7 @@ local gzFile gz_open(path, fd, mode) - #ifdef _WIN32 - fd == -2 ? _wopen(path, oflag, 0666) : - #endif -- open(path, oflag, 0666)); -+ open((const char *)path, oflag, 0666)); - if (state->fd == -1) { - free(state->path); - free(state); -@@ -282,9 +288,13 @@ gzFile ZEXPORT gzdopen(fd, mode) - char *path; /* identifier for error messages */ - gzFile gz; - -- if (fd == -1 || (path = malloc(7 + 3 * sizeof(int))) == NULL) -+ if (fd == -1 || (path = (char *)malloc(7 + 3 * sizeof(int))) == NULL) - return NULL; -+#if !defined(NO_snprintf) && !defined(NO_vsnprintf) -+ snprintf(path, 7 + 3 * sizeof(int), "<fd:%d>", fd); /* for debugging */ -+#else - sprintf(path, "<fd:%d>", fd); /* for debugging */ -+#endif - gz = gz_open(path, fd, mode); - free(path); - return gz; -@@ -531,7 +541,8 @@ const char * ZEXPORT gzerror(file, errnum) - /* return error information */ - if (errnum != NULL) - *errnum = state->err; -- return state->msg == NULL ? "" : state->msg; -+ return state->err == Z_MEM_ERROR ? "out of memory" : -+ (state->msg == NULL ? "" : state->msg); - } - - /* -- see zlib.h -- */ -@@ -582,21 +593,24 @@ void ZLIB_INTERNAL gz_error(state, err, msg) - if (msg == NULL) - return; - -- /* for an out of memory error, save as static string */ -- if (err == Z_MEM_ERROR) { -- state->msg = (char *)msg; -+ /* for an out of memory error, return literal string when requested */ -+ if (err == Z_MEM_ERROR) - return; -- } - - /* construct error message with path */ -- if ((state->msg = malloc(strlen(state->path) + strlen(msg) + 3)) == NULL) { -+ if ((state->msg = (char *)malloc(strlen(state->path) + strlen(msg) + 3)) == -+ NULL) { - state->err = Z_MEM_ERROR; -- state->msg = (char *)"out of memory"; - return; - } -+#if !defined(NO_snprintf) && !defined(NO_vsnprintf) -+ snprintf(state->msg, strlen(state->path) + strlen(msg) + 3, -+ "%s%s%s", state->path, ": ", msg); -+#else - strcpy(state->msg, state->path); - strcat(state->msg, ": "); - strcat(state->msg, msg); -+#endif - return; - } - -diff --git a/zlib/gzread.c b/zlib/gzread.c -index 3493d34..bf4538e 100644 ---- a/zlib/gzread.c -+++ b/zlib/gzread.c -@@ -1,5 +1,5 @@ - /* gzread.c -- zlib functions for reading gzip files -- * Copyright (C) 2004, 2005, 2010, 2011, 2012 Mark Adler -+ * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -@@ -58,7 +58,8 @@ local int gz_avail(state) - return -1; - if (state->eof == 0) { - if (strm->avail_in) { /* copy what's there to the start */ -- unsigned char *p = state->in, *q = strm->next_in; -+ unsigned char *p = state->in; -+ unsigned const char *q = strm->next_in; - unsigned n = strm->avail_in; - do { - *p++ = *q++; -@@ -90,8 +91,8 @@ local int gz_look(state) - /* allocate read buffers and inflate memory */ - if (state->size == 0) { - /* allocate buffers */ -- state->in = malloc(state->want); -- state->out = malloc(state->want << 1); -+ state->in = (unsigned char *)malloc(state->want); -+ state->out = (unsigned char *)malloc(state->want << 1); - if (state->in == NULL || state->out == NULL) { - if (state->out != NULL) - free(state->out); -@@ -352,14 +353,14 @@ int ZEXPORT gzread(file, buf, len) - - /* large len -- read directly into user buffer */ - else if (state->how == COPY) { /* read directly */ -- if (gz_load(state, buf, len, &n) == -1) -+ if (gz_load(state, (unsigned char *)buf, len, &n) == -1) - return -1; - } - - /* large len -- decompress directly into user buffer */ - else { /* state->how == GZIP */ - strm->avail_out = len; -- strm->next_out = buf; -+ strm->next_out = (unsigned char *)buf; - if (gz_decomp(state) == -1) - return -1; - n = state->x.have; -@@ -378,7 +379,11 @@ int ZEXPORT gzread(file, buf, len) - } - - /* -- see zlib.h -- */ --#undef gzgetc -+#ifdef Z_PREFIX_SET -+# undef z_gzgetc -+#else -+# undef gzgetc -+#endif - int ZEXPORT gzgetc(file) - gzFile file; - { -@@ -518,7 +523,7 @@ char * ZEXPORT gzgets(file, buf, len) - - /* look for end-of-line in current output buffer */ - n = state->x.have > left ? left : state->x.have; -- eol = memchr(state->x.next, '\n', n); -+ eol = (unsigned char *)memchr(state->x.next, '\n', n); - if (eol != NULL) - n = (unsigned)(eol - state->x.next) + 1; - -diff --git a/zlib/gzwrite.c b/zlib/gzwrite.c -index 27cb342..aa767fb 100644 ---- a/zlib/gzwrite.c -+++ b/zlib/gzwrite.c -@@ -1,5 +1,5 @@ - /* gzwrite.c -- zlib functions for writing gzip files -- * Copyright (C) 2004, 2005, 2010, 2011, 2012 Mark Adler -+ * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -@@ -19,7 +19,7 @@ local int gz_init(state) - z_streamp strm = &(state->strm); - - /* allocate input buffer */ -- state->in = malloc(state->want); -+ state->in = (unsigned char *)malloc(state->want); - if (state->in == NULL) { - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; -@@ -28,7 +28,7 @@ local int gz_init(state) - /* only need output buffer and deflate state if compressing */ - if (!state->direct) { - /* allocate output buffer */ -- state->out = malloc(state->want); -+ state->out = (unsigned char *)malloc(state->want); - if (state->out == NULL) { - free(state->in); - gz_error(state, Z_MEM_ERROR, "out of memory"); -@@ -168,7 +168,6 @@ int ZEXPORT gzwrite(file, buf, len) - unsigned len; - { - unsigned put = len; -- unsigned n; - gz_statep state; - z_streamp strm; - -@@ -208,16 +207,19 @@ int ZEXPORT gzwrite(file, buf, len) - if (len < state->size) { - /* copy to input buffer, compress when full */ - do { -+ unsigned have, copy; -+ - if (strm->avail_in == 0) - strm->next_in = state->in; -- n = state->size - strm->avail_in; -- if (n > len) -- n = len; -- memcpy(strm->next_in + strm->avail_in, buf, n); -- strm->avail_in += n; -- state->x.pos += n; -- buf = (char *)buf + n; -- len -= n; -+ have = (unsigned)((strm->next_in + strm->avail_in) - state->in); -+ copy = state->size - have; -+ if (copy > len) -+ copy = len; -+ memcpy(state->in + have, buf, copy); -+ strm->avail_in += copy; -+ state->x.pos += copy; -+ buf = (const char *)buf + copy; -+ len -= copy; - if (len && gz_comp(state, Z_NO_FLUSH) == -1) - return 0; - } while (len); -@@ -229,7 +231,7 @@ int ZEXPORT gzwrite(file, buf, len) - - /* directly compress user buffer to file */ - strm->avail_in = len; -- strm->next_in = (voidp)buf; -+ strm->next_in = (z_const Bytef *)buf; - state->x.pos += len; - if (gz_comp(state, Z_NO_FLUSH) == -1) - return 0; -@@ -244,6 +246,7 @@ int ZEXPORT gzputc(file, c) - gzFile file; - int c; - { -+ unsigned have; - unsigned char buf[1]; - gz_statep state; - z_streamp strm; -@@ -267,12 +270,16 @@ int ZEXPORT gzputc(file, c) - - /* try writing to input buffer for speed (state->size == 0 if buffer not - initialized) */ -- if (strm->avail_in < state->size) { -+ if (state->size) { - if (strm->avail_in == 0) - strm->next_in = state->in; -- strm->next_in[strm->avail_in++] = c; -- state->x.pos++; -- return c & 0xff; -+ have = (unsigned)((strm->next_in + strm->avail_in) - state->in); -+ if (have < state->size) { -+ state->in[have] = c; -+ strm->avail_in++; -+ state->x.pos++; -+ return c & 0xff; -+ } - } - - /* no room in buffer or not initialized, use gz_write() */ -@@ -300,12 +307,11 @@ int ZEXPORT gzputs(file, str) - #include <stdarg.h> - - /* -- see zlib.h -- */ --int ZEXPORTVA gzprintf (gzFile file, const char *format, ...) -+int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va) - { - int size, len; - gz_statep state; - z_streamp strm; -- va_list va; - - /* get internal structure */ - if (file == NULL) -@@ -335,25 +341,20 @@ int ZEXPORTVA gzprintf (gzFile file, const char *format, ...) - /* do the printf() into the input buffer, put length in len */ - size = (int)(state->size); - state->in[size - 1] = 0; -- va_start(va, format); - #ifdef NO_vsnprintf - # ifdef HAS_vsprintf_void - (void)vsprintf((char *)(state->in), format, va); -- va_end(va); - for (len = 0; len < size; len++) - if (state->in[len] == 0) break; - # else - len = vsprintf((char *)(state->in), format, va); -- va_end(va); - # endif - #else - # ifdef HAS_vsnprintf_void - (void)vsnprintf((char *)(state->in), size, format, va); -- va_end(va); - len = strlen((char *)(state->in)); - # else - len = vsnprintf((char *)(state->in), size, format, va); -- va_end(va); - # endif - #endif - -@@ -368,6 +369,17 @@ int ZEXPORTVA gzprintf (gzFile file, const char *format, ...) - return len; - } - -+int ZEXPORTVA gzprintf(gzFile file, const char *format, ...) -+{ -+ va_list va; -+ int ret; -+ -+ va_start(va, format); -+ ret = gzvprintf(file, format, va); -+ va_end(va); -+ return ret; -+} -+ - #else /* !STDC && !Z_HAVE_STDARG_H */ - - /* -- see zlib.h -- */ -@@ -547,9 +559,9 @@ int ZEXPORT gzclose_w(file) - } - - /* flush, free memory, and close file */ -+ if (gz_comp(state, Z_FINISH) == -1) -+ ret = state->err; - if (state->size) { -- if (gz_comp(state, Z_FINISH) == -1) -- ret = state->err; - if (!state->direct) { - (void)deflateEnd(&(state->strm)); - free(state->out); -diff --git a/zlib/infback.c b/zlib/infback.c -index 981aff1..f3833c2 100644 ---- a/zlib/infback.c -+++ b/zlib/infback.c -@@ -255,7 +255,7 @@ out_func out; - void FAR *out_desc; - { - struct inflate_state FAR *state; -- unsigned char FAR *next; /* next input */ -+ z_const unsigned char FAR *next; /* next input */ - unsigned char FAR *put; /* next output */ - unsigned have, left; /* available input and output */ - unsigned long hold; /* bit buffer */ -diff --git a/zlib/inffast.c b/zlib/inffast.c -index 2f1d60b..bda59ce 100644 ---- a/zlib/inffast.c -+++ b/zlib/inffast.c -@@ -1,5 +1,5 @@ - /* inffast.c -- fast decoding -- * Copyright (C) 1995-2008, 2010 Mark Adler -+ * Copyright (C) 1995-2008, 2010, 2013 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -@@ -69,8 +69,8 @@ z_streamp strm; - unsigned start; /* inflate()'s starting value for strm->avail_out */ - { - struct inflate_state FAR *state; -- unsigned char FAR *in; /* local strm->next_in */ -- unsigned char FAR *last; /* while in < last, enough input available */ -+ z_const unsigned char FAR *in; /* local strm->next_in */ -+ z_const unsigned char FAR *last; /* have enough input while in < last */ - unsigned char FAR *out; /* local strm->next_out */ - unsigned char FAR *beg; /* inflate()'s initial strm->next_out */ - unsigned char FAR *end; /* while out < end, enough space available */ -diff --git a/zlib/inflate.c b/zlib/inflate.c -index 47418a1..870f89b 100644 ---- a/zlib/inflate.c -+++ b/zlib/inflate.c -@@ -93,11 +93,12 @@ - - /* function prototypes */ - local void fixedtables OF((struct inflate_state FAR *state)); --local int updatewindow OF((z_streamp strm, unsigned out)); -+local int updatewindow OF((z_streamp strm, const unsigned char FAR *end, -+ unsigned copy)); - #ifdef BUILDFIXED - void makefixed OF((void)); - #endif --local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf, -+local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf, - unsigned len)); - - int ZEXPORT inflateResetKeep(strm) -@@ -375,12 +376,13 @@ void makefixed() - output will fall in the output data, making match copies simpler and faster. - The advantage may be dependent on the size of the processor's data caches. - */ --local int updatewindow(strm, out) -+local int updatewindow(strm, end, copy) - z_streamp strm; --unsigned out; -+const Bytef *end; -+unsigned copy; - { - struct inflate_state FAR *state; -- unsigned copy, dist; -+ unsigned dist; - - state = (struct inflate_state FAR *)strm->state; - -@@ -400,19 +402,18 @@ unsigned out; - } - - /* copy state->wsize or less output bytes into the circular window */ -- copy = out - strm->avail_out; - if (copy >= state->wsize) { -- zmemcpy(state->window, strm->next_out - state->wsize, state->wsize); -+ zmemcpy(state->window, end - state->wsize, state->wsize); - state->wnext = 0; - state->whave = state->wsize; - } - else { - dist = state->wsize - state->wnext; - if (dist > copy) dist = copy; -- zmemcpy(state->window + state->wnext, strm->next_out - copy, dist); -+ zmemcpy(state->window + state->wnext, end - copy, dist); - copy -= dist; - if (copy) { -- zmemcpy(state->window, strm->next_out - copy, copy); -+ zmemcpy(state->window, end - copy, copy); - state->wnext = copy; - state->whave = state->wsize; - } -@@ -606,7 +607,7 @@ z_streamp strm; - int flush; - { - struct inflate_state FAR *state; -- unsigned char FAR *next; /* next input */ -+ z_const unsigned char FAR *next; /* next input */ - unsigned char FAR *put; /* next output */ - unsigned have, left; /* available input and output */ - unsigned long hold; /* bit buffer */ -@@ -920,7 +921,7 @@ int flush; - while (state->have < 19) - state->lens[order[state->have++]] = 0; - state->next = state->codes; -- state->lencode = (code const FAR *)(state->next); -+ state->lencode = (const code FAR *)(state->next); - state->lenbits = 7; - ret = inflate_table(CODES, state->lens, 19, &(state->next), - &(state->lenbits), state->work); -@@ -994,7 +995,7 @@ int flush; - values here (9 and 6) without reading the comments in inftrees.h - concerning the ENOUGH constants, which depend on those values */ - state->next = state->codes; -- state->lencode = (code const FAR *)(state->next); -+ state->lencode = (const code FAR *)(state->next); - state->lenbits = 9; - ret = inflate_table(LENS, state->lens, state->nlen, &(state->next), - &(state->lenbits), state->work); -@@ -1003,7 +1004,7 @@ int flush; - state->mode = BAD; - break; - } -- state->distcode = (code const FAR *)(state->next); -+ state->distcode = (const code FAR *)(state->next); - state->distbits = 6; - ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist, - &(state->next), &(state->distbits), state->work); -@@ -1230,7 +1231,7 @@ int flush; - RESTORE(); - if (state->wsize || (out != strm->avail_out && state->mode < BAD && - (state->mode < CHECK || flush != Z_FINISH))) -- if (updatewindow(strm, out)) { -+ if (updatewindow(strm, strm->next_out, out - strm->avail_out)) { - state->mode = MEM; - return Z_MEM_ERROR; - } -@@ -1264,6 +1265,29 @@ z_streamp strm; - return Z_OK; - } - -+int ZEXPORT inflateGetDictionary(strm, dictionary, dictLength) -+z_streamp strm; -+Bytef *dictionary; -+uInt *dictLength; -+{ -+ struct inflate_state FAR *state; -+ -+ /* check state */ -+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; -+ state = (struct inflate_state FAR *)strm->state; -+ -+ /* copy dictionary */ -+ if (state->whave && dictionary != Z_NULL) { -+ zmemcpy(dictionary, state->window + state->wnext, -+ state->whave - state->wnext); -+ zmemcpy(dictionary + state->whave - state->wnext, -+ state->window, state->wnext); -+ } -+ if (dictLength != Z_NULL) -+ *dictLength = state->whave; -+ return Z_OK; -+} -+ - int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength) - z_streamp strm; - const Bytef *dictionary; -@@ -1271,8 +1295,6 @@ uInt dictLength; - { - struct inflate_state FAR *state; - unsigned long dictid; -- unsigned char *next; -- unsigned avail; - int ret; - - /* check state */ -@@ -1291,13 +1313,7 @@ uInt dictLength; - - /* copy dictionary to window using updatewindow(), which will amend the - existing dictionary if appropriate */ -- next = strm->next_out; -- avail = strm->avail_out; -- strm->next_out = (Bytef *)dictionary + dictLength; -- strm->avail_out = 0; -- ret = updatewindow(strm, dictLength); -- strm->avail_out = avail; -- strm->next_out = next; -+ ret = updatewindow(strm, dictionary + dictLength, dictLength); - if (ret) { - state->mode = MEM; - return Z_MEM_ERROR; -@@ -1337,7 +1353,7 @@ gz_headerp head; - */ - local unsigned syncsearch(have, buf, len) - unsigned FAR *have; --unsigned char FAR *buf; -+const unsigned char FAR *buf; - unsigned len; - { - unsigned got; -diff --git a/zlib/inftrees.c b/zlib/inftrees.c -index abcd7c4..44d89cf 100644 ---- a/zlib/inftrees.c -+++ b/zlib/inftrees.c -@@ -1,5 +1,5 @@ - /* inftrees.c -- generate Huffman trees for efficient decoding -- * Copyright (C) 1995-2012 Mark Adler -+ * Copyright (C) 1995-2013 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -@@ -9,7 +9,7 @@ - #define MAXBITS 15 - - const char inflate_copyright[] = -- " inflate 1.2.7 Copyright 1995-2012 Mark Adler "; -+ " inflate 1.2.8 Copyright 1995-2013 Mark Adler "; - /* - If you use the zlib library in a product, an acknowledgment is welcome - in the documentation of your product. If for some reason you cannot -@@ -62,7 +62,7 @@ unsigned short FAR *work; - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; - static const unsigned short lext[31] = { /* Length codes 257..285 extra */ - 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, -- 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 78, 68}; -+ 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78}; - static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, -@@ -208,8 +208,8 @@ unsigned short FAR *work; - mask = used - 1; /* mask for comparing low */ - - /* check available table space */ -- if ((type == LENS && used >= ENOUGH_LENS) || -- (type == DISTS && used >= ENOUGH_DISTS)) -+ if ((type == LENS && used > ENOUGH_LENS) || -+ (type == DISTS && used > ENOUGH_DISTS)) - return 1; - - /* process all codes and make table entries */ -@@ -277,8 +277,8 @@ unsigned short FAR *work; - - /* check for enough space */ - used += 1U << curr; -- if ((type == LENS && used >= ENOUGH_LENS) || -- (type == DISTS && used >= ENOUGH_DISTS)) -+ if ((type == LENS && used > ENOUGH_LENS) || -+ (type == DISTS && used > ENOUGH_DISTS)) - return 1; - - /* point entry in root table to sub-table */ -diff --git a/zlib/qnx/package.qpg b/zlib/qnx/package.qpg -index 26eed9b..aebf6e3 100644 ---- a/zlib/qnx/package.qpg -+++ b/zlib/qnx/package.qpg -@@ -25,10 +25,10 @@ - <QPG:Files> - <QPG:Add file="../zconf.h" install="/opt/include/" user="root:sys" permission="644"/> - <QPG:Add file="../zlib.h" install="/opt/include/" user="root:sys" permission="644"/> -- <QPG:Add file="../libz.so.1.2.7" install="/opt/lib/" user="root:bin" permission="644"/> -- <QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.2.7"/> -- <QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.7"/> -- <QPG:Add file="../libz.so.1.2.7" install="/opt/lib/" component="slib"/> -+ <QPG:Add file="../libz.so.1.2.8" install="/opt/lib/" user="root:bin" permission="644"/> -+ <QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.2.8"/> -+ <QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.8"/> -+ <QPG:Add file="../libz.so.1.2.8" install="/opt/lib/" component="slib"/> - </QPG:Files> - - <QPG:PackageFilter> -@@ -63,7 +63,7 @@ - </QPM:ProductDescription> - - <QPM:ReleaseDescription> -- <QPM:ReleaseVersion>1.2.7</QPM:ReleaseVersion> -+ <QPM:ReleaseVersion>1.2.8</QPM:ReleaseVersion> - <QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency> - <QPM:ReleaseStability>Stable</QPM:ReleaseStability> - <QPM:ReleaseNoteMinor></QPM:ReleaseNoteMinor> -diff --git a/zlib/test/example.c b/zlib/test/example.c -index f515a48..138a699 100644 ---- a/zlib/test/example.c -+++ b/zlib/test/example.c -@@ -26,7 +26,7 @@ - } \ - } - --const char hello[] = "hello, hello!"; -+z_const char hello[] = "hello, hello!"; - /* "hello world" would be more standard, but the repeated "hello" - * stresses the compression code better, sorry... - */ -@@ -212,7 +212,7 @@ void test_deflate(compr, comprLen) - err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION); - CHECK_ERR(err, "deflateInit"); - -- c_stream.next_in = (Bytef*)hello; -+ c_stream.next_in = (z_const unsigned char *)hello; - c_stream.next_out = compr; - - while (c_stream.total_in != len && c_stream.total_out < comprLen) { -@@ -387,7 +387,7 @@ void test_flush(compr, comprLen) - err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION); - CHECK_ERR(err, "deflateInit"); - -- c_stream.next_in = (Bytef*)hello; -+ c_stream.next_in = (z_const unsigned char *)hello; - c_stream.next_out = compr; - c_stream.avail_in = 3; - c_stream.avail_out = (uInt)*comprLen; -@@ -476,7 +476,7 @@ void test_dict_deflate(compr, comprLen) - c_stream.next_out = compr; - c_stream.avail_out = (uInt)comprLen; - -- c_stream.next_in = (Bytef*)hello; -+ c_stream.next_in = (z_const unsigned char *)hello; - c_stream.avail_in = (uInt)strlen(hello)+1; - - err = deflate(&c_stream, Z_FINISH); -diff --git a/zlib/test/minigzip.c b/zlib/test/minigzip.c -index aa7ac7a..b3025a4 100644 ---- a/zlib/test/minigzip.c -+++ b/zlib/test/minigzip.c -@@ -40,6 +40,10 @@ - # define SET_BINARY_MODE(file) - #endif - -+#ifdef _MSC_VER -+# define snprintf _snprintf -+#endif -+ - #ifdef VMS - # define unlink delete - # define GZ_SUFFIX "-gz" -@@ -463,8 +467,12 @@ void file_compress(file, mode) - exit(1); - } - -+#if !defined(NO_snprintf) && !defined(NO_vsnprintf) -+ snprintf(outfile, sizeof(outfile), "%s%s", file, GZ_SUFFIX); -+#else - strcpy(outfile, file); - strcat(outfile, GZ_SUFFIX); -+#endif - - in = fopen(file, "rb"); - if (in == NULL) { -@@ -499,7 +507,11 @@ void file_uncompress(file) - exit(1); - } - -+#if !defined(NO_snprintf) && !defined(NO_vsnprintf) -+ snprintf(buf, sizeof(buf), "%s", file); -+#else - strcpy(buf, file); -+#endif - - if (len > SUFFIX_LEN && strcmp(file+len-SUFFIX_LEN, GZ_SUFFIX) == 0) { - infile = file; -@@ -508,7 +520,11 @@ void file_uncompress(file) - } else { - outfile = file; - infile = buf; -+#if !defined(NO_snprintf) && !defined(NO_vsnprintf) -+ snprintf(buf + len, sizeof(buf) - len, "%s", GZ_SUFFIX); -+#else - strcat(infile, GZ_SUFFIX); -+#endif - } - in = gzopen(infile, "rb"); - if (in == NULL) { -@@ -546,7 +562,11 @@ int main(argc, argv) - gzFile file; - char *bname, outmode[20]; - -+#if !defined(NO_snprintf) && !defined(NO_vsnprintf) -+ snprintf(outmode, sizeof(outmode), "%s", "wb6 "); -+#else - strcpy(outmode, "wb6 "); -+#endif - - prog = argv[0]; - bname = strrchr(argv[0], '/'); -diff --git a/zlib/treebuild.xml b/zlib/treebuild.xml -index 1f4d15f..38d29d7 100644 ---- a/zlib/treebuild.xml -+++ b/zlib/treebuild.xml -@@ -1,6 +1,6 @@ - <?xml version="1.0" ?> --<package name="zlib" version="1.2.7"> -- <library name="zlib" dlversion="1.2.7" dlname="z"> -+<package name="zlib" version="1.2.8"> -+ <library name="zlib" dlversion="1.2.8" dlname="z"> - <property name="description"> zip compression library </property> - <property name="include-target-dir" value="$(@PACKAGE/install-includedir)" /> - -diff --git a/zlib/trees.c b/zlib/trees.c -index cd0af2d..4b5dfa1 100644 ---- a/zlib/trees.c -+++ b/zlib/trees.c -@@ -146,8 +146,8 @@ local void send_tree OF((deflate_state *s, ct_data *tree, int max_code)); - local int build_bl_tree OF((deflate_state *s)); - local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes, - int blcodes)); --local void compress_block OF((deflate_state *s, ct_data *ltree, -- ct_data *dtree)); -+local void compress_block OF((deflate_state *s, const ct_data *ltree, -+ const ct_data *dtree)); - local int detect_data_type OF((deflate_state *s)); - local unsigned bi_reverse OF((unsigned value, int length)); - local void bi_windup OF((deflate_state *s)); -@@ -972,7 +972,8 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last) - } else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) { - #endif - send_bits(s, (STATIC_TREES<<1)+last, 3); -- compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree); -+ compress_block(s, (const ct_data *)static_ltree, -+ (const ct_data *)static_dtree); - #ifdef DEBUG - s->compressed_len += 3 + s->static_len; - #endif -@@ -980,7 +981,8 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last) - send_bits(s, (DYN_TREES<<1)+last, 3); - send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1, - max_blindex+1); -- compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree); -+ compress_block(s, (const ct_data *)s->dyn_ltree, -+ (const ct_data *)s->dyn_dtree); - #ifdef DEBUG - s->compressed_len += 3 + s->opt_len; - #endif -@@ -1057,8 +1059,8 @@ int ZLIB_INTERNAL _tr_tally (s, dist, lc) - */ - local void compress_block(s, ltree, dtree) - deflate_state *s; -- ct_data *ltree; /* literal tree */ -- ct_data *dtree; /* distance tree */ -+ const ct_data *ltree; /* literal tree */ -+ const ct_data *dtree; /* distance tree */ - { - unsigned dist; /* distance of matched string */ - int lc; /* match length or unmatched char (if dist == 0) */ -diff --git a/zlib/uncompr.c b/zlib/uncompr.c -index 8a2e1f9..cf2e3a0 100644 ---- a/zlib/uncompr.c -+++ b/zlib/uncompr.c -@@ -30,7 +30,7 @@ int ZEXPORT uncompress (dest, destLen, source, sourceLen) - z_stream stream; - int err; - -- stream.next_in = (Bytef*)source; -+ stream.next_in = (z_const Bytef *)source; - stream.avail_in = (uInt)sourceLen; - /* Check for source > 64K on 16-bit machine: */ - if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; -diff --git a/zlib/win32/Makefile.msc b/zlib/win32/Makefile.msc -index 59bb0da..67b7731 100644 ---- a/zlib/win32/Makefile.msc -+++ b/zlib/win32/Makefile.msc -@@ -9,6 +9,10 @@ - # nmake -f win32/Makefile.msc AS=ml64 LOC="-DASMV -DASMINF -I." \ - # OBJA="inffasx64.obj gvmat64.obj inffas8664.obj" (use ASM code, x64) - -+# The toplevel directory of the source tree. -+# -+TOP = . -+ - # optional build flags - LOC = - -@@ -43,8 +47,8 @@ $(STATICLIB): $(OBJS) $(OBJA) - - $(IMPLIB): $(SHAREDLIB) - --$(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlib1.res -- $(LD) $(LDFLAGS) -def:win32/zlib.def -dll -implib:$(IMPLIB) \ -+$(SHAREDLIB): $(TOP)/win32/zlib.def $(OBJS) $(OBJA) zlib1.res -+ $(LD) $(LDFLAGS) -def:$(TOP)/win32/zlib.def -dll -implib:$(IMPLIB) \ - -out:$@ -base:0x5A4C0000 $(OBJS) $(OBJA) zlib1.res - if exist $@.manifest \ - mt -nologo -manifest $@.manifest -outputresource:$@;2 -@@ -69,72 +73,71 @@ minigzip_d.exe: minigzip.obj $(IMPLIB) - if exist $@.manifest \ - mt -nologo -manifest $@.manifest -outputresource:$@;1 - --.c.obj: -+{$(TOP)}.c.obj: - $(CC) -c $(WFLAGS) $(CFLAGS) $< - --{test}.c.obj: -- $(CC) -c -I. $(WFLAGS) $(CFLAGS) $< -+{$(TOP)/test}.c.obj: -+ $(CC) -c -I$(TOP) $(WFLAGS) $(CFLAGS) $< - --{contrib/masmx64}.c.obj: -+{$(TOP)/contrib/masmx64}.c.obj: - $(CC) -c $(WFLAGS) $(CFLAGS) $< - --{contrib/masmx64}.asm.obj: -+{$(TOP)/contrib/masmx64}.asm.obj: - $(AS) -c $(ASFLAGS) $< - --{contrib/masmx86}.asm.obj: -+{$(TOP)/contrib/masmx86}.asm.obj: - $(AS) -c $(ASFLAGS) $< - --adler32.obj: adler32.c zlib.h zconf.h -- --compress.obj: compress.c zlib.h zconf.h -+adler32.obj: $(TOP)/adler32.c $(TOP)/zlib.h $(TOP)/zconf.h - --crc32.obj: crc32.c zlib.h zconf.h crc32.h -+compress.obj: $(TOP)/compress.c $(TOP)/zlib.h $(TOP)/zconf.h - --deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h -+crc32.obj: $(TOP)/crc32.c $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/crc32.h - --gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h -+deflate.obj: $(TOP)/deflate.c $(TOP)/deflate.h $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h - --gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h -+gzclose.obj: $(TOP)/gzclose.c $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/gzguts.h - --gzread.obj: gzread.c zlib.h zconf.h gzguts.h -+gzlib.obj: $(TOP)/gzlib.c $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/gzguts.h - --gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h -+gzread.obj: $(TOP)/gzread.c $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/gzguts.h - --infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ -- inffast.h inffixed.h -+gzwrite.obj: $(TOP)/gzwrite.c $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/gzguts.h - --inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ -- inffast.h -+infback.obj: $(TOP)/infback.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/inftrees.h $(TOP)/inflate.h \ -+ $(TOP)/inffast.h $(TOP)/inffixed.h - --inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ -- inffast.h inffixed.h -+inffast.obj: $(TOP)/inffast.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/inftrees.h $(TOP)/inflate.h \ -+ $(TOP)/inffast.h - --inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h -+inflate.obj: $(TOP)/inflate.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/inftrees.h $(TOP)/inflate.h \ -+ $(TOP)/inffast.h $(TOP)/inffixed.h - --trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h -+inftrees.obj: $(TOP)/inftrees.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/inftrees.h - --uncompr.obj: uncompr.c zlib.h zconf.h -+trees.obj: $(TOP)/trees.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/deflate.h $(TOP)/trees.h - --zutil.obj: zutil.c zutil.h zlib.h zconf.h -+uncompr.obj: $(TOP)/uncompr.c $(TOP)/zlib.h $(TOP)/zconf.h - --gvmat64.obj: contrib\masmx64\gvmat64.asm -+zutil.obj: $(TOP)/zutil.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h - --inffasx64.obj: contrib\masmx64\inffasx64.asm -+gvmat64.obj: $(TOP)/contrib\masmx64\gvmat64.asm - --inffas8664.obj: contrib\masmx64\inffas8664.c zutil.h zlib.h zconf.h \ -- inftrees.h inflate.h inffast.h -+inffasx64.obj: $(TOP)/contrib\masmx64\inffasx64.asm - --inffas32.obj: contrib\masmx86\inffas32.asm -+inffas8664.obj: $(TOP)/contrib\masmx64\inffas8664.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h \ -+ $(TOP)/inftrees.h $(TOP)/inflate.h $(TOP)/inffast.h - --match686.obj: contrib\masmx86\match686.asm -+inffas32.obj: $(TOP)/contrib\masmx86\inffas32.asm - --example.obj: test/example.c zlib.h zconf.h -+match686.obj: $(TOP)/contrib\masmx86\match686.asm - --minigzip.obj: test/minigzip.c zlib.h zconf.h -+example.obj: $(TOP)/test/example.c $(TOP)/zlib.h $(TOP)/zconf.h - --zlib1.res: win32/zlib1.rc -- $(RC) $(RCFLAGS) /fo$@ win32/zlib1.rc -+minigzip.obj: $(TOP)/test/minigzip.c $(TOP)/zlib.h $(TOP)/zconf.h - -+zlib1.res: $(TOP)/win32/zlib1.rc -+ $(RC) $(RCFLAGS) /fo$@ $(TOP)/win32/zlib1.rc - - # testing - test: example.exe minigzip.exe -diff --git a/zlib/win32/README-WIN32.txt b/zlib/win32/README-WIN32.txt -index 46c5923..3d77d52 100644 ---- a/zlib/win32/README-WIN32.txt -+++ b/zlib/win32/README-WIN32.txt -@@ -1,6 +1,6 @@ - ZLIB DATA COMPRESSION LIBRARY - --zlib 1.2.7 is a general purpose data compression library. All the code is -+zlib 1.2.8 is a general purpose data compression library. All the code is - thread safe. The data format used by the zlib library is described by RFCs - (Request for Comments) 1950 to 1952 in the files - http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) -@@ -22,7 +22,7 @@ before asking for help. - - Manifest: - --The package zlib-1.2.7-win32-x86.zip will contain the following files: -+The package zlib-1.2.8-win32-x86.zip will contain the following files: - - README-WIN32.txt This document - ChangeLog Changes since previous zlib packages -diff --git a/zlib/win32/zlib.def b/zlib/win32/zlib.def -index 0489615..face655 100644 ---- a/zlib/win32/zlib.def -+++ b/zlib/win32/zlib.def -@@ -17,6 +17,7 @@ EXPORTS - deflatePrime - deflateSetHeader - inflateSetDictionary -+ inflateGetDictionary - inflateSync - inflateCopy - inflateReset -@@ -39,6 +40,7 @@ EXPORTS - gzread - gzwrite - gzprintf -+ gzvprintf - gzputs - gzgets - gzputc -diff --git a/zlib/win32/zlib1.rc b/zlib/win32/zlib1.rc -index 0d1d7ff..5c0feed 100644 ---- a/zlib/win32/zlib1.rc -+++ b/zlib/win32/zlib1.rc -@@ -26,7 +26,7 @@ BEGIN - VALUE "FileDescription", "zlib data compression library\0" - VALUE "FileVersion", ZLIB_VERSION "\0" - VALUE "InternalName", "zlib1.dll\0" -- VALUE "LegalCopyright", "(C) 1995-2006 Jean-loup Gailly & Mark Adler\0" -+ VALUE "LegalCopyright", "(C) 1995-2013 Jean-loup Gailly & Mark Adler\0" - VALUE "OriginalFilename", "zlib1.dll\0" - VALUE "ProductName", "zlib\0" - VALUE "ProductVersion", ZLIB_VERSION "\0" -diff --git a/zlib/zconf.h b/zlib/zconf.h -index 18dcee1..da7fd94 100644 ---- a/zlib/zconf.h -+++ b/zlib/zconf.h -@@ -1,5 +1,5 @@ - /* zconf.h -- configuration of the zlib compression library -- * Copyright (C) 1995-2012 Jean-loup Gailly. -+ * Copyright (C) 1995-2013 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -@@ -21,6 +21,7 @@ - # define _dist_code z__dist_code - # define _length_code z__length_code - # define _tr_align z__tr_align -+# define _tr_flush_bits z__tr_flush_bits - # define _tr_flush_block z__tr_flush_block - # define _tr_init z__tr_init - # define _tr_stored_block z__tr_stored_block -@@ -77,6 +78,7 @@ - # define gzopen_w z_gzopen_w - # endif - # define gzprintf z_gzprintf -+# define gzvprintf z_gzvprintf - # define gzputc z_gzputc - # define gzputs z_gzputs - # define gzread z_gzread -@@ -103,6 +105,7 @@ - # define inflateReset z_inflateReset - # define inflateReset2 z_inflateReset2 - # define inflateSetDictionary z_inflateSetDictionary -+# define inflateGetDictionary z_inflateGetDictionary - # define inflateSync z_inflateSync - # define inflateSyncPoint z_inflateSyncPoint - # define inflateUndermine z_inflateUndermine -@@ -388,20 +391,14 @@ typedef uLong FAR uLongf; - typedef Byte *voidp; - #endif - --/* ./configure may #define Z_U4 here */ -- - #if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) - # include <limits.h> - # if (UINT_MAX == 0xffffffffUL) - # define Z_U4 unsigned --# else --# if (ULONG_MAX == 0xffffffffUL) --# define Z_U4 unsigned long --# else --# if (USHRT_MAX == 0xffffffffUL) --# define Z_U4 unsigned short --# endif --# endif -+# elif (ULONG_MAX == 0xffffffffUL) -+# define Z_U4 unsigned long -+# elif (USHRT_MAX == 0xffffffffUL) -+# define Z_U4 unsigned short - # endif - #endif - -@@ -425,8 +422,16 @@ typedef uLong FAR uLongf; - # endif - #endif - -+#if defined(STDC) || defined(Z_HAVE_STDARG_H) -+# ifndef Z_SOLO -+# include <stdarg.h> /* for va_list */ -+# endif -+#endif -+ - #ifdef _WIN32 --# include <stddef.h> /* for wchar_t */ -+# ifndef Z_SOLO -+# include <stddef.h> /* for wchar_t */ -+# endif - #endif - - /* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and -@@ -435,7 +440,7 @@ typedef uLong FAR uLongf; - * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as - * equivalently requesting no 64-bit operations - */ --#if defined(LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 -+#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 - # undef _LARGEFILE64_SOURCE - #endif - -@@ -443,7 +448,7 @@ typedef uLong FAR uLongf; - # define Z_HAVE_UNISTD_H - #endif - #ifndef Z_SOLO --# if defined(Z_HAVE_UNISTD_H) || defined(LARGEFILE64_SOURCE) -+# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) - # include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ - # ifdef VMS - # include <unixio.h> /* for off_t */ -diff --git a/zlib/zconf.h.cmakein b/zlib/zconf.h.cmakein -index b6ca59a..043019c 100644 ---- a/zlib/zconf.h.cmakein -+++ b/zlib/zconf.h.cmakein -@@ -1,5 +1,5 @@ - /* zconf.h -- configuration of the zlib compression library -- * Copyright (C) 1995-2012 Jean-loup Gailly. -+ * Copyright (C) 1995-2013 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -@@ -23,6 +23,7 @@ - # define _dist_code z__dist_code - # define _length_code z__length_code - # define _tr_align z__tr_align -+# define _tr_flush_bits z__tr_flush_bits - # define _tr_flush_block z__tr_flush_block - # define _tr_init z__tr_init - # define _tr_stored_block z__tr_stored_block -@@ -79,6 +80,7 @@ - # define gzopen_w z_gzopen_w - # endif - # define gzprintf z_gzprintf -+# define gzvprintf z_gzvprintf - # define gzputc z_gzputc - # define gzputs z_gzputs - # define gzread z_gzread -@@ -105,6 +107,7 @@ - # define inflateReset z_inflateReset - # define inflateReset2 z_inflateReset2 - # define inflateSetDictionary z_inflateSetDictionary -+# define inflateGetDictionary z_inflateGetDictionary - # define inflateSync z_inflateSync - # define inflateSyncPoint z_inflateSyncPoint - # define inflateUndermine z_inflateUndermine -@@ -390,20 +393,14 @@ typedef uLong FAR uLongf; - typedef Byte *voidp; - #endif - --/* ./configure may #define Z_U4 here */ -- - #if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) - # include <limits.h> - # if (UINT_MAX == 0xffffffffUL) - # define Z_U4 unsigned --# else --# if (ULONG_MAX == 0xffffffffUL) --# define Z_U4 unsigned long --# else --# if (USHRT_MAX == 0xffffffffUL) --# define Z_U4 unsigned short --# endif --# endif -+# elif (ULONG_MAX == 0xffffffffUL) -+# define Z_U4 unsigned long -+# elif (USHRT_MAX == 0xffffffffUL) -+# define Z_U4 unsigned short - # endif - #endif - -@@ -427,8 +424,16 @@ typedef uLong FAR uLongf; - # endif - #endif - -+#if defined(STDC) || defined(Z_HAVE_STDARG_H) -+# ifndef Z_SOLO -+# include <stdarg.h> /* for va_list */ -+# endif -+#endif -+ - #ifdef _WIN32 --# include <stddef.h> /* for wchar_t */ -+# ifndef Z_SOLO -+# include <stddef.h> /* for wchar_t */ -+# endif - #endif - - /* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and -@@ -437,7 +442,7 @@ typedef uLong FAR uLongf; - * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as - * equivalently requesting no 64-bit operations - */ --#if defined(LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 -+#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 - # undef _LARGEFILE64_SOURCE - #endif - -@@ -445,7 +450,7 @@ typedef uLong FAR uLongf; - # define Z_HAVE_UNISTD_H - #endif - #ifndef Z_SOLO --# if defined(Z_HAVE_UNISTD_H) || defined(LARGEFILE64_SOURCE) -+# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) - # include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ - # ifdef VMS - # include <unixio.h> /* for off_t */ -diff --git a/zlib/zconf.h.in b/zlib/zconf.h.in -index 8a46a58..9987a77 100644 ---- a/zlib/zconf.h.in -+++ b/zlib/zconf.h.in -@@ -1,5 +1,5 @@ - /* zconf.h -- configuration of the zlib compression library -- * Copyright (C) 1995-2012 Jean-loup Gailly. -+ * Copyright (C) 1995-2013 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -@@ -21,6 +21,7 @@ - # define _dist_code z__dist_code - # define _length_code z__length_code - # define _tr_align z__tr_align -+# define _tr_flush_bits z__tr_flush_bits - # define _tr_flush_block z__tr_flush_block - # define _tr_init z__tr_init - # define _tr_stored_block z__tr_stored_block -@@ -77,6 +78,7 @@ - # define gzopen_w z_gzopen_w - # endif - # define gzprintf z_gzprintf -+# define gzvprintf z_gzvprintf - # define gzputc z_gzputc - # define gzputs z_gzputs - # define gzread z_gzread -@@ -103,6 +105,7 @@ - # define inflateReset z_inflateReset - # define inflateReset2 z_inflateReset2 - # define inflateSetDictionary z_inflateSetDictionary -+# define inflateGetDictionary z_inflateGetDictionary - # define inflateSync z_inflateSync - # define inflateSyncPoint z_inflateSyncPoint - # define inflateUndermine z_inflateUndermine -@@ -388,20 +391,14 @@ typedef uLong FAR uLongf; - typedef Byte *voidp; - #endif - --/* ./configure may #define Z_U4 here */ -- - #if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) - # include <limits.h> - # if (UINT_MAX == 0xffffffffUL) - # define Z_U4 unsigned --# else --# if (ULONG_MAX == 0xffffffffUL) --# define Z_U4 unsigned long --# else --# if (USHRT_MAX == 0xffffffffUL) --# define Z_U4 unsigned short --# endif --# endif -+# elif (ULONG_MAX == 0xffffffffUL) -+# define Z_U4 unsigned long -+# elif (USHRT_MAX == 0xffffffffUL) -+# define Z_U4 unsigned short - # endif - #endif - -@@ -425,8 +422,16 @@ typedef uLong FAR uLongf; - # endif - #endif - -+#if defined(STDC) || defined(Z_HAVE_STDARG_H) -+# ifndef Z_SOLO -+# include <stdarg.h> /* for va_list */ -+# endif -+#endif -+ - #ifdef _WIN32 --# include <stddef.h> /* for wchar_t */ -+# ifndef Z_SOLO -+# include <stddef.h> /* for wchar_t */ -+# endif - #endif - - /* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and -@@ -435,7 +440,7 @@ typedef uLong FAR uLongf; - * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as - * equivalently requesting no 64-bit operations - */ --#if defined(LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 -+#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 - # undef _LARGEFILE64_SOURCE - #endif - -@@ -443,7 +448,7 @@ typedef uLong FAR uLongf; - # define Z_HAVE_UNISTD_H - #endif - #ifndef Z_SOLO --# if defined(Z_HAVE_UNISTD_H) || defined(LARGEFILE64_SOURCE) -+# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) - # include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ - # ifdef VMS - # include <unixio.h> /* for off_t */ -diff --git a/zlib/zlib.3 b/zlib/zlib.3 -index 79d3402..0160e62 100644 ---- a/zlib/zlib.3 -+++ b/zlib/zlib.3 -@@ -1,4 +1,4 @@ --.TH ZLIB 3 "2 May 2012" -+.TH ZLIB 3 "28 Apr 2013" - .SH NAME - zlib \- compression/decompression library - .SH SYNOPSIS -@@ -125,8 +125,8 @@ before asking for help. - Send questions and/or comments to zlib@gzip.org, - or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). - .SH AUTHORS --Version 1.2.7 --Copyright (C) 1995-2012 Jean-loup Gailly (jloup@gzip.org) -+Version 1.2.8 -+Copyright (C) 1995-2013 Jean-loup Gailly (jloup@gzip.org) - and Mark Adler (madler@alumni.caltech.edu). - .LP - This software is provided "as-is," -diff --git a/zlib/zlib.h b/zlib/zlib.h -index 3edf3ac..3e0c767 100644 ---- a/zlib/zlib.h -+++ b/zlib/zlib.h -@@ -1,7 +1,7 @@ - /* zlib.h -- interface of the 'zlib' general purpose compression library -- version 1.2.7, May 2nd, 2012 -+ version 1.2.8, April 28th, 2013 - -- Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler -+ Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages -@@ -37,11 +37,11 @@ - extern "C" { - #endif - --#define ZLIB_VERSION "1.2.7" --#define ZLIB_VERNUM 0x1270 -+#define ZLIB_VERSION "1.2.8" -+#define ZLIB_VERNUM 0x1280 - #define ZLIB_VER_MAJOR 1 - #define ZLIB_VER_MINOR 2 --#define ZLIB_VER_REVISION 7 -+#define ZLIB_VER_REVISION 8 - #define ZLIB_VER_SUBREVISION 0 - - /* -@@ -839,6 +839,21 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, - inflate(). - */ - -+ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm, -+ Bytef *dictionary, -+ uInt *dictLength)); -+/* -+ Returns the sliding dictionary being maintained by inflate. dictLength is -+ set to the number of bytes in the dictionary, and that many bytes are copied -+ to dictionary. dictionary must have enough space, where 32768 bytes is -+ always enough. If inflateGetDictionary() is called with dictionary equal to -+ Z_NULL, then only the dictionary length is returned, and nothing is copied. -+ Similary, if dictLength is Z_NULL, then it is not set. -+ -+ inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the -+ stream state is inconsistent. -+*/ -+ - ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); - /* - Skips invalid compressed data until a possible full flush point (see above -@@ -846,7 +861,7 @@ ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); - available input is skipped. No output is provided. - - inflateSync searches for a 00 00 FF FF pattern in the compressed data. -- All full flush points have this pattern, but not all occurences of this -+ All full flush points have this pattern, but not all occurrences of this - pattern are full flush points. - - inflateSync returns Z_OK if a possible full flush point has been found, -@@ -1007,7 +1022,8 @@ ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, - the version of the header file. - */ - --typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *)); -+typedef unsigned (*in_func) OF((void FAR *, -+ z_const unsigned char FAR * FAR *)); - typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); - - ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, -@@ -1015,11 +1031,12 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, - out_func out, void FAR *out_desc)); - /* - inflateBack() does a raw inflate with a single call using a call-back -- interface for input and output. This is more efficient than inflate() for -- file i/o applications in that it avoids copying between the output and the -- sliding window by simply making the window itself the output buffer. This -- function trusts the application to not change the output buffer passed by -- the output function, at least until inflateBack() returns. -+ interface for input and output. This is potentially more efficient than -+ inflate() for file i/o applications, in that it avoids copying between the -+ output and the sliding window by simply making the window itself the output -+ buffer. inflate() can be faster on modern CPUs when used with large -+ buffers. inflateBack() trusts the application to not change the output -+ buffer passed by the output function, at least until inflateBack() returns. - - inflateBackInit() must be called first to allocate the internal state - and to initialize the state with the user-provided window buffer. -@@ -1736,6 +1753,13 @@ ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); - ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path, - const char *mode)); - #endif -+#if defined(STDC) || defined(Z_HAVE_STDARG_H) -+# ifndef Z_SOLO -+ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file, -+ const char *format, -+ va_list va)); -+# endif -+#endif - - #ifdef __cplusplus - } -diff --git a/zlib/zlib.map b/zlib/zlib.map -index 771f420..55c6647 100644 ---- a/zlib/zlib.map -+++ b/zlib/zlib.map -@@ -76,3 +76,8 @@ ZLIB_1.2.5.2 { - gzgetc_; - inflateResetKeep; - } ZLIB_1.2.5.1; -+ -+ZLIB_1.2.7.1 { -+ inflateGetDictionary; -+ gzvprintf; -+} ZLIB_1.2.5.2; -diff --git a/zlib/zutil.c b/zlib/zutil.c -index e1e463f..5c660c7 100644 ---- a/zlib/zutil.c -+++ b/zlib/zutil.c -@@ -14,7 +14,7 @@ - struct internal_state {int dummy;}; /* for buggy compilers */ - #endif - --const char * const z_errmsg[10] = { -+z_const char * const z_errmsg[10] = { - "need dictionary", /* Z_NEED_DICT 2 */ - "stream end", /* Z_STREAM_END 1 */ - "", /* Z_OK 0 */ -diff --git a/zlib/zutil.h b/zlib/zutil.h -index ed6b127..1b6fbb8 100644 ---- a/zlib/zutil.h -+++ b/zlib/zutil.h -@@ -1,5 +1,5 @@ - /* zutil.h -- internal interface and configuration of the compression library -- * Copyright (C) 1995-2012 Jean-loup Gailly. -+ * Copyright (C) 1995-2013 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -@@ -44,13 +44,13 @@ typedef unsigned short ush; - typedef ush FAR ushf; - typedef unsigned long ulg; - --extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ -+extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ - /* (size given to avoid silly warnings with Visual C++) */ - - #define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)] - - #define ERR_RETURN(strm,err) \ -- return (strm->msg = (char*)ERR_MSG(err), (err)) -+ return (strm->msg = ERR_MSG(err), (err)) - /* To be used only when the state is known to be valid */ - - /* common constants */ -@@ -168,7 +168,8 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ - #endif - - /* provide prototypes for these when building zlib without LFS */ --#if !defined(_WIN32) && (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0) -+#if !defined(_WIN32) && \ -+ (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0) - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); - #endif diff --git a/debian/rules b/debian/rules index 0bebccf..386391a 100755 --- a/debian/rules +++ b/debian/rules @@ -84,6 +84,8 @@ ifeq ($(src_name),binutils) same_source = yes CROSS_ARCHS ?= s390x ppc64el powerpc arm64 armhf armel mips mipsel CROSS_ARCHS += alpha hppa m68k mips64 mips64el powerpcspe ppc64 sh4 sparc64 + CROSS_ARCHS += mipsn32 mipsn32el + #CROSS_ARCHS += mipsr6 mipsr6el mipsn32r6 mipsn32r6el mips64r6 mips64r6el #CROSS_ARCHS += kfreebsd-amd64 kfreebsd-i386 hurd-i386 else # binutils-ports ... @@ -114,6 +116,16 @@ HOST_ARCHS_ppc64 = amd64 i386 x32 ppc64el HOST_ARCHS_sh4 = amd64 i386 x32 HOST_ARCHS_sparc64 = amd64 i386 x32 +HOST_ARCHS_mipsn32 = amd64 i386 x32 +HOST_ARCHS_mipsn32el = amd64 i386 x32 + +HOST_ARCHS_mipsr6 = amd64 i386 x32 +HOST_ARCHS_mipsr6el = amd64 i386 x32 +HOST_ARCHS_mipsn32r6 = amd64 i386 x32 +HOST_ARCHS_mipsn32r6el = amd64 i386 x32 +HOST_ARCHS_mips64r6 = amd64 i386 x32 +HOST_ARCHS_mips64r6el = amd64 i386 x32 + HOST_ARCHS_kfreebsd-amd64 = amd64 i386 x32 HOST_ARCHS_kfreebsd-i386 = amd64 i386 x32 HOST_ARCHS_hurd-i386 = amd64 i386 x32 @@ -179,7 +191,8 @@ SHELL = /bin/bash gold_targets = \ amd64 arm64 armel armhf i386 \ mips mipsel mipsn32 mipsn32el mips64 mips64el \ - powerpc powerpcspe ppc64 ppc64el \ + mipsr6 mipsr6el mipsn32r6 mipsn32r6el mips64r6 mips64r6el \ + powerpc powerpcspe ppc64 ppc64el sparc sparc64 \ x32 kfreebsd-amd64 kfreebsd-i386 hurd-i386 ifneq (,$(filter $(DEB_HOST_ARCH), $(gold_targets))) @@ -192,6 +205,8 @@ with_multiarch := yes CC = gcc CXX = g++ CFLAGS = -g -O2 +CXXFLAGS = -g -O2 +LDFLAGS = STRIP = strip --remove-section=.comment --remove-section=.note CROSS := ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) @@ -264,6 +279,9 @@ endif ifneq (,$(findstring nocross,$(DEB_BUILD_OPTIONS))) with_cross = disabled in DEB_BUILD_OPTIONS endif +ifneq (,$(findstring nohppa,$(DEB_BUILD_OPTIONS))) + with_hppa64 = disabled in DEB_BUILD_OPTIONS +endif # PF is the installation prefix for the package without the leading slash. # It's "usr" for gcc releases, so use this if not explicitly set @@ -343,7 +361,25 @@ DEB_TARGET_MULTIARCH32_mips64 = mips-linux-gnu DEB_TARGET_MULTIARCHN32_mips64 = mips64-linux-gnuabin32 DEB_TARGET_MULTIARCH32_mips64el = mipsel-linux-gnu -DEB_TARGET_MULTIARCHN32_mipselel = mips64el-linux-gnuabin32 +DEB_TARGET_MULTIARCHN32_mips64el = mips64el-linux-gnuabin32 + +DEB_TARGET_MULTIARCH64_mipsr6 = mipsisa64r6-linux-gnuabi64 +DEB_TARGET_MULTIARCHN32_mipsr6 = mipsisa64r6-linux-gnuabin32 + +DEB_TARGET_MULTIARCH64_mipsr6el = mipsisa64r6el-linux-gnuabi64 +DEB_TARGET_MULTIARCHN32_mipsr6el = mipsisa64r6el-linux-gnuabin32 + +DEB_TARGET_MULTIARCH64_mipsn32r6 = mipsisa64r6-linux-gnuabi64 +DEB_TARGET_MULTIARCH32_mipsn32r6 = mipsisa32r6-linux-gnu + +DEB_TARGET_MULTIARCH64_mipsn32r6el = mipsisa64r6el-linux-gnuabi64 +DEB_TARGET_MULTIARCH32_mipsn32r6el = mipsisa32r6el-linux-gnu + +DEB_TARGET_MULTIARCH32_mips64r6 = mipsisa32r6-linux-gnu +DEB_TARGET_MULTIARCHN32_mips64r6 = mipsisa64r6-linux-gnuabin32 + +DEB_TARGET_MULTIARCH32_mips64r6el = mipsisa32r6el-linux-gnu +DEB_TARGET_MULTIARCHN32_mips64r6el = mipsisa64r6el-linux-gnuabin32 DEB_TARGET_MULTIARCH32_arm64 = aarch64_ilp32-linux-gnu @@ -397,6 +433,18 @@ CONFARGS_TARGET_mips64 = --enable-targets=mips64-linux-gnuabin32,mips-linux-gnu CONFARGS_TARGET_mips64el = --enable-targets=mips64el-linux-gnuabin32,mipsel-linux-gnu +CONFARGS_TARGET_mipsr6 = --enable-targets=mipsisa64r6-linux-gnuabi64,mipsisa64r6-linux-gnuabin32 + +CONFARGS_TARGET_mipsr6el = --enable-targets=mipsisa64r6el-linux-gnuabi64,mipsisa64r6el-linux-gnuabin32 + +CONFARGS_TARGET_mipsn32r6 = --enable-targets=mipsisa64r6-linux-gnuabi64,mipsisa32r6-linux-gnu + +CONFARGS_TARGET_mipsn32r6el = --enable-targets=mipsisa64r6el-linux-gnuabi64,mipsisa32r6el-linux-gnu + +CONFARGS_TARGET_mips64r6 = --enable-targets=mipsisa64r6-linux-gnuabin32,mipsisa32r6-linux-gnu + +CONFARGS_TARGET_mips64r6el = --enable-targets=mipsisa64r6el-linux-gnuabin32,mipsisa32r6el-linux-gnu + CONFARGS_TARGET_aarch64 = --enable-targets=aarch64_be-linux-gnu with_check := yes @@ -477,6 +525,8 @@ stamps/control: debian/control.in $(if $(TARGET),debian/control.cross.in) $(if $ ifneq (,$(TARGET)) sed "s/@dpkg_dev@/$(DPKG_DEV)/;/^$$/ q" < debian/control.in > debian/control sed -e "s/@target@/$$(echo -n $(TARGET) | sed s/_/-/g)/" \ + -e "s/@host_archs@/any/" \ + -e 's/@binutils_alt_triplet@//' \ < debian/control.cross.in >> debian/control else sed -e 's/@dpkg_dev@/$(DPKG_DEV)/' \ @@ -526,7 +576,7 @@ endif rm -rf stamps/configure-single builddir-single mkdir builddir-single - cd builddir-single && env CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" \ + cd builddir-single && env CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" \ $(call SET_MULTIARCH_ENV,$(DEB_HOST_ARCH)) \ ../configure --with-sysroot=/ $(SINGLE_CONFARGS) $(MAKE) -C builddir-single configure-host @@ -591,15 +641,22 @@ multiarch_targets = \ m68k-rtems \ mips-linux-gnu \ mipsel-linux-gnu \ + mips64-linux-gnuabin32 \ + mips64el-linux-gnuabin32 \ mips64-linux-gnu \ mips64el-linux-gnu \ + mipsisa32r6-linux-gnu \ + mipsisa32r6el-linux-gnu \ + mipsisa64r6-linux-gnuabin32 \ + mipsisa64r6el-linux-gnuabin32 \ + mipsisa64r6-linux-gnuabi64 \ + mipsisa64r6el-linux-gnuabi64 \ powerpc-linux-gnu \ powerpc64-linux-gnu \ powerpc64le-linux-gnu \ s390-linux-gnu \ s390x-linux-gnu \ sh-linux-gnu \ - sh64-linux-gnu \ sparc-linux-gnu \ sparc64-linux-gnu \ x86_64-linux-gnu \ @@ -619,7 +676,7 @@ stamps/configure-multi: stamps/patch builddir-multi mkdir builddir-multi cd builddir-multi \ - && env CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" \ + && env CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" \ $(call SET_MULTIARCH_ENV,$(DEB_HOST_ARCH)) \ ../configure $(CONFARGS) \ --with-sysroot=/ \ @@ -660,7 +717,7 @@ stamps/configure.%: stamps/patch $(CROSS_CONFARGS) \ $(CONFARGS_TARGET_$(*)) \ --with-sysroot=/ \ - $(if $(filter $*, $(gold_targets)),--enable-ld=default --enable-gold) \ + $(if $(filter $*, $(gold_targets)),--enable-ld=default --enable-gold,--disable-gold) \ --target=$(CROSS_GNU_TYPE) touch $@ @@ -671,7 +728,8 @@ stamps/build.%: stamps/configure.% $(call SET_MULTIARCH_ENV,$*) \ $(MAKE) -C builddir-$* $(NJOBS) \ CFLAGS="$(CFLAGS)" \ - LDFLAGS="-Wl,-z,relro" + CXXFLAGS="$(CXXFLAGS)" \ + LDFLAGS="$(LDFLAGS) -Wl,-z,relro" ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) ifeq ($(with_check),yes) -env MAKE="$(MAKE) VERSION=$(VERSION)-$*" \ @@ -721,6 +779,9 @@ stamps/install.%: stamps/build.% $(if $(CROSS),debian/strip.cross) : # no spu toolchain rm -f $(D_CROSS)/$(PF)/bin/*embedspu + : # Remove windows related manpages + rm -f $(D_CROSS)/$(PF)/share/man/man1/$(CROSS_GNU_TYPE)-{dlltool,nlmconv,windmc,windres}.1 + : # symlink man pages mv $(D_CROSS)/$(PF)/share/man/man1/$(CROSS_GNU_TYPE)-ld.1 \ $(D_CROSS)/$(PF)/share/man/man1/$(CROSS_GNU_TYPE)-ld.bfd.1 @@ -780,7 +841,7 @@ stamps/configure-hppa64: stamps/patch builddir-hppa64 mkdir builddir-hppa64 cd builddir-hppa64 \ - && env CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" ../configure \ + && env CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" ../configure \ $(filter-out --enable-targets=%, $(CONFARGS)) \ --target=hppa64-linux-gnu $(MAKE) -C builddir-hppa64 configure-host @@ -869,7 +930,10 @@ stamps/install: checkroot stamps/build $(install_stamps) $(if $(CROSS),debian/st : # install binutils and -dev stuff env MAKE="$(MAKE) VERSION=$(SINGLE_VERSION)" \ $(MAKE) -C builddir-single \ - CFLAGS="$(CFLAGS)" prefix=$(pwd)/$(d_bin)/$(PF) \ + CFLAGS="$(CFLAGS)" \ + CXXFLAGS="$(CXXFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + prefix=$(pwd)/$(d_bin)/$(PF) \ mandir=$(pwd)/$(d_bin)/$(PF)/share/man \ infodir=$(pwd)/$(d_doc)/$(PF)/share/info install @@ -886,6 +950,8 @@ ifeq ($(with_multiarch),yes) env MAKE="$(MAKE) VERSION=$(MULTI_VERSION)" \ $(MAKE) -C builddir-multi \ CFLAGS="$(CFLAGS)" \ + CXXFLAGS="$(CXXFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ prefix=$(pwd)/$(d_mul)/$(PF) \ mandir=$(pwd)/$(d_mul)/$(PF)/share/man \ infodir=$(pwd)/$(d_doc)/$(PF)/share/info install @@ -918,7 +984,7 @@ endif : # *sigh*, bugs.debian.org/213524 rm -f $(d_doc)/$(PF)/share/info/dir* -ifneq (,$(filter $(DEB_HOST_ARCH),powerpc ppc64 ppc64el)) +ifneq (,$(filter $(DEB_HOST_ARCH),powerpc powerpcspe ppc64 ppc64el)) rm -f $(d_bin)/$(PF)/bin/embedspu endif @@ -943,7 +1009,7 @@ ifeq ($(with_multiarch),yes) rm -f $(d_mul)/$(PF)/bin/ld.bfd rm -f $(d_mul)/$(PF)/bin/ld.gold - ifneq (,$(filter $(DEB_HOST_ARCH),powerpc ppc64 ppc64el)) + ifneq (,$(filter $(DEB_HOST_ARCH),powerpc powerpcspe ppc64 ppc64el)) rm -f $(d_mul)/$(PF)/bin/embedspu endif @@ -1066,7 +1132,7 @@ endif $(d_bin)/$(PF)/share/man/man1/ld.bfd.1 ln -sf ld.bfd $(d_bin)/$(PF)/bin/ld ln -sf $(DEB_HOST_GNU_TYPE)-ld.bfd $(d_bin)/$(PF)/bin/$(DEB_HOST_GNU_TYPE)-ld - ln -sf ld.bfd.1.fz $(d_bin)/$(PF)/share/man/man1/ld.1.gz + ln -sf ld.bfd.1.gz $(d_bin)/$(PF)/share/man/man1/ld.1.gz ln -sf $(DEB_HOST_GNU_TYPE)-ld.bfd.1.gz $(d_bin)/$(PF)/share/man/man1/$(DEB_HOST_GNU_TYPE)-ld.1.gz ifeq ($(with_gold),yes) ln -s ld.gold $(d_bin)/$(PF)/bin/gold @@ -1105,6 +1171,16 @@ endif mv $(d_bin)/$(PF)/share/man/man1/$$i.1 $(d_bin)/$(PF)/share/man/man1/$(DEB_HOST_GNU_TYPE)-$$i.1; \ ln -sf $(DEB_HOST_GNU_TYPE)-$$i.1.gz $(d_bin)/$(PF)/share/man/man1/$$i.1.gz; \ done +ifeq ($(with_multiarch),yes) + @echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXxx + for i in \ + addr2line ar gprof \ + nm objcopy objdump ranlib readelf size strings strip; \ + do \ + mv $(d_mul)/$(PF)/bin/$$i $(d_mul)/$(PF)/bin/$(DEB_HOST_GNU_TYPE)-$$i; \ + done + rm -f $(d_mul)/$(PF)/bin/embedspu +endif ifneq (,$(filter $(DEB_HOST_ARCH),i386 kfreebsd-i386 hurd-i386)) # temporary i586-* symlinks for stretch/sid @@ -1157,6 +1233,8 @@ stamps/install-hppa64: checkroot stamps/build-hppa64 $(if $(CROSS),debian/strip. env MAKE="$(MAKE) VERSION=$(HPPA64_VERSION)" \ $(MAKE) -C builddir-hppa64 \ CFLAGS="$(CFLAGS)" \ + CXXFLAGS="$(CXXFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ prefix=$(pwd)/$(d_hppa64)/$(PF)/ \ mandir=$(pwd)/$(d_hppa64)/$(PF)/share/man \ infodir=$(pwd)/$(d_hppa64)/$(PF)/share/info install @@ -1290,7 +1368,7 @@ binary.%: stamps/install.% install ifeq ($(with_check),yes) : # remove user and date from test-summary for reproducible builds - sed -i -e '/Test Run By/d' test-summary-$* + sed -i -e '/Test Run By/Id' test-summary-$* $(install_file) test-summary-$* \ $(D_CROSS)/$(PF)/share/doc/$(P_CROSS)/test-summary gzip -9nf $(D_CROSS)/$(PF)/share/doc/$(P_CROSS)/test-summary @@ -1317,8 +1395,7 @@ endif -e 's/@ARCH@/$*/g' \ -e "s/@PKG@/$(P_CROSS)/g" \ debian/binutils-cross.shlibs.in > $(D_CROSS)/DEBIAN/shlibs - $(install_script) debian/binutils.postinst $(D_CROSS)/DEBIAN/postinst - $(install_script) debian/binutils.postrm $(D_CROSS)/DEBIAN/postrm + $(install_file) debian/binutils.triggers $(D_CROSS)/DEBIAN/triggers rm -f debian/substvars dpkg-shlibdeps $(D_CROSS)/$(PF)/bin/* @@ -1378,6 +1455,8 @@ else -e "s/@DEB_NVER@/$$nver/g" \ -e "s/@DATE_EXT@/$$date_ext/g" \ -e 's/@DEB_ARCH@/$(DEB_HOST_ARCH)/g' \ + -e 's/@DEB_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' \ + -e 's/@DEB_TRIPLET@/$(DEB_HOST_GNU_TYPE)/g' \ -e "s/@dpkg_dev@/$(DPKG_DEV)/" \ $$i > $${i%*.in}; \ case "$$i" in *.post*|*.pre*) chmod 755 $${i%*.in}; esac; \ @@ -1409,10 +1488,9 @@ ifeq ($(with_hppa64),yes) $(d_hppa64)/$(PF)/share/lintian/overrides/$(p_hppa64) endif - : # install maintainer scrtips + : # install maintainer scripts $(install_dir) $(d_bin)/DEBIAN - $(install_script) debian/binutils.postinst $(d_bin)/DEBIAN/postinst - $(install_script) debian/binutils.postrm $(d_bin)/DEBIAN/postrm + $(install_file) debian/binutils.triggers $(d_bin)/DEBIAN/triggers $(install_file) debian/binutils.shlibs $(d_bin)/DEBIAN/shlibs $(install_dir) $(d_dev)/DEBIAN @@ -1424,13 +1502,13 @@ ifeq ($(with_multiarch),yes) $(install_script) debian/binutils-multiarch.prerm $(d_mul)/DEBIAN/prerm $(install_script) debian/binutils-multiarch.postrm $(d_mul)/DEBIAN/postrm $(install_file) debian/binutils-multiarch.shlibs $(d_mul)/DEBIAN/shlibs + $(install_file) debian/binutils.triggers $(d_mul)/DEBIAN/triggers $(install_dir) $(d_mdev)/DEBIAN endif ifeq ($(with_hppa64),yes) $(install_dir) $(d_hppa64)/DEBIAN - $(install_script) debian/$(p_hppa64).postinst $(d_hppa64)/DEBIAN/postinst - $(install_script) debian/$(p_hppa64).postrm $(d_hppa64)/DEBIAN/postrm + $(install_file) debian/binutils.triggers $(d_hppa64)/DEBIAN/triggers $(install_file) debian/$(p_hppa64).shlibs $(d_hppa64)/DEBIAN/shlibs endif @@ -1455,7 +1533,7 @@ endif ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) ifeq ($(with_check),yes) : # remove user and date from test-summary for reproducible builds - sed -i -e '/Test Run By/d' $(pwd)/test-summary + sed -i -e '/Test Run By/Id' $(pwd)/test-summary $(install_file) $(pwd)/test-summary $(d_bin)/$(PF)/share/doc/$(p_bin)/ endif endif @@ -1585,7 +1663,7 @@ stamps/configure-cross: stamps/patch rm -rf stamps/configure-cross builddir-$(TARGET) mkdir builddir-$(TARGET) cd builddir-$(TARGET) \ - && env CC="$(CC)" CXX="$(CXX)" ../configure \ + && env CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" ../configure \ $(CONFARGS) \ --target=$(TARGET) touch $@ @@ -1594,7 +1672,8 @@ stamps/build-cross: stamps/configure-cross $(checkdir) test "" != "$(TARGET)" env MAKE="$(MAKE) VERSION=$(VERSION)-$(DEB_TARGET_ARCH)" \ - $(MAKE) -C builddir-$(TARGET) $(NJOBS) CFLAGS="$(CFLAGS)" + $(MAKE) -C builddir-$(TARGET) $(NJOBS) \ + CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" touch $@ stamps/install-cross: stamps/build-cross @@ -1624,13 +1703,15 @@ stamps/install-cross: stamps/build-cross stamps/configure-host-cross: stamps/configure-cross $(checkdir) test "" != "$(TARGET)" - $(MAKE) configure-host -C builddir-$(TARGET) $(NJOBS) CFLAGS="$(CFLAGS)" + $(MAKE) configure-host -C builddir-$(TARGET) $(NJOBS) \ + CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" touch $@ stamps/build-static-cross: stamps/configure-host-cross $(checkdir) test "" != "$(TARGET)" - $(MAKE) -C builddir-$(TARGET) $(NJOBS) CFLAGS="$(CFLAGS)" LDFLAGS="-all-static" + $(MAKE) -C builddir-$(TARGET) $(NJOBS) \ + CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS) -all-static" touch $@ stamps/install-static-cross: stamps/build-static-cross stamps/install-cross @@ -1664,6 +1745,7 @@ endef endif remove-gfdl-files: + rm -rf .git* .cvs* gdb libdecnumber readline sim ifeq ($(GFDL_INVARIANT_FREE),yes) for i in $(gfdl_toplevel_texinfo_files); do \ if [ -f $$i ]; then \ |