DC-Build-Header: hardening-wrapper 2.2 / Mon Jul 09 20:36:35 +0000 2012 DC-Task: logfile:/tmp/hardening-wrapper_2.2_unstable_clang.log version:2.2 modes:clang chroot:unstable source:hardening-wrapper esttime:80 architecture:any DC-Sbuild-call: su user -c 'sbuild -n -A -s --force-orig-source --apt-update -d unstable -v --chroot-setup-commands=/tmp/switch-to-clang hardening-wrapper_2.2' sbuild (Debian sbuild) 0.62.5 (13 Jul 2011) on ip-10-28-247-130.ec2.internal ╔══════════════════════════════════════════════════════════════════════════════╗ ║ hardening-wrapper 2.2 (amd64) 09 Jul 2012 20:36 ║ ╚══════════════════════════════════════════════════════════════════════════════╝ Package: hardening-wrapper Version: 2.2 Source Version: 2.2 Distribution: unstable Architecture: amd64 I: NOTICE: Log filtering will replace 'build/hardening-wrapper-yzaySd/hardening-wrapper-2.2' with '«PKGBUILDDIR»' I: NOTICE: Log filtering will replace 'build/hardening-wrapper-yzaySd' with '«BUILDDIR»' I: NOTICE: Log filtering will replace 'var/lib/schroot/mount/unstable-amd64-sbuild-bfc92828-1796-4a8f-a144-69ffe6c4e52d' with '«CHROOT»' ┌──────────────────────────────────────────────────────────────────────────────┐ │ Update chroot │ └──────────────────────────────────────────────────────────────────────────────┘ Ign http://localhost unstable InRelease Hit http://localhost unstable Release.gpg Hit http://localhost unstable Release Ign http://localhost unstable/main Sources/DiffIndex Ign http://localhost unstable/main amd64 Packages/DiffIndex Hit http://localhost unstable/main Translation-en/DiffIndex Hit http://localhost unstable/main Sources Hit http://localhost unstable/main amd64 Packages Reading package lists... Reading package lists... Building dependency tree... Reading state information... 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. ┌──────────────────────────────────────────────────────────────────────────────┐ │ Fetch source files │ └──────────────────────────────────────────────────────────────────────────────┘ Check APT ───────── Checking available source versions... Download source files with APT ────────────────────────────── Reading package lists... Building dependency tree... Reading state information... NOTICE: 'hardening-wrapper' packaging is maintained in the 'Bzr' version control system at: http://anonscm.debian.org/bzr/hardening/master Please use: bzr branch http://anonscm.debian.org/bzr/hardening/master to retrieve the latest (possibly unreleased) updates to the package. Need to get 22.3 kB of source archives. Get:1 http://localhost/debian/ unstable/main hardening-wrapper 2.2 (dsc) [1860 B] Get:2 http://localhost/debian/ unstable/main hardening-wrapper 2.2 (tar) [20.4 kB] Fetched 22.3 kB in 0s (176 kB/s) Download complete and in download only mode Check arch ────────── ┌──────────────────────────────────────────────────────────────────────────────┐ │ Chroot Setup Commands │ └──────────────────────────────────────────────────────────────────────────────┘ /tmp/switch-to-clang ──────────────────── + echo 'Entering customization script...' Entering customization script... + apt-get update Ign http://localhost unstable InRelease Hit http://localhost unstable Release.gpg Hit http://localhost unstable Release Ign http://localhost unstable/main Sources/DiffIndex Ign http://localhost unstable/main amd64 Packages/DiffIndex Hit http://localhost unstable/main Translation-en/DiffIndex Hit http://localhost unstable/main Sources Hit http://localhost unstable/main amd64 Packages Reading package lists... + echo 'Install of clang' Install of clang + apt-get update Ign http://localhost unstable InRelease Hit http://localhost unstable Release.gpg Hit http://localhost unstable Release Ign http://localhost unstable/main Sources/DiffIndex Ign http://localhost unstable/main amd64 Packages/DiffIndex Hit http://localhost unstable/main Translation-en/DiffIndex Hit http://localhost unstable/main Sources Hit http://localhost unstable/main amd64 Packages Reading package lists... + apt-get install --yes --no-install-recommends clang -t unstable Reading package lists... Building dependency tree... Reading state information... The following extra packages will be installed: libclang-common-dev libffi5 libllvm3.1 Recommended packages: llvm-3.1-dev python The following NEW packages will be installed: clang libclang-common-dev libffi5 libllvm3.1 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. Need to get 13.1 MB of archives. After this operation, 35.6 MB of additional disk space will be used. Get:1 http://localhost/debian/ unstable/main libffi5 amd64 3.0.10-3 [24.8 kB] Get:2 http://localhost/debian/ unstable/main libllvm3.1 amd64 3.1-2 [7275 kB] Get:3 http://localhost/debian/ unstable/main libclang-common-dev amd64 3.1-8 [84.3 kB] Get:4 http://localhost/debian/ unstable/main clang amd64 3.1-8 [5755 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 13.1 MB in 0s (29.9 MB/s) Selecting previously unselected package libffi5:amd64. (Reading database ... 11729 files and directories currently installed.) Unpacking libffi5:amd64 (from .../libffi5_3.0.10-3_amd64.deb) ... Selecting previously unselected package libllvm3.1:amd64. Unpacking libllvm3.1:amd64 (from .../libllvm3.1_3.1-2_amd64.deb) ... Selecting previously unselected package libclang-common-dev. Unpacking libclang-common-dev (from .../libclang-common-dev_3.1-8_amd64.deb) ... Selecting previously unselected package clang. Unpacking clang (from .../archives/clang_3.1-8_amd64.deb) ... Setting up libffi5:amd64 (3.0.10-3) ... Setting up libllvm3.1:amd64 (3.1-2) ... Setting up libclang-common-dev (3.1-8) ... Setting up clang (3.1-8) ... + echo 'Replace gcc, g++ & cpp by clang' Replace gcc, g++ & cpp by clang + VERSION=4.7 + cd /usr/bin + rm g++-4.7 gcc-4.7 cpp-4.7 + ln -s clang++ g++-4.7 + ln -s clang gcc-4.7 + ln -s clang cpp-4.7 + cd - /«BUILDDIR» + echo 'Block the installation of new gcc version' Block the installation of new gcc version + dpkg --set-selections + echo 'gcc-4.6 hold' + dpkg --set-selections + echo 'cpp-4.6 hold' + dpkg --set-selections + echo 'g++-4.6 hold' + dpkg --set-selections + echo 'gcc-4.7 hold' + dpkg --set-selections + echo 'cpp-4.7 hold' + dpkg --set-selections + echo 'g++-4.7 hold' + echo 'Check if gcc, g++ & cpp are actually clang' Check if gcc, g++ & cpp are actually clang + grep clang + gcc --version I: Finished running '/tmp/switch-to-clang'. Finished processing commands. ──────────────────────────────────────────────────────────────────────────────── Merged Build-Depends: build-essential, fakeroot Filtered Build-Depends: build-essential, fakeroot dpkg-deb: building package `sbuild-build-depends-core-dummy' in `/«BUILDDIR»/resolver-FqrPhm/apt_archive/sbuild-build-depends-core-dummy.deb'. OK Reading package lists... ┌──────────────────────────────────────────────────────────────────────────────┐ │ Install core build dependencies (apt-based resolver) │ └──────────────────────────────────────────────────────────────────────────────┘ Installing build dependencies Reading package lists... Building dependency tree... Reading state information... The following NEW packages will be installed: sbuild-build-depends-core-dummy debconf: delaying package configuration, since apt-utils is not installed 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/708 B of archives. After this operation, 0 B of additional disk space will be used. Selecting previously unselected package sbuild-build-depends-core-dummy. (Reading database ... 11809 files and directories currently installed.) Unpacking sbuild-build-depends-core-dummy (from .../sbuild-build-depends-core-dummy.deb) ... Setting up sbuild-build-depends-core-dummy (0.invalid.0) ... Merged Build-Depends: base-files, base-passwd, bash, coreutils, dash, debianutils, diffutils, dpkg, e2fsprogs, findutils, grep, gzip, hostname, ncurses-base, ncurses-bin, perl-base, sed, login, sysvinit-utils, sysvinit, tar, bsdutils, mount, util-linux, libc6-dev | libc-dev, gcc (>= 4:4.4.3), g++ (>= 4:4.4.3), make, dpkg-dev (>= 1.13.5), debhelper (>= 9), perl-base (>= 5.10) Filtered Build-Depends: base-files, base-passwd, bash, coreutils, dash, debianutils, diffutils, dpkg, e2fsprogs, findutils, grep, gzip, hostname, ncurses-base, ncurses-bin, perl-base, sed, login, sysvinit-utils, sysvinit, tar, bsdutils, mount, util-linux, libc6-dev, gcc (>= 4:4.4.3), g++ (>= 4:4.4.3), make, dpkg-dev (>= 1.13.5), debhelper (>= 9), perl-base (>= 5.10) dpkg-deb: building package `sbuild-build-depends-hardening-wrapper-dummy' in `/«BUILDDIR»/resolver-Xaa9tN/apt_archive/sbuild-build-depends-hardening-wrapper-dummy.deb'. OK Reading package lists... ┌──────────────────────────────────────────────────────────────────────────────┐ │ Install hardening-wrapper build dependencies (apt-based resolver) │ └──────────────────────────────────────────────────────────────────────────────┘ Installing build dependencies Reading package lists... Building dependency tree... Reading state information... The following extra packages will be installed: bsdmainutils debhelper file gettext gettext-base groff-base html2text intltool-debian libasprintf0c2 libcroco3 libgettextpo0 libglib2.0-0 libmagic1 libpcre3 libpipeline1 libunistring0 libxml2 man-db po-debconf Suggested packages: wamerican wordlist whois vacation dh-make gettext-doc groff less www-browser libmail-box-perl Recommended packages: curl wget lynx-cur autopoint libglib2.0-data shared-mime-info xml-core libmail-sendmail-perl The following NEW packages will be installed: bsdmainutils debhelper file gettext gettext-base groff-base html2text intltool-debian libasprintf0c2 libcroco3 libgettextpo0 libglib2.0-0 libmagic1 libpcre3 libpipeline1 libunistring0 libxml2 man-db po-debconf sbuild-build-depends-hardening-wrapper-dummy 0 upgraded, 20 newly installed, 0 to remove and 0 not upgraded. Need to get 9884 kB/9885 kB of archives. After this operation, 25.3 MB of additional disk space will be used. Get:1 http://localhost/debian/ unstable/main libpipeline1 amd64 1.2.1-1 [39.2 kB] Get:2 http://localhost/debian/ unstable/main libasprintf0c2 amd64 0.18.1.1-9 [26.8 kB] Get:3 http://localhost/debian/ unstable/main libmagic1 amd64 5.11-2 [202 kB] Get:4 http://localhost/debian/ unstable/main libpcre3 amd64 1:8.30-5 [242 kB] Get:5 http://localhost/debian/ unstable/main libxml2 amd64 2.8.0+dfsg1-4 [903 kB] Get:6 http://localhost/debian/ unstable/main libglib2.0-0 amd64 2.32.3-1 [2081 kB] Get:7 http://localhost/debian/ unstable/main libcroco3 amd64 0.6.5-1 [151 kB] Get:8 http://localhost/debian/ unstable/main libunistring0 amd64 0.9.3-5 [434 kB] Get:9 http://localhost/debian/ unstable/main libgettextpo0 amd64 0.18.1.1-9 [145 kB] Get:10 http://localhost/debian/ unstable/main bsdmainutils amd64 9.0.3 [209 kB] Get:11 http://localhost/debian/ unstable/main groff-base amd64 1.21-9 [1153 kB] Get:12 http://localhost/debian/ unstable/main man-db amd64 2.6.2-1 [1061 kB] Get:13 http://localhost/debian/ unstable/main file amd64 5.11-2 [51.8 kB] Get:14 http://localhost/debian/ unstable/main gettext-base amd64 0.18.1.1-9 [154 kB] Get:15 http://localhost/debian/ unstable/main html2text amd64 1.3.2a-15 [103 kB] Get:16 http://localhost/debian/ unstable/main gettext amd64 0.18.1.1-9 [1975 kB] Get:17 http://localhost/debian/ unstable/main intltool-debian all 0.35.0+20060710.1 [30.8 kB] Get:18 http://localhost/debian/ unstable/main po-debconf all 1.0.16+nmu2 [224 kB] Get:19 http://localhost/debian/ unstable/main debhelper all 9.20120608 [700 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 9884 kB in 0s (25.3 MB/s) Selecting previously unselected package libpipeline1:amd64. (Reading database ... 11809 files and directories currently installed.) Unpacking libpipeline1:amd64 (from .../libpipeline1_1.2.1-1_amd64.deb) ... Selecting previously unselected package libasprintf0c2:amd64. Unpacking libasprintf0c2:amd64 (from .../libasprintf0c2_0.18.1.1-9_amd64.deb) ... Selecting previously unselected package libmagic1:amd64. Unpacking libmagic1:amd64 (from .../libmagic1_5.11-2_amd64.deb) ... Selecting previously unselected package libpcre3:amd64. Unpacking libpcre3:amd64 (from .../libpcre3_1%3a8.30-5_amd64.deb) ... Selecting previously unselected package libxml2:amd64. Unpacking libxml2:amd64 (from .../libxml2_2.8.0+dfsg1-4_amd64.deb) ... Selecting previously unselected package libglib2.0-0:amd64. Unpacking libglib2.0-0:amd64 (from .../libglib2.0-0_2.32.3-1_amd64.deb) ... Selecting previously unselected package libcroco3:amd64. Unpacking libcroco3:amd64 (from .../libcroco3_0.6.5-1_amd64.deb) ... Selecting previously unselected package libunistring0:amd64. Unpacking libunistring0:amd64 (from .../libunistring0_0.9.3-5_amd64.deb) ... Selecting previously unselected package libgettextpo0:amd64. Unpacking libgettextpo0:amd64 (from .../libgettextpo0_0.18.1.1-9_amd64.deb) ... Selecting previously unselected package bsdmainutils. Unpacking bsdmainutils (from .../bsdmainutils_9.0.3_amd64.deb) ... Selecting previously unselected package groff-base. Unpacking groff-base (from .../groff-base_1.21-9_amd64.deb) ... Selecting previously unselected package man-db. Unpacking man-db (from .../man-db_2.6.2-1_amd64.deb) ... Selecting previously unselected package file. Unpacking file (from .../archives/file_5.11-2_amd64.deb) ... Selecting previously unselected package gettext-base. Unpacking gettext-base (from .../gettext-base_0.18.1.1-9_amd64.deb) ... Selecting previously unselected package html2text. Unpacking html2text (from .../html2text_1.3.2a-15_amd64.deb) ... Selecting previously unselected package gettext. Unpacking gettext (from .../gettext_0.18.1.1-9_amd64.deb) ... Selecting previously unselected package intltool-debian. Unpacking intltool-debian (from .../intltool-debian_0.35.0+20060710.1_all.deb) ... Selecting previously unselected package po-debconf. Unpacking po-debconf (from .../po-debconf_1.0.16+nmu2_all.deb) ... Selecting previously unselected package debhelper. Unpacking debhelper (from .../debhelper_9.20120608_all.deb) ... Selecting previously unselected package sbuild-build-depends-hardening-wrapper-dummy. Unpacking sbuild-build-depends-hardening-wrapper-dummy (from .../sbuild-build-depends-hardening-wrapper-dummy.deb) ... Setting up libpipeline1:amd64 (1.2.1-1) ... Setting up libasprintf0c2:amd64 (0.18.1.1-9) ... Setting up libmagic1:amd64 (5.11-2) ... Setting up libpcre3:amd64 (1:8.30-5) ... Setting up libxml2:amd64 (2.8.0+dfsg1-4) ... Setting up libglib2.0-0:amd64 (2.32.3-1) ... No schema files found: doing nothing. Setting up libcroco3:amd64 (0.6.5-1) ... Setting up libunistring0:amd64 (0.9.3-5) ... Setting up libgettextpo0:amd64 (0.18.1.1-9) ... Setting up bsdmainutils (9.0.3) ... update-alternatives: using /usr/bin/bsd-write to provide /usr/bin/write (write) in auto mode update-alternatives: using /usr/bin/bsd-from to provide /usr/bin/from (from) in auto mode Setting up groff-base (1.21-9) ... Setting up man-db (2.6.2-1) ... Building database of manual pages ... Setting up file (5.11-2) ... Setting up gettext-base (0.18.1.1-9) ... Setting up html2text (1.3.2a-15) ... Setting up gettext (0.18.1.1-9) ... Setting up intltool-debian (0.35.0+20060710.1) ... Setting up po-debconf (1.0.16+nmu2) ... Setting up debhelper (9.20120608) ... Setting up sbuild-build-depends-hardening-wrapper-dummy (0.invalid.0) ... ┌──────────────────────────────────────────────────────────────────────────────┐ │ Build environment │ └──────────────────────────────────────────────────────────────────────────────┘ Kernel: Linux 2.6.32-5-xen-amd64 amd64 (x86_64) Toolchain package versions: binutils_2.22-7 dpkg-dev_1.16.7 g++-4.6_4.6.3-8 g++-4.7_4.7.1-3 gcc-4.6_4.6.3-8 gcc-4.7_4.7.1-3 libc6-dev_2.13-34 libstdc++6_4.7.1-3 libstdc++6-4.6-dev_4.6.3-8 libstdc++6-4.7-dev_4.7.1-3 linux-libc-dev_3.2.21-3 Package versions: apt_0.9.7.1 base-files_6.11 base-passwd_3.5.26 bash_4.2-3 binutils_2.22-7 bsdmainutils_9.0.3 bsdutils_1:2.20.1-5.1 build-essential_11.5 bzip2_1.0.6-3 clang_3.1-8 coreutils_8.13-3.2 cpp_4:4.7.1-1 cpp-4.6_4.6.3-8 cpp-4.7_4.7.1-3 dash_0.5.7-3 debconf_1.5.45 debconf-i18n_1.5.45 debfoster_2.7-1.1 debhelper_9.20120608 debian-archive-keyring_2012.4 debianutils_4.3.2 diffutils_1:3.2-6 dpkg_1.16.7 dpkg-dev_1.16.7 e2fslibs_1.42.4-3 e2fsprogs_1.42.4-3 fakeroot_1.18.4-2 file_5.11-2 findutils_4.4.2-4 g++_4:4.7.1-1 g++-4.6_4.6.3-8 g++-4.7_4.7.1-3 gcc_4:4.7.1-1 gcc-4.4-base_4.4.7-1 gcc-4.5-base_4.5.4-1 gcc-4.6_4.6.3-8 gcc-4.6-base_4.6.3-8 gcc-4.7_4.7.1-3 gcc-4.7-base_4.7.1-3 gettext_0.18.1.1-9 gettext-base_0.18.1.1-9 gnupg_1.4.12-4+b1 gpgv_1.4.12-4+b1 grep_2.12-2 groff-base_1.21-9 gzip_1.5-1.1 hostname_3.11 html2text_1.3.2a-15 initscripts_2.88dsf-28 insserv_1.14.0-4 intltool-debian_0.35.0+20060710.1 libacl1_2.2.51-8 libapt-pkg4.12_0.9.7.1 libasprintf0c2_0.18.1.1-9 libattr1_1:2.4.46-8 libblkid1_2.20.1-5.1 libbz2-1.0_1.0.6-3 libc-bin_2.13-34 libc-dev-bin_2.13-34 libc6_2.13-34 libc6-dev_2.13-34 libclang-common-dev_3.1-8 libclass-isa-perl_0.36-3 libcomerr2_1.42.4-3 libcroco3_0.6.5-1 libdb5.1_5.1.29-5 libdpkg-perl_1.16.7 libffi5_3.0.10-3 libfile-fcntllock-perl_0.14-2 libgc1c2_1:7.1-8 libgcc1_1:4.7.1-3 libgdbm3_1.8.3-11 libgettextpo0_0.18.1.1-9 libglib2.0-0_2.32.3-1 libgmp10_2:5.0.5+dfsg-2 libgomp1_4.7.1-3 libitm1_4.7.1-3 libllvm3.1_3.1-2 liblocale-gettext-perl_1.05-7+b1 liblzma5_5.1.1alpha+20120614-1 libmagic1_5.11-2 libmount1_2.20.1-5.1 libmpc2_0.9-4 libmpfr4_3.1.0-5 libncurses5_5.9-10 libpam-modules_1.1.3-7.1 libpam-modules-bin_1.1.3-7.1 libpam-runtime_1.1.3-7.1 libpam0g_1.1.3-7.1 libpcre3_1:8.30-5 libpipeline1_1.2.1-1 libquadmath0_4.7.1-3 libreadline6_6.2-8 libselinux1_2.1.9-5 libsemanage-common_2.1.6-6 libsemanage1_2.1.6-6 libsepol1_2.1.4-3 libslang2_2.2.4-15 libss2_1.42.4-3 libstdc++6_4.7.1-3 libstdc++6-4.6-dev_4.6.3-8 libstdc++6-4.7-dev_4.7.1-3 libswitch-perl_2.16-2 libtext-charwidth-perl_0.04-7+b1 libtext-iconv-perl_1.7-5 libtext-wrapi18n-perl_0.06-7 libtimedate-perl_1.2000-1 libtinfo5_5.9-10 libunistring0_0.9.3-5 libusb-0.1-4_2:0.1.12-23 libustr-1.0-1_1.0.4-3 libuuid1_2.20.1-5.1 libxml2_2.8.0+dfsg1-4 linux-libc-dev_3.2.21-3 login_1:4.1.5.1-1 lsb-base_4.1+Debian7 make_3.81-8.2 man-db_2.6.2-1 mawk_1.3.3-17 mount_2.20.1-5.1 multiarch-support_2.13-34 ncurses-base_5.9-10 ncurses-bin_5.9-10 passwd_1:4.1.5.1-1 patch_2.6.1-3 perl_5.14.2-12 perl-base_5.14.2-12 perl-modules_5.14.2-12 po-debconf_1.0.16+nmu2 readline-common_6.2-8 sbuild-build-depends-core-dummy_0.invalid.0 sbuild-build-depends-hardening-wrapper-dummy_0.invalid.0 sed_4.2.1-10 sensible-utils_0.0.7 sysv-rc_2.88dsf-28 sysvinit_2.88dsf-28 sysvinit-utils_2.88dsf-28 tar_1.26-4 tzdata_2012c-1 ucf_3.0025+nmu3 util-linux_2.20.1-5.1 xz-utils_5.1.1alpha+20120614-1 zlib1g_1:1.2.7.dfsg-13 ┌──────────────────────────────────────────────────────────────────────────────┐ │ Build │ └──────────────────────────────────────────────────────────────────────────────┘ Unpack source ───────────── gpgv: keyblock resource `/sbuild-nonexistent/.gnupg/trustedkeys.gpg': file open error gpgv: Signature made Thu Jun 14 16:42:47 2012 UTC using RSA key ID DC6DC026 gpgv: Can't check signature: public key not found dpkg-source: warning: failed to verify signature on ./hardening-wrapper_2.2.dsc dpkg-source: info: extracting hardening-wrapper in hardening-wrapper-2.2 dpkg-source: info: unpacking hardening-wrapper_2.2.tar.gz Check disc space ──────────────── Sufficient free space for build User Environment ──────────────── HOME=/sbuild-nonexistent LOGNAME=root PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11 SCHROOT_CHROOT_NAME=unstable-amd64-sbuild SCHROOT_COMMAND=env SCHROOT_GID=0 SCHROOT_GROUP=root SCHROOT_SESSION_ID=unstable-amd64-sbuild-bfc92828-1796-4a8f-a144-69ffe6c4e52d SCHROOT_UID=0 SCHROOT_USER=root SHELL=/bin/sh USER=root dpkg-buildpackage ───────────────── dpkg-buildpackage: warning: using a gain-root-command while being root dpkg-buildpackage: source package hardening-wrapper dpkg-buildpackage: source version 2.2 dpkg-buildpackage: source changed by Kees Cook dpkg-source --before-build hardening-wrapper-2.2 dpkg-buildpackage: host architecture amd64 fakeroot debian/rules clean dh clean dh_testdir dh_auto_clean make[1]: Entering directory `/«PKGBUILDDIR»' rm -rf build-tree make[1]: Leaving directory `/«PKGBUILDDIR»' dh_clean dpkg-source -b hardening-wrapper-2.2 dpkg-source: info: using source format `3.0 (native)' dpkg-source: info: building hardening-wrapper in hardening-wrapper_2.2.tar.gz dpkg-source: info: building hardening-wrapper in hardening-wrapper_2.2.dsc debian/rules build dh build dh_testdir dh_auto_configure dh_auto_build make[1]: Entering directory `/«PKGBUILDDIR»' if [ -z "amd64" ]; then echo No DEB_HOST_ARCH; exit 1; fi if [ -z "linux" ]; then echo No DEB_HOST_ARCH_OS; exit 1; fi mkdir -p build-tree # Construct wrappers. install hardened-cc hardened-ld build-tree/ # Set defaults, based on OS and ARCH. perl -pi -e 's/ #OS#/ '"linux"'/; s/ #ARCH#/ '"amd64"'/;' build-tree/hardened-cc build-tree/hardened-ld perl -pi -e "s/default{'DEB_BUILD_HARDENING_PIE'}=1;/default{'DEB_BUILD_HARDENING_PIE'}=1;/;" build-tree/hardened-cc build-tree/hardened-ld perl -pi -e "s/default{'DEB_BUILD_HARDENING_STACKPROTECTOR'}=1;/default{'DEB_BUILD_HARDENING_STACKPROTECTOR'}=1;/;" build-tree/hardened-cc build-tree/hardened-ld # Duplicate cc wrapper to c++. install build-tree/hardened-cc build-tree/hardened-c++ perl -pi -e 's/hardened-cc/hardened-c++/g; s|/usr/bin/cc|/usr/bin/c++|g;' build-tree/hardened-c++ # Construct tools. install hardening.make hardening-check build-tree/ # Do not use "shell" here because it eats newlines. We want those. perl -pi -e "s/^my %libc;/my %libc = (\n$(perl hardening-check --find-libc-functions /bin/ls)\n);/;" build-tree/hardening-check # Construct man pages. install hardened-cc.1 hardened-ld.1 build-tree/ pod2man hardening-check > build-tree/hardening-check.1 # Duplicate cc man page to c++. install build-tree/hardened-cc.1 build-tree/hardened-c++.1 perl -pi -e 's/hardened-cc/hardened-c++/g; s/gcc/g++/g;' build-tree/hardened-c++.1 touch build-tree/stamp-build make[1]: Leaving directory `/«PKGBUILDDIR»' dh_auto_test make[1]: Entering directory `/«PKGBUILDDIR»' make -C tests check make[2]: Entering directory `/«PKGBUILDDIR»/tests' # Check the stack protector and PIE options directly, just to have # a historical record in the build logs. cc -Wall -fstack-protector hello.c -o ../build-tree/cc-test || true ../build-tree/cc-test || true ../build-tree/cc-test: ok (0x4005c0) cc -Wall -fPIE -pie hello.c -o ../build-tree/cc-test || true ../build-tree/cc-test || true ../build-tree/cc-test: ok (0x2afe869388d0) ../build-tree/cc-test || true ../build-tree/cc-test: ok (0x2b3ede5288d0) make -f Makefile.wrapper check make[3]: Entering directory `/«PKGBUILDDIR»/tests' # Test basic perl syntax for script in ../build-tree/hardened-cc ../build-tree/hardened-ld ../build-tree/hardened-c++; do perl -c $script; done ../build-tree/hardened-cc syntax OK ../build-tree/hardened-ld syntax OK ../build-tree/hardened-c++ syntax OK touch syntax.stamp # Compiler and linker options disabled. DEB_BUILD_HARDENING=0 ../build-tree/hardened-cc -B ../build-tree/ -o ../build-tree/wrapper-test-stock hello.c /usr/bin/clang -B ../build-tree/ -o ../build-tree/wrapper-test-stock hello.c readelf -ldrsW ../build-tree/wrapper-test-stock Elf file type is EXEC (Executable file) Entry point 0x400440 There are 8 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000040 0x0000000000400040 0x0000000000400040 0x0001c0 0x0001c0 R E 0x8 INTERP 0x000200 0x0000000000400200 0x0000000000400200 0x00001c 0x00001c R 0x1 [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2] LOAD 0x000000 0x0000000000400000 0x0000000000400000 0x0007b4 0x0007b4 R E 0x200000 LOAD 0x0007b8 0x00000000006007b8 0x00000000006007b8 0x000240 0x000248 RW 0x200000 DYNAMIC 0x0007d0 0x00000000006007d0 0x00000000006007d0 0x0001e0 0x0001e0 RW 0x8 NOTE 0x00021c 0x000000000040021c 0x000000000040021c 0x000044 0x000044 R 0x4 GNU_EH_FRAME 0x0006bc 0x00000000004006bc 0x00000000004006bc 0x000034 0x000034 R 0x4 GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW 0x8 Section to Segment mapping: Segment Sections... 00 01 .interp 02 .interp .note.ABI-tag .note.gnu.build-id .hash .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rela.dyn .rela.plt .init .plt .text .fini .rodata .eh_frame_hdr .eh_frame 03 .init_array .fini_array .jcr .dynamic .got .got.plt .data .bss 04 .dynamic 05 .note.ABI-tag .note.gnu.build-id 06 .eh_frame_hdr 07 Dynamic section at offset 0x7d0 contains 25 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x000000000000000c (INIT) 0x4003f0 0x000000000000000d (FINI) 0x40069c 0x0000000000000019 (INIT_ARRAY) 0x6007b8 0x000000000000001b (INIT_ARRAYSZ) 8 (bytes) 0x000000000000001a (FINI_ARRAY) 0x6007c0 0x000000000000001c (FINI_ARRAYSZ) 8 (bytes) 0x0000000000000004 (HASH) 0x400260 0x000000006ffffef5 (GNU_HASH) 0x400288 0x0000000000000005 (STRTAB) 0x400320 0x0000000000000006 (SYMTAB) 0x4002a8 0x000000000000000a (STRSZ) 65 (bytes) 0x000000000000000b (SYMENT) 24 (bytes) 0x0000000000000015 (DEBUG) 0x0 0x0000000000000003 (PLTGOT) 0x6009b8 0x0000000000000002 (PLTRELSZ) 72 (bytes) 0x0000000000000014 (PLTREL) RELA 0x0000000000000017 (JMPREL) 0x4003a8 0x0000000000000007 (RELA) 0x400390 0x0000000000000008 (RELASZ) 24 (bytes) 0x0000000000000009 (RELAENT) 24 (bytes) 0x000000006ffffffe (VERNEED) 0x400370 0x000000006fffffff (VERNEEDNUM) 1 0x000000006ffffff0 (VERSYM) 0x400362 0x0000000000000000 (NULL) 0x0 Relocation section '.rela.dyn' at offset 0x390 contains 1 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 00000000006009b0 0000000400000006 R_X86_64_GLOB_DAT 0000000000000000 __gmon_start__ + 0 Relocation section '.rela.plt' at offset 0x3a8 contains 3 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 00000000006009d0 0000000100000007 R_X86_64_JUMP_SLOT 0000000000000000 printf + 0 00000000006009d8 0000000200000007 R_X86_64_JUMP_SLOT 0000000000000000 snprintf + 0 00000000006009e0 0000000300000007 R_X86_64_JUMP_SLOT 0000000000000000 __libc_start_main + 0 Symbol table '.dynsym' contains 5 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000000 0 FUNC GLOBAL DEFAULT UND printf@GLIBC_2.2.5 (2) 2: 0000000000000000 0 FUNC GLOBAL DEFAULT UND snprintf@GLIBC_2.2.5 (2) 3: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.2.5 (2) 4: 0000000000000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ Symbol table '.symtab' contains 68 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000400200 0 SECTION LOCAL DEFAULT 1 2: 000000000040021c 0 SECTION LOCAL DEFAULT 2 3: 000000000040023c 0 SECTION LOCAL DEFAULT 3 4: 0000000000400260 0 SECTION LOCAL DEFAULT 4 5: 0000000000400288 0 SECTION LOCAL DEFAULT 5 6: 00000000004002a8 0 SECTION LOCAL DEFAULT 6 7: 0000000000400320 0 SECTION LOCAL DEFAULT 7 8: 0000000000400362 0 SECTION LOCAL DEFAULT 8 9: 0000000000400370 0 SECTION LOCAL DEFAULT 9 10: 0000000000400390 0 SECTION LOCAL DEFAULT 10 11: 00000000004003a8 0 SECTION LOCAL DEFAULT 11 12: 00000000004003f0 0 SECTION LOCAL DEFAULT 12 13: 0000000000400400 0 SECTION LOCAL DEFAULT 13 14: 0000000000400440 0 SECTION LOCAL DEFAULT 14 15: 000000000040069c 0 SECTION LOCAL DEFAULT 15 16: 00000000004006a8 0 SECTION LOCAL DEFAULT 16 17: 00000000004006bc 0 SECTION LOCAL DEFAULT 17 18: 00000000004006f0 0 SECTION LOCAL DEFAULT 18 19: 00000000006007b8 0 SECTION LOCAL DEFAULT 19 20: 00000000006007c0 0 SECTION LOCAL DEFAULT 20 21: 00000000006007c8 0 SECTION LOCAL DEFAULT 21 22: 00000000006007d0 0 SECTION LOCAL DEFAULT 22 23: 00000000006009b0 0 SECTION LOCAL DEFAULT 23 24: 00000000006009b8 0 SECTION LOCAL DEFAULT 24 25: 00000000006009e8 0 SECTION LOCAL DEFAULT 25 26: 00000000006009f8 0 SECTION LOCAL DEFAULT 26 27: 0000000000000000 0 SECTION LOCAL DEFAULT 27 28: 000000000040046c 0 FUNC LOCAL DEFAULT 14 call_gmon_start 29: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 30: 00000000006007c8 0 OBJECT LOCAL DEFAULT 21 __JCR_LIST__ 31: 0000000000400490 0 FUNC LOCAL DEFAULT 14 deregister_tm_clones 32: 00000000004004c0 0 FUNC LOCAL DEFAULT 14 register_tm_clones 33: 0000000000400500 0 FUNC LOCAL DEFAULT 14 __do_global_dtors_aux 34: 00000000006009f8 1 OBJECT LOCAL DEFAULT 26 completed.6095 35: 00000000006007c0 0 OBJECT LOCAL DEFAULT 20 __do_global_dtors_aux_fini_array_entry 36: 0000000000400520 0 FUNC LOCAL DEFAULT 14 frame_dummy 37: 00000000006007b8 0 OBJECT LOCAL DEFAULT 19 __frame_dummy_init_array_entry 38: 0000000000000000 0 FILE LOCAL DEFAULT ABS hello.c 39: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 40: 00000000004007b0 0 OBJECT LOCAL DEFAULT 18 __FRAME_END__ 41: 00000000006007c8 0 OBJECT LOCAL DEFAULT 21 __JCR_END__ 42: 00000000006007c0 0 NOTYPE LOCAL DEFAULT 19 __init_array_end 43: 00000000006007d0 0 OBJECT LOCAL DEFAULT 22 _DYNAMIC 44: 00000000006007b8 0 NOTYPE LOCAL DEFAULT 19 __init_array_start 45: 00000000006009b8 0 OBJECT LOCAL DEFAULT 24 _GLOBAL_OFFSET_TABLE_ 46: 0000000000400600 2 FUNC GLOBAL DEFAULT 14 __libc_csu_fini 47: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _ITM_deregisterTMCloneTable 48: 00000000006009e8 0 NOTYPE WEAK DEFAULT 25 data_start 49: 00000000006009f8 0 NOTYPE GLOBAL DEFAULT ABS _edata 50: 000000000040069c 0 FUNC GLOBAL DEFAULT 15 _fini 51: 0000000000000000 0 FUNC GLOBAL DEFAULT UND printf@@GLIBC_2.2.5 52: 0000000000000000 0 FUNC GLOBAL DEFAULT UND snprintf@@GLIBC_2.2.5 53: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_2.2.5 54: 00000000006009e8 0 NOTYPE GLOBAL DEFAULT 25 __data_start 55: 0000000000000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 56: 00000000006009f0 0 OBJECT GLOBAL HIDDEN 25 __dso_handle 57: 0000000000400550 99 FUNC GLOBAL DEFAULT 14 announcement 58: 00000000004006a8 4 OBJECT GLOBAL DEFAULT 16 _IO_stdin_used 59: 0000000000400610 137 FUNC GLOBAL DEFAULT 14 __libc_csu_init 60: 0000000000600a00 0 NOTYPE GLOBAL DEFAULT ABS _end 61: 0000000000400440 0 FUNC GLOBAL DEFAULT 14 _start 62: 00000000006009f8 0 NOTYPE GLOBAL DEFAULT ABS __bss_start 63: 00000000004005c0 57 FUNC GLOBAL DEFAULT 14 main 64: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses 65: 00000000006009f8 0 OBJECT GLOBAL HIDDEN 25 __TMC_END__ 66: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _ITM_registerTMCloneTable 67: 00000000004003f0 0 FUNC GLOBAL DEFAULT 12 _init ../build-tree/wrapper-test-stock ../build-tree/wrapper-test-stock: ok (0x400550) # Compiler options enabled. (linker is not wrapper) ../build-tree/hardened-cc -B ../build-tree/ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -O2 -Wl,-z,relro -o ../build-tree/wrapper-test-compiled hello.c /usr/bin/clang -fstack-protector --param=ssp-buffer-size=4 -fPIE -pie -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -B ../build-tree/ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -O2 -Wl,-z,relro -o ../build-tree/wrapper-test-compiled hello.c clang: warning: argument unused during compilation: '--param ssp-buffer-size=4' clang: warning: argument unused during compilation: '--param ssp-buffer-size=4' readelf -ldrsW ../build-tree/wrapper-test-compiled Elf file type is DYN (Shared object file) Entry point 0x870 There are 9 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000040 0x0000000000000040 0x0000000000000040 0x0001f8 0x0001f8 R E 0x8 INTERP 0x000238 0x0000000000000238 0x0000000000000238 0x00001c 0x00001c R 0x1 [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2] LOAD 0x000000 0x0000000000000000 0x0000000000000000 0x000c74 0x000c74 R E 0x200000 LOAD 0x000da8 0x0000000000200da8 0x0000000000200da8 0x000290 0x000298 RW 0x200000 DYNAMIC 0x000dc0 0x0000000000200dc0 0x0000000000200dc0 0x0001e0 0x0001e0 RW 0x8 NOTE 0x000254 0x0000000000000254 0x0000000000000254 0x000044 0x000044 R 0x4 GNU_EH_FRAME 0x000b7c 0x0000000000000b7c 0x0000000000000b7c 0x000034 0x000034 R 0x4 GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW 0x8 GNU_RELRO 0x000da8 0x0000000000200da8 0x0000000000200da8 0x000258 0x000258 R 0x1 Section to Segment mapping: Segment Sections... 00 01 .interp 02 .interp .note.ABI-tag .note.gnu.build-id .hash .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rela.dyn .rela.plt .init .plt .text .fini .rodata .eh_frame_hdr .eh_frame 03 .init_array .fini_array .jcr .dynamic .got .got.plt .data .bss 04 .dynamic 05 .note.ABI-tag .note.gnu.build-id 06 .eh_frame_hdr 07 08 .init_array .fini_array .jcr .dynamic .got Dynamic section at offset 0xdc0 contains 26 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x000000000000000c (INIT) 0x800 0x000000000000000d (FINI) 0xb5c 0x0000000000000019 (INIT_ARRAY) 0x200da8 0x000000000000001b (INIT_ARRAYSZ) 8 (bytes) 0x000000000000001a (FINI_ARRAY) 0x200db0 0x000000000000001c (FINI_ARRAYSZ) 8 (bytes) 0x0000000000000004 (HASH) 0x298 0x000000006ffffef5 (GNU_HASH) 0x2f8 0x0000000000000005 (STRTAB) 0x4e8 0x0000000000000006 (SYMTAB) 0x338 0x000000000000000a (STRSZ) 281 (bytes) 0x000000000000000b (SYMENT) 24 (bytes) 0x0000000000000015 (DEBUG) 0x0 0x0000000000000003 (PLTGOT) 0x200fe8 0x0000000000000002 (PLTRELSZ) 120 (bytes) 0x0000000000000014 (PLTREL) RELA 0x0000000000000017 (JMPREL) 0x788 0x0000000000000007 (RELA) 0x668 0x0000000000000008 (RELASZ) 288 (bytes) 0x0000000000000009 (RELAENT) 24 (bytes) 0x000000006ffffffe (VERNEED) 0x628 0x000000006fffffff (VERNEEDNUM) 1 0x000000006ffffff0 (VERSYM) 0x602 0x000000006ffffff9 (RELACOUNT) 7 0x0000000000000000 (NULL) 0x0 Relocation section '.rela.dyn' at offset 0x668 contains 12 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000200da8 0000000000000008 R_X86_64_RELATIVE 0000000000000970 0000000000200db0 0000000000000008 R_X86_64_RELATIVE 0000000000000930 0000000000200fa0 0000000000000008 R_X86_64_RELATIVE 0000000000000ac0 0000000000200fb8 0000000000000008 R_X86_64_RELATIVE 00000000000009a0 0000000000200fc0 0000000000000008 R_X86_64_RELATIVE 0000000000000ad0 0000000000200fc8 0000000000000008 R_X86_64_RELATIVE 0000000000000a30 0000000000201030 0000000000000008 R_X86_64_RELATIVE 0000000000201030 0000000000200fa8 0000000300000006 R_X86_64_GLOB_DAT 0000000000000000 _ITM_deregisterTMCloneTable + 0 0000000000200fb0 0000000600000006 R_X86_64_GLOB_DAT 0000000000000000 __gmon_start__ + 0 0000000000200fd0 0000000800000006 R_X86_64_GLOB_DAT 0000000000000000 _Jv_RegisterClasses + 0 0000000000200fd8 0000000900000006 R_X86_64_GLOB_DAT 0000000000000000 _ITM_registerTMCloneTable + 0 0000000000200fe0 0000000a00000006 R_X86_64_GLOB_DAT 0000000000000000 __cxa_finalize + 0 Relocation section '.rela.plt' at offset 0x788 contains 5 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000201000 0000000200000007 R_X86_64_JUMP_SLOT 0000000000000000 __snprintf_chk + 0 0000000000201008 0000000400000007 R_X86_64_JUMP_SLOT 0000000000000000 __stack_chk_fail + 0 0000000000201010 0000000500000007 R_X86_64_JUMP_SLOT 0000000000000000 __libc_start_main + 0 0000000000201018 0000000700000007 R_X86_64_JUMP_SLOT 0000000000000000 __printf_chk + 0 0000000000201020 0000000a00000007 R_X86_64_JUMP_SLOT 0000000000000000 __cxa_finalize + 0 Symbol table '.dynsym' contains 18 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000238 0 SECTION LOCAL DEFAULT 1 2: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __snprintf_chk@GLIBC_2.3.4 (2) 3: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _ITM_deregisterTMCloneTable 4: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@GLIBC_2.4 (3) 5: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.2.5 (4) 6: 0000000000000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 7: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@GLIBC_2.3.4 (2) 8: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses 9: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _ITM_registerTMCloneTable 10: 0000000000000000 0 FUNC WEAK DEFAULT UND __cxa_finalize@GLIBC_2.2.5 (4) 11: 0000000000201038 0 NOTYPE GLOBAL DEFAULT ABS _edata 12: 00000000000009a0 129 FUNC GLOBAL DEFAULT 14 announcement 13: 0000000000201040 0 NOTYPE GLOBAL DEFAULT ABS _end 14: 0000000000000ad0 137 FUNC GLOBAL DEFAULT 14 __libc_csu_init 15: 0000000000201038 0 NOTYPE GLOBAL DEFAULT ABS __bss_start 16: 0000000000000a30 134 FUNC GLOBAL DEFAULT 14 main 17: 0000000000000ac0 2 FUNC GLOBAL DEFAULT 14 __libc_csu_fini Symbol table '.symtab' contains 76 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000238 0 SECTION LOCAL DEFAULT 1 2: 0000000000000254 0 SECTION LOCAL DEFAULT 2 3: 0000000000000274 0 SECTION LOCAL DEFAULT 3 4: 0000000000000298 0 SECTION LOCAL DEFAULT 4 5: 00000000000002f8 0 SECTION LOCAL DEFAULT 5 6: 0000000000000338 0 SECTION LOCAL DEFAULT 6 7: 00000000000004e8 0 SECTION LOCAL DEFAULT 7 8: 0000000000000602 0 SECTION LOCAL DEFAULT 8 9: 0000000000000628 0 SECTION LOCAL DEFAULT 9 10: 0000000000000668 0 SECTION LOCAL DEFAULT 10 11: 0000000000000788 0 SECTION LOCAL DEFAULT 11 12: 0000000000000800 0 SECTION LOCAL DEFAULT 12 13: 0000000000000810 0 SECTION LOCAL DEFAULT 13 14: 0000000000000870 0 SECTION LOCAL DEFAULT 14 15: 0000000000000b5c 0 SECTION LOCAL DEFAULT 15 16: 0000000000000b68 0 SECTION LOCAL DEFAULT 16 17: 0000000000000b7c 0 SECTION LOCAL DEFAULT 17 18: 0000000000000bb0 0 SECTION LOCAL DEFAULT 18 19: 0000000000200da8 0 SECTION LOCAL DEFAULT 19 20: 0000000000200db0 0 SECTION LOCAL DEFAULT 20 21: 0000000000200db8 0 SECTION LOCAL DEFAULT 21 22: 0000000000200dc0 0 SECTION LOCAL DEFAULT 22 23: 0000000000200fa0 0 SECTION LOCAL DEFAULT 23 24: 0000000000200fe8 0 SECTION LOCAL DEFAULT 24 25: 0000000000201028 0 SECTION LOCAL DEFAULT 25 26: 0000000000201038 0 SECTION LOCAL DEFAULT 26 27: 0000000000000000 0 SECTION LOCAL DEFAULT 27 28: 0000000000000000 0 SECTION LOCAL DEFAULT 28 29: 0000000000000000 0 SECTION LOCAL DEFAULT 29 30: 0000000000000000 0 SECTION LOCAL DEFAULT 30 31: 0000000000000000 0 SECTION LOCAL DEFAULT 31 32: 0000000000000000 0 SECTION LOCAL DEFAULT 32 33: 0000000000000000 0 SECTION LOCAL DEFAULT 33 34: 000000000000089c 0 FUNC LOCAL DEFAULT 14 call_gmon_start 35: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 36: 0000000000200db8 0 OBJECT LOCAL DEFAULT 21 __JCR_LIST__ 37: 00000000000008c0 0 FUNC LOCAL DEFAULT 14 deregister_tm_clones 38: 00000000000008f0 0 FUNC LOCAL DEFAULT 14 register_tm_clones 39: 0000000000000930 0 FUNC LOCAL DEFAULT 14 __do_global_dtors_aux 40: 0000000000201038 1 OBJECT LOCAL DEFAULT 26 completed.6095 41: 0000000000200db0 0 OBJECT LOCAL DEFAULT 20 __do_global_dtors_aux_fini_array_entry 42: 0000000000000970 0 FUNC LOCAL DEFAULT 14 frame_dummy 43: 0000000000200da8 0 OBJECT LOCAL DEFAULT 19 __frame_dummy_init_array_entry 44: 0000000000000000 0 FILE LOCAL DEFAULT ABS hello.c 45: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 46: 0000000000000c70 0 OBJECT LOCAL DEFAULT 18 __FRAME_END__ 47: 0000000000200db8 0 OBJECT LOCAL DEFAULT 21 __JCR_END__ 48: 0000000000200db0 0 NOTYPE LOCAL DEFAULT 19 __init_array_end 49: 0000000000200dc0 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC 50: 0000000000200da8 0 NOTYPE LOCAL DEFAULT 19 __init_array_start 51: 0000000000200fe8 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ 52: 0000000000000ac0 2 FUNC GLOBAL DEFAULT 14 __libc_csu_fini 53: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __snprintf_chk@@GLIBC_2.3.4 54: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _ITM_deregisterTMCloneTable 55: 0000000000201028 0 NOTYPE WEAK DEFAULT 25 data_start 56: 0000000000201038 0 NOTYPE GLOBAL DEFAULT ABS _edata 57: 0000000000000b5c 0 FUNC GLOBAL DEFAULT 15 _fini 58: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@@GLIBC_2.4 59: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_2.2.5 60: 0000000000201028 0 NOTYPE GLOBAL DEFAULT 25 __data_start 61: 0000000000000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 62: 0000000000201030 0 OBJECT GLOBAL HIDDEN 25 __dso_handle 63: 00000000000009a0 129 FUNC GLOBAL DEFAULT 14 announcement 64: 0000000000000b68 4 OBJECT GLOBAL DEFAULT 16 _IO_stdin_used 65: 0000000000000ad0 137 FUNC GLOBAL DEFAULT 14 __libc_csu_init 66: 0000000000201040 0 NOTYPE GLOBAL DEFAULT ABS _end 67: 0000000000000870 0 FUNC GLOBAL DEFAULT 14 _start 68: 0000000000201038 0 NOTYPE GLOBAL DEFAULT ABS __bss_start 69: 0000000000000a30 134 FUNC GLOBAL DEFAULT 14 main 70: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@@GLIBC_2.3.4 71: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses 72: 0000000000201038 0 OBJECT GLOBAL HIDDEN 25 __TMC_END__ 73: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _ITM_registerTMCloneTable 74: 0000000000000000 0 FUNC WEAK DEFAULT UND __cxa_finalize@@GLIBC_2.2.5 75: 0000000000000800 0 FUNC GLOBAL DEFAULT 12 _init # Run twice to show off PIE, if available in kernel ../build-tree/wrapper-test-compiled ../build-tree/wrapper-test-compiled: ok (0x2b6f13c309a0) ../build-tree/wrapper-test-compiled ../build-tree/wrapper-test-compiled: ok (0x2b42748cf9a0) # Enable symlink for ld to trick gcc into doing wrapped linking (cd ../build-tree && ln -s hardened-ld ld) (cd ../build-tree && ln -s hardened-ld ld.gold) # Compiler and linker options enabled. ../build-tree/hardened-cc -B ../build-tree/ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -O2 -Wl,-z,relro -o ../build-tree/wrapper-test-linked hello.c /usr/bin/clang -fstack-protector --param=ssp-buffer-size=4 -fPIE -pie -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -B ../build-tree/ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -O2 -Wl,-z,relro -o ../build-tree/wrapper-test-linked hello.c clang: warning: argument unused during compilation: '--param ssp-buffer-size=4' clang: warning: argument unused during compilation: '--param ssp-buffer-size=4' /usr/bin/ld.bfd -z now -pie --hash-style=both --build-id --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o ../build-tree/wrapper-test-linked /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/Scrt1.o /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crti.o /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/crtbeginS.o -L/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../.. -L/lib -L/usr/lib -z relro /tmp/hello-sbGwD6.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/crtendS.o /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crtn.o readelf -ldrsW ../build-tree/wrapper-test-linked Elf file type is DYN (Shared object file) Entry point 0x870 There are 9 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000040 0x0000000000000040 0x0000000000000040 0x0001f8 0x0001f8 R E 0x8 INTERP 0x000238 0x0000000000000238 0x0000000000000238 0x00001c 0x00001c R 0x1 [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2] LOAD 0x000000 0x0000000000000000 0x0000000000000000 0x000c74 0x000c74 R E 0x200000 LOAD 0x000d60 0x0000000000200d60 0x0000000000200d60 0x0002b0 0x0002b8 RW 0x200000 DYNAMIC 0x000d78 0x0000000000200d78 0x0000000000200d78 0x000200 0x000200 RW 0x8 NOTE 0x000254 0x0000000000000254 0x0000000000000254 0x000044 0x000044 R 0x4 GNU_EH_FRAME 0x000b7c 0x0000000000000b7c 0x0000000000000b7c 0x000034 0x000034 R 0x4 GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW 0x8 GNU_RELRO 0x000d60 0x0000000000200d60 0x0000000000200d60 0x0002a0 0x0002a0 R 0x1 Section to Segment mapping: Segment Sections... 00 01 .interp 02 .interp .note.ABI-tag .note.gnu.build-id .hash .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rela.dyn .rela.plt .init .plt .text .fini .rodata .eh_frame_hdr .eh_frame 03 .init_array .fini_array .jcr .dynamic .got .data .bss 04 .dynamic 05 .note.ABI-tag .note.gnu.build-id 06 .eh_frame_hdr 07 08 .init_array .fini_array .jcr .dynamic .got Dynamic section at offset 0xd78 contains 28 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x000000000000000c (INIT) 0x800 0x000000000000000d (FINI) 0xb5c 0x0000000000000019 (INIT_ARRAY) 0x200d60 0x000000000000001b (INIT_ARRAYSZ) 8 (bytes) 0x000000000000001a (FINI_ARRAY) 0x200d68 0x000000000000001c (FINI_ARRAYSZ) 8 (bytes) 0x0000000000000004 (HASH) 0x298 0x000000006ffffef5 (GNU_HASH) 0x2f8 0x0000000000000005 (STRTAB) 0x4e8 0x0000000000000006 (SYMTAB) 0x338 0x000000000000000a (STRSZ) 281 (bytes) 0x000000000000000b (SYMENT) 24 (bytes) 0x0000000000000015 (DEBUG) 0x0 0x0000000000000003 (PLTGOT) 0x200f78 0x0000000000000002 (PLTRELSZ) 120 (bytes) 0x0000000000000014 (PLTREL) RELA 0x0000000000000017 (JMPREL) 0x788 0x0000000000000007 (RELA) 0x668 0x0000000000000008 (RELASZ) 288 (bytes) 0x0000000000000009 (RELAENT) 24 (bytes) 0x0000000000000018 (BIND_NOW) 0x000000006ffffffb (FLAGS_1) Flags: NOW 0x000000006ffffffe (VERNEED) 0x628 0x000000006fffffff (VERNEEDNUM) 1 0x000000006ffffff0 (VERSYM) 0x602 0x000000006ffffff9 (RELACOUNT) 7 0x0000000000000000 (NULL) 0x0 Relocation section '.rela.dyn' at offset 0x668 contains 12 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000200d60 0000000000000008 R_X86_64_RELATIVE 0000000000000970 0000000000200d68 0000000000000008 R_X86_64_RELATIVE 0000000000000930 0000000000200fb8 0000000000000008 R_X86_64_RELATIVE 0000000000000ac0 0000000000200fd0 0000000000000008 R_X86_64_RELATIVE 00000000000009a0 0000000000200fd8 0000000000000008 R_X86_64_RELATIVE 0000000000000ad0 0000000000200fe0 0000000000000008 R_X86_64_RELATIVE 0000000000000a30 0000000000201008 0000000000000008 R_X86_64_RELATIVE 0000000000201008 0000000000200fc0 0000000300000006 R_X86_64_GLOB_DAT 0000000000000000 _ITM_deregisterTMCloneTable + 0 0000000000200fc8 0000000600000006 R_X86_64_GLOB_DAT 0000000000000000 __gmon_start__ + 0 0000000000200fe8 0000000800000006 R_X86_64_GLOB_DAT 0000000000000000 _Jv_RegisterClasses + 0 0000000000200ff0 0000000900000006 R_X86_64_GLOB_DAT 0000000000000000 _ITM_registerTMCloneTable + 0 0000000000200ff8 0000000a00000006 R_X86_64_GLOB_DAT 0000000000000000 __cxa_finalize + 0 Relocation section '.rela.plt' at offset 0x788 contains 5 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000200f90 0000000200000007 R_X86_64_JUMP_SLOT 0000000000000000 __snprintf_chk + 0 0000000000200f98 0000000400000007 R_X86_64_JUMP_SLOT 0000000000000000 __stack_chk_fail + 0 0000000000200fa0 0000000500000007 R_X86_64_JUMP_SLOT 0000000000000000 __libc_start_main + 0 0000000000200fa8 0000000700000007 R_X86_64_JUMP_SLOT 0000000000000000 __printf_chk + 0 0000000000200fb0 0000000a00000007 R_X86_64_JUMP_SLOT 0000000000000000 __cxa_finalize + 0 Symbol table '.dynsym' contains 18 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000238 0 SECTION LOCAL DEFAULT 1 2: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __snprintf_chk@GLIBC_2.3.4 (2) 3: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _ITM_deregisterTMCloneTable 4: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@GLIBC_2.4 (3) 5: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.2.5 (4) 6: 0000000000000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 7: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@GLIBC_2.3.4 (2) 8: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses 9: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _ITM_registerTMCloneTable 10: 0000000000000000 0 FUNC WEAK DEFAULT UND __cxa_finalize@GLIBC_2.2.5 (4) 11: 0000000000201010 0 NOTYPE GLOBAL DEFAULT ABS _edata 12: 00000000000009a0 129 FUNC GLOBAL DEFAULT 14 announcement 13: 0000000000201018 0 NOTYPE GLOBAL DEFAULT ABS _end 14: 0000000000000ad0 137 FUNC GLOBAL DEFAULT 14 __libc_csu_init 15: 0000000000201010 0 NOTYPE GLOBAL DEFAULT ABS __bss_start 16: 0000000000000a30 134 FUNC GLOBAL DEFAULT 14 main 17: 0000000000000ac0 2 FUNC GLOBAL DEFAULT 14 __libc_csu_fini Symbol table '.symtab' contains 75 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000238 0 SECTION LOCAL DEFAULT 1 2: 0000000000000254 0 SECTION LOCAL DEFAULT 2 3: 0000000000000274 0 SECTION LOCAL DEFAULT 3 4: 0000000000000298 0 SECTION LOCAL DEFAULT 4 5: 00000000000002f8 0 SECTION LOCAL DEFAULT 5 6: 0000000000000338 0 SECTION LOCAL DEFAULT 6 7: 00000000000004e8 0 SECTION LOCAL DEFAULT 7 8: 0000000000000602 0 SECTION LOCAL DEFAULT 8 9: 0000000000000628 0 SECTION LOCAL DEFAULT 9 10: 0000000000000668 0 SECTION LOCAL DEFAULT 10 11: 0000000000000788 0 SECTION LOCAL DEFAULT 11 12: 0000000000000800 0 SECTION LOCAL DEFAULT 12 13: 0000000000000810 0 SECTION LOCAL DEFAULT 13 14: 0000000000000870 0 SECTION LOCAL DEFAULT 14 15: 0000000000000b5c 0 SECTION LOCAL DEFAULT 15 16: 0000000000000b68 0 SECTION LOCAL DEFAULT 16 17: 0000000000000b7c 0 SECTION LOCAL DEFAULT 17 18: 0000000000000bb0 0 SECTION LOCAL DEFAULT 18 19: 0000000000200d60 0 SECTION LOCAL DEFAULT 19 20: 0000000000200d68 0 SECTION LOCAL DEFAULT 20 21: 0000000000200d70 0 SECTION LOCAL DEFAULT 21 22: 0000000000200d78 0 SECTION LOCAL DEFAULT 22 23: 0000000000200f78 0 SECTION LOCAL DEFAULT 23 24: 0000000000201000 0 SECTION LOCAL DEFAULT 24 25: 0000000000201010 0 SECTION LOCAL DEFAULT 25 26: 0000000000000000 0 SECTION LOCAL DEFAULT 26 27: 0000000000000000 0 SECTION LOCAL DEFAULT 27 28: 0000000000000000 0 SECTION LOCAL DEFAULT 28 29: 0000000000000000 0 SECTION LOCAL DEFAULT 29 30: 0000000000000000 0 SECTION LOCAL DEFAULT 30 31: 0000000000000000 0 SECTION LOCAL DEFAULT 31 32: 0000000000000000 0 SECTION LOCAL DEFAULT 32 33: 000000000000089c 0 FUNC LOCAL DEFAULT 14 call_gmon_start 34: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 35: 0000000000200d70 0 OBJECT LOCAL DEFAULT 21 __JCR_LIST__ 36: 00000000000008c0 0 FUNC LOCAL DEFAULT 14 deregister_tm_clones 37: 00000000000008f0 0 FUNC LOCAL DEFAULT 14 register_tm_clones 38: 0000000000000930 0 FUNC LOCAL DEFAULT 14 __do_global_dtors_aux 39: 0000000000201010 1 OBJECT LOCAL DEFAULT 25 completed.6095 40: 0000000000200d68 0 OBJECT LOCAL DEFAULT 20 __do_global_dtors_aux_fini_array_entry 41: 0000000000000970 0 FUNC LOCAL DEFAULT 14 frame_dummy 42: 0000000000200d60 0 OBJECT LOCAL DEFAULT 19 __frame_dummy_init_array_entry 43: 0000000000000000 0 FILE LOCAL DEFAULT ABS hello.c 44: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 45: 0000000000000c70 0 OBJECT LOCAL DEFAULT 18 __FRAME_END__ 46: 0000000000200d70 0 OBJECT LOCAL DEFAULT 21 __JCR_END__ 47: 0000000000200d68 0 NOTYPE LOCAL DEFAULT 19 __init_array_end 48: 0000000000200d78 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC 49: 0000000000200d60 0 NOTYPE LOCAL DEFAULT 19 __init_array_start 50: 0000000000200f78 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ 51: 0000000000000ac0 2 FUNC GLOBAL DEFAULT 14 __libc_csu_fini 52: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __snprintf_chk@@GLIBC_2.3.4 53: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _ITM_deregisterTMCloneTable 54: 0000000000201000 0 NOTYPE WEAK DEFAULT 24 data_start 55: 0000000000201010 0 NOTYPE GLOBAL DEFAULT ABS _edata 56: 0000000000000b5c 0 FUNC GLOBAL DEFAULT 15 _fini 57: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@@GLIBC_2.4 58: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_2.2.5 59: 0000000000201000 0 NOTYPE GLOBAL DEFAULT 24 __data_start 60: 0000000000000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 61: 0000000000201008 0 OBJECT GLOBAL HIDDEN 24 __dso_handle 62: 00000000000009a0 129 FUNC GLOBAL DEFAULT 14 announcement 63: 0000000000000b68 4 OBJECT GLOBAL DEFAULT 16 _IO_stdin_used 64: 0000000000000ad0 137 FUNC GLOBAL DEFAULT 14 __libc_csu_init 65: 0000000000201018 0 NOTYPE GLOBAL DEFAULT ABS _end 66: 0000000000000870 0 FUNC GLOBAL DEFAULT 14 _start 67: 0000000000201010 0 NOTYPE GLOBAL DEFAULT ABS __bss_start 68: 0000000000000a30 134 FUNC GLOBAL DEFAULT 14 main 69: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@@GLIBC_2.3.4 70: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses 71: 0000000000201010 0 OBJECT GLOBAL HIDDEN 24 __TMC_END__ 72: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _ITM_registerTMCloneTable 73: 0000000000000000 0 FUNC WEAK DEFAULT UND __cxa_finalize@@GLIBC_2.2.5 74: 0000000000000800 0 FUNC GLOBAL DEFAULT 12 _init # Run twice to show off PIE, if available in kernel ../build-tree/wrapper-test-linked ../build-tree/wrapper-test-linked: ok (0x2b6619fd59a0) ../build-tree/wrapper-test-linked ../build-tree/wrapper-test-linked: ok (0x2afc2f5459a0) # Check state of hardening features via check script perl ../build-tree/hardening-check ../build-tree/wrapper-test-linked ../build-tree/wrapper-test-linked: Position Independent Executable: yes Stack protected: yes Fortify Source functions: yes Read-only relocations: yes Immediate binding: yes # Manually check state of hardening features # Test PIE readelf -lW ../build-tree/wrapper-test-linked | grep '^Elf file type is DYN' Elf file type is DYN (Shared object file) # Test Stack Protector nm ../build-tree/wrapper-test-linked | egrep '__stack_chk_fail($|@@GLIBC)' U __stack_chk_fail@@GLIBC_2.4 # Test Fortify nm ../build-tree/wrapper-test-linked | egrep '__(sn)?printf_chk($|@@GLIBC)' U __printf_chk@@GLIBC_2.3.4 U __snprintf_chk@@GLIBC_2.3.4 # Test Format (no-op currently) # Test for RELRO readelf -lW ../build-tree/wrapper-test-linked | grep GNU_RELRO GNU_RELRO 0x000d60 0x0000000000200d60 0x0000000000200d60 0x0002a0 0x0002a0 R 0x1 # Test for BIND_NOW readelf -dW ../build-tree/wrapper-test-linked | grep BIND_NOW 0x0000000000000018 (BIND_NOW) # Build directly with -fPIC already defined ../build-tree/hardened-cc -B ../build-tree/ -fPIC -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -O2 -Wl,-z,relro -o ../build-tree/wrapper-test-fPIC-direct hello.c /usr/bin/clang -fstack-protector --param=ssp-buffer-size=4 -pie -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -B ../build-tree/ -fPIC -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -O2 -Wl,-z,relro -o ../build-tree/wrapper-test-fPIC-direct hello.c clang: warning: argument unused during compilation: '--param ssp-buffer-size=4' clang: warning: argument unused during compilation: '--param ssp-buffer-size=4' /usr/bin/ld.bfd -z now -pie --hash-style=both --build-id --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o ../build-tree/wrapper-test-fPIC-direct /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/Scrt1.o /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crti.o /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/crtbeginS.o -L/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../.. -L/lib -L/usr/lib -z relro /tmp/hello-O9eZ3r.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/crtendS.o /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crtn.o ../build-tree/wrapper-test-fPIC-direct ../build-tree/wrapper-test-fPIC-direct: ok (0x2b3dd89039a0) # Build .o with -fPIC already defined ../build-tree/hardened-cc -B ../build-tree/ -fPIC -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -O2 -Wl,-z,relro -o ../build-tree/wrapper-test-fPIC.o -c hello.c /usr/bin/clang -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -B ../build-tree/ -fPIC -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -O2 -Wl,-z,relro -o ../build-tree/wrapper-test-fPIC.o -c hello.c clang: warning: -Wl,-z,relro: 'linker' input unused when '-c' is present clang: warning: argument unused during compilation: '--param ssp-buffer-size=4' clang: warning: argument unused during compilation: '--param ssp-buffer-size=4' # Link .o with -fPIC already defined ../build-tree/hardened-cc -B ../build-tree/ -fPIC -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -O2 -Wl,-z,relro -o ../build-tree/wrapper-test-fPIC ../build-tree/wrapper-test-fPIC.o /usr/bin/clang -fstack-protector --param=ssp-buffer-size=4 -pie -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -B ../build-tree/ -fPIC -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -O2 -Wl,-z,relro -o ../build-tree/wrapper-test-fPIC ../build-tree/wrapper-test-fPIC.o clang: warning: argument unused during compilation: '--param ssp-buffer-size=4' clang: warning: argument unused during compilation: '--param ssp-buffer-size=4' /usr/bin/ld.bfd -z now -pie --hash-style=both --build-id --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o ../build-tree/wrapper-test-fPIC /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/Scrt1.o /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crti.o /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/crtbeginS.o -L/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../.. -L/lib -L/usr/lib -z relro ../build-tree/wrapper-test-fPIC.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/crtendS.o /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crtn.o ../build-tree/wrapper-test-fPIC ../build-tree/wrapper-test-fPIC: ok (0x2b09d18b29a0) # Make sure build fails due to -Werror=format-security ! ../build-tree/hardened-cc -B ../build-tree/ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -O2 -Wl,-z,relro -o ../build-tree/wrapper-test-format-security format.c /usr/bin/clang -fstack-protector --param=ssp-buffer-size=4 -fPIE -pie -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -B ../build-tree/ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -O2 -Wl,-z,relro -o ../build-tree/wrapper-test-format-security format.c clang: warning: argument unused during compilation: '--param ssp-buffer-size=4' clang: warning: argument unused during compilation: '--param ssp-buffer-size=4' /usr/bin/ld.bfd -z now -pie --hash-style=both --build-id --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o ../build-tree/wrapper-test-format-security /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/Scrt1.o /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crti.o /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/crtbeginS.o -L/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../.. -L/lib -L/usr/lib -z relro /tmp/format-hkWjzK.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/crtendS.o /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crtn.o make[3]: *** [../build-tree/wrapper-test-format-security] Error 1 make[3]: Leaving directory `/«PKGBUILDDIR»/tests' make[2]: *** [check] Error 2 make[1]: *** [check] Error 2 dh_auto_test: make -j1 check returned exit code 2 make: *** [build] Error 29 dpkg-buildpackage: error: debian/rules build gave error exit status 2 make[2]: Leaving directory `/«PKGBUILDDIR»/tests' make[1]: Leaving directory `/«PKGBUILDDIR»' ──────────────────────────────────────────────────────────────────────────────── Build finished at 20120709-2037 Finished ──────── E: Build failure (dpkg-buildpackage died) ┌──────────────────────────────────────────────────────────────────────────────┐ │ Cleanup │ └──────────────────────────────────────────────────────────────────────────────┘ Purging /«BUILDDIR» Not cleaning session: cloned chroot in use ┌──────────────────────────────────────────────────────────────────────────────┐ │ Summary │ └──────────────────────────────────────────────────────────────────────────────┘ Architecture: amd64 Build-Space: 340 Build-Time: 4 Distribution: unstable Fail-Stage: build Install-Time: 7 Job: hardening-wrapper_2.2 Package: hardening-wrapper Package-Time: 31 Source-Version: 2.2 Space: 340 Status: attempted Version: 2.2 ──────────────────────────────────────────────────────────────────────────────── Finished at 20120709-2037 Build needed 00:00:31, 340k disc space DC-Status: Failed 31.702899s DC-Time-Estimation: 31.702899 versus expected 80 (r/m: 1.52342853566798 ; m: 31.702899)