sbuild (Debian sbuild) 0.62.6 (07 Dec 2011) on build02.raspbian.lan ╔══════════════════════════════════════════════════════════════════════════════╗ ║ hardening-wrapper 2.2 (armhf) 24 Jun 2012 22:29 ║ ╚══════════════════════════════════════════════════════════════════════════════╝ Package: hardening-wrapper Version: 2.2 Source Version: 2.2 Distribution: testing Architecture: armhf I: NOTICE: Log filtering will replace 'build/hardening-wrapper-DfCy7v/hardening-wrapper-2.2' with '«PKGBUILDDIR»' I: NOTICE: Log filtering will replace 'build/hardening-wrapper-DfCy7v' with '«BUILDDIR»' I: NOTICE: Log filtering will replace 'var/lib/schroot/mount/testing-armhf-sbuild-29989b94-deb5-4ddb-b5b4-35140ab9705e' with '«CHROOT»' ┌──────────────────────────────────────────────────────────────────────────────┐ │ Update chroot │ └──────────────────────────────────────────────────────────────────────────────┘ Hit http://repo.raspbian.lan testing InRelease Hit http://repo.raspbian.lan testing/main Sources Hit http://repo.raspbian.lan testing/main armhf Packages Ign http://repo.raspbian.lan testing/main Translation-en Reading package lists... ┌──────────────────────────────────────────────────────────────────────────────┐ │ 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 get 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://repo.raspbian.lan/raspbian/ testing/main hardening-wrapper 2.2 (dsc) [1860 B] Get:2 http://repo.raspbian.lan/raspbian/ testing/main hardening-wrapper 2.2 (tar) [20.4 kB] Fetched 22.3 kB in 0s (537 kB/s) Download complete and in download only mode Check arch ────────── Merged Build-Depends: build-essential, fakeroot Filtered Build-Depends: build-essential, fakeroot dpkg-deb: building package `sbuild-build-depends-core-dummy' in `/«BUILDDIR»/resolver-pEqrp1/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 8 not upgraded. Need to get 0 B/702 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 ... 10659 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: 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: 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-POHseM/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 libffi5 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 libffi5 libgettextpo0 libglib2.0-0 libmagic1 libpcre3 libpipeline1 libunistring0 libxml2 man-db po-debconf sbuild-build-depends-hardening-wrapper-dummy debconf: delaying package configuration, since apt-utils is not installed 0 upgraded, 21 newly installed, 0 to remove and 8 not upgraded. Need to get 0 B/9446 kB of archives. After this operation, 24.4 MB of additional disk space will be used. Selecting previously unselected package libpcre3:armhf. (Reading database ... 10659 files and directories currently installed.) Unpacking libpcre3:armhf (from .../libpcre3_1%3a8.30-5_armhf.deb) ... Selecting previously unselected package libpipeline1:armhf. Unpacking libpipeline1:armhf (from .../libpipeline1_1.2.1-1_armhf.deb) ... Selecting previously unselected package libasprintf0c2:armhf. Unpacking libasprintf0c2:armhf (from .../libasprintf0c2_0.18.1.1-9_armhf.deb) ... Selecting previously unselected package libmagic1:armhf. Unpacking libmagic1:armhf (from .../libmagic1_5.11-1_armhf.deb) ... Selecting previously unselected package libxml2:armhf. Unpacking libxml2:armhf (from .../libxml2_2.8.0+dfsg1-3_armhf.deb) ... Selecting previously unselected package libffi5:armhf. Unpacking libffi5:armhf (from .../libffi5_3.0.10-3+b3_armhf.deb) ... Selecting previously unselected package libglib2.0-0:armhf. Unpacking libglib2.0-0:armhf (from .../libglib2.0-0_2.32.3-1_armhf.deb) ... Selecting previously unselected package libcroco3:armhf. Unpacking libcroco3:armhf (from .../libcroco3_0.6.5-1_armhf.deb) ... Selecting previously unselected package libunistring0:armhf. Unpacking libunistring0:armhf (from .../libunistring0_0.9.3-5_armhf.deb) ... Selecting previously unselected package libgettextpo0:armhf. Unpacking libgettextpo0:armhf (from .../libgettextpo0_0.18.1.1-9_armhf.deb) ... Selecting previously unselected package bsdmainutils. Unpacking bsdmainutils (from .../bsdmainutils_9.0.3_armhf.deb) ... Selecting previously unselected package groff-base. Unpacking groff-base (from .../groff-base_1.21-7_armhf.deb) ... Selecting previously unselected package man-db. Unpacking man-db (from .../man-db_2.6.1-2_armhf.deb) ... Selecting previously unselected package file. Unpacking file (from .../archives/file_5.11-1_armhf.deb) ... Selecting previously unselected package gettext-base. Unpacking gettext-base (from .../gettext-base_0.18.1.1-9_armhf.deb) ... Selecting previously unselected package html2text. Unpacking html2text (from .../html2text_1.3.2a-15_armhf.deb) ... Selecting previously unselected package gettext. Unpacking gettext (from .../gettext_0.18.1.1-9_armhf.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 libpcre3:armhf (1:8.30-5) ... Setting up libpipeline1:armhf (1.2.1-1) ... Setting up libasprintf0c2:armhf (0.18.1.1-9) ... Setting up libmagic1:armhf (5.11-1) ... Setting up libxml2:armhf (2.8.0+dfsg1-3) ... Setting up libffi5:armhf (3.0.10-3+b3) ... Setting up libglib2.0-0:armhf (2.32.3-1) ... No schema files found: doing nothing. Setting up libcroco3:armhf (0.6.5-1) ... Setting up libunistring0:armhf (0.9.3-5) ... Setting up libgettextpo0:armhf (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-7) ... Setting up man-db (2.6.1-2) ... Building database of manual pages ... Setting up file (5.11-1) ... 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 3.2.0-2-mx5 armhf (armv7l) Toolchain package versions: binutils_2.22-6.1 dpkg-dev_1.16.3 g++-4.6_4.6.3-1.1+rpi2 gcc-4.6_4.6.3-1.1+rpi2 libc6-dev_2.13-33 libstdc++6_4.7.0-1.1+rpi libstdc++6-4.6-dev_4.6.3-1.1+rpi2 linux-libc-dev_3.2.18-1 Package versions: apt_0.9.3+rpi1 base-files_6.9 base-passwd_3.5.24 bash_4.2-2 binutils_2.22-6.1 bsdmainutils_9.0.3 bsdutils_1:2.20.1-5 build-essential_11.5+b1 bzip2_1.0.6-3 coreutils_8.13-3.2 cpp_4:4.6.2-4 cpp-4.6_4.6.3-1.1+rpi2 dash_0.5.7-3 debconf_1.5.43 debfoster_2.7-1.1 debhelper_9.20120608 debian-archive-keyring_2012.3 debianutils_4.3.1 diffutils_1:3.2-6 dpkg_1.16.3 dpkg-dev_1.16.3 e2fslibs_1.42.4-3 e2fsprogs_1.42.4-3 fakeroot_1.18.3-1 file_5.11-1 findutils_4.4.2-4 g++_4:4.6.2-4 g++-4.6_4.6.3-1.1+rpi2 gcc_4:4.6.2-4 gcc-4.4-base_4.4.7-1.1+rpi1 gcc-4.5-base_4.5.3-12+rpi1 gcc-4.6_4.6.3-1.1+rpi2 gcc-4.6-base_4.6.3-1.1+rpi2 gcc-4.7-base_4.7.0-1.1+rpi gettext_0.18.1.1-9 gettext-base_0.18.1.1-9 gnupg_1.4.12-4 gpgv_1.4.12-4 grep_2.12-2 groff-base_1.21-7 gzip_1.4-5 hostname_3.11 html2text_1.3.2a-15 initscripts_2.88dsf-22.1 insserv_1.14.0-3 intltool-debian_0.35.0+20060710.1 libacl1_2.2.51-7 libapt-pkg4.12_0.9.3+rpi1 libasprintf0c2_0.18.1.1-9 libattr1_1:2.4.46-8 libblkid1_2.20.1-5 libbz2-1.0_1.0.6-3 libc-bin_2.13-33 libc-dev-bin_2.13-33 libc6_2.13-33 libc6-dev_2.13-33 libclass-isa-perl_0.36-3 libcomerr2_1.42.4-3 libcroco3_0.6.5-1 libdb5.1_5.1.29-1 libdpkg-perl_1.16.3 libffi5_3.0.10-3+b3 libfile-fcntllock-perl_0.14-1 libgc1c2_1:7.1-8 libgcc1_1:4.7.0-1.1+rpi 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.0-1.1+rpi liblocale-gettext-perl_1.05-7 liblzma5_5.1.1alpha+20110809-3 libmagic1_5.11-1 libmount1_2.20.1-5 libmpc2_0.9-4 libmpfr4_3.1.0-5 libncurses5_5.9-8 libncursesw5_5.9-8 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 libreadline6_6.2-8 libselinux1_2.1.9-5 libsemanage-common_2.1.6-2 libsemanage1_2.1.6-2 libsepol1_2.1.4-3 libslang2_2.2.4-10 libss2_1.42.2-2 libstdc++6_4.7.0-1.1+rpi libstdc++6-4.6-dev_4.6.3-1.1+rpi2 libswitch-perl_2.16-2 libtext-charwidth-perl_0.04-7 libtext-iconv-perl_1.7-5 libtext-wrapi18n-perl_0.06-7 libtimedate-perl_1.2000-1 libtinfo5_5.9-8 libunistring0_0.9.3-5 libusb-0.1-4_2:0.1.12-20 libustr-1.0-1_1.0.4-3 libuuid1_2.20.1-5 libxml2_2.8.0+dfsg1-3 linux-libc-dev_3.2.18-1 login_1:4.1.5.1-1 lsb-base_4.1+Debian6 make_3.81-8.2 man-db_2.6.1-2 mawk_1.3.3-17 mount_2.20.1-5 multiarch-support_2.13-33 ncurses-base_5.9-7 ncurses-bin_5.9-8 passwd_1:4.1.5.1-1 patch_2.6.1-3 perl_5.14.2-11 perl-base_5.14.2-11 perl-modules_5.14.2-11 po-debconf_1.0.16+nmu2 raspbian-archive-keyring_20120528.2 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-22.1 sysvinit_2.88dsf-22.1 sysvinit-utils_2.88dsf-22.1 tar_1.26-4 tzdata_2012c-1 ucf_3.0025+nmu3 util-linux_2.20.1-5 xz-utils_5.1.1alpha+20110809-3 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=buildd PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/usr/games SCHROOT_CHROOT_NAME=testing-armhf-sbuild SCHROOT_COMMAND=env SCHROOT_GID=108 SCHROOT_GROUP=buildd SCHROOT_SESSION_ID=testing-armhf-sbuild-29989b94-deb5-4ddb-b5b4-35140ab9705e SCHROOT_UID=106 SCHROOT_USER=buildd SHELL=/bin/sh TERM=xterm USER=buildd dpkg-buildpackage ───────────────── dpkg-buildpackage: source package hardening-wrapper dpkg-buildpackage: source version 2.2 dpkg-source --before-build hardening-wrapper-2.2 dpkg-buildpackage: host architecture armhf 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 debian/rules build-arch dh build-arch dh_testdir -a dh_auto_configure -a dh_auto_build -a make[1]: Entering directory `/«PKGBUILDDIR»' if [ -z "armhf" ]; 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#/ '"armhf"'/;' 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 -a 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 (0x84b0) cc -Wall -fPIE -pie hello.c -o ../build-tree/cc-test || true ../build-tree/cc-test || true ../build-tree/cc-test: ok (0x4007b700) ../build-tree/cc-test || true ../build-tree/cc-test: ok (0x40043700) 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/gcc-4.6 -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 0x835c There are 8 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align EXIDX 0x000538 0x00008538 0x00008538 0x00008 0x00008 R 0x4 PHDR 0x000034 0x00008034 0x00008034 0x00100 0x00100 R E 0x4 INTERP 0x000134 0x00008134 0x00008134 0x00027 0x00027 R 0x1 [Requesting program interpreter: /lib/arm-linux-gnueabihf/ld-linux.so.3] LOAD 0x000000 0x00008000 0x00008000 0x00544 0x00544 R E 0x8000 LOAD 0x000544 0x00010544 0x00010544 0x00128 0x0012c RW 0x8000 DYNAMIC 0x000550 0x00010550 0x00010550 0x000f0 0x000f0 RW 0x4 NOTE 0x00015c 0x0000815c 0x0000815c 0x00044 0x00044 R 0x4 GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4 Section to Segment mapping: Segment Sections... 00 .ARM.exidx 01 02 .interp 03 .interp .note.ABI-tag .note.gnu.build-id .hash .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .ARM.exidx .eh_frame 04 .init_array .fini_array .jcr .dynamic .got .data .bss 05 .dynamic 06 .note.ABI-tag .note.gnu.build-id 07 Dynamic section at offset 0x550 contains 25 entries: Tag Type Name/Value 0x00000001 (NEEDED) Shared library: [libc.so.6] 0x0000000c (INIT) 0x8300 0x0000000d (FINI) 0x8518 0x00000019 (INIT_ARRAY) 0x10544 0x0000001b (INIT_ARRAYSZ) 4 (bytes) 0x0000001a (FINI_ARRAY) 0x10548 0x0000001c (FINI_ARRAYSZ) 4 (bytes) 0x00000004 (HASH) 0x81a0 0x6ffffef5 (GNU_HASH) 0x81cc 0x00000005 (STRTAB) 0x825c 0x00000006 (SYMTAB) 0x81fc 0x0000000a (STRSZ) 69 (bytes) 0x0000000b (SYMENT) 16 (bytes) 0x00000015 (DEBUG) 0x0 0x00000003 (PLTGOT) 0x10640 0x00000002 (PLTRELSZ) 40 (bytes) 0x00000014 (PLTREL) REL 0x00000017 (JMPREL) 0x82d8 0x00000011 (REL) 0x82d0 0x00000012 (RELSZ) 8 (bytes) 0x00000013 (RELENT) 8 (bytes) 0x6ffffffe (VERNEED) 0x82b0 0x6fffffff (VERNEEDNUM) 1 0x6ffffff0 (VERSYM) 0x82a2 0x00000000 (NULL) 0x0 Relocation section '.rel.dyn' at offset 0x2d0 contains 1 entries: Offset Info Type Sym. Value Symbol's Name 00010660 00000115 R_ARM_GLOB_DAT 00000000 __gmon_start__ Relocation section '.rel.plt' at offset 0x2d8 contains 5 entries: Offset Info Type Sym. Value Symbol's Name 0001064c 00000216 R_ARM_JUMP_SLOT 00008320 printf 00010650 00000516 R_ARM_JUMP_SLOT 0000832c __libc_start_main 00010654 00000116 R_ARM_JUMP_SLOT 00000000 __gmon_start__ 00010658 00000316 R_ARM_JUMP_SLOT 00008344 snprintf 0001065c 00000416 R_ARM_JUMP_SLOT 00008350 abort Symbol table '.dynsym' contains 6 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 2: 00008320 0 FUNC GLOBAL DEFAULT UND printf@GLIBC_2.4 (2) 3: 00008344 0 FUNC GLOBAL DEFAULT UND snprintf@GLIBC_2.4 (2) 4: 00008350 0 FUNC GLOBAL DEFAULT UND abort@GLIBC_2.4 (2) 5: 0000832c 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.4 (2) Symbol table '.symtab' contains 100 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00008134 0 SECTION LOCAL DEFAULT 1 2: 0000815c 0 SECTION LOCAL DEFAULT 2 3: 0000817c 0 SECTION LOCAL DEFAULT 3 4: 000081a0 0 SECTION LOCAL DEFAULT 4 5: 000081cc 0 SECTION LOCAL DEFAULT 5 6: 000081fc 0 SECTION LOCAL DEFAULT 6 7: 0000825c 0 SECTION LOCAL DEFAULT 7 8: 000082a2 0 SECTION LOCAL DEFAULT 8 9: 000082b0 0 SECTION LOCAL DEFAULT 9 10: 000082d0 0 SECTION LOCAL DEFAULT 10 11: 000082d8 0 SECTION LOCAL DEFAULT 11 12: 00008300 0 SECTION LOCAL DEFAULT 12 13: 0000830c 0 SECTION LOCAL DEFAULT 13 14: 0000835c 0 SECTION LOCAL DEFAULT 14 15: 00008518 0 SECTION LOCAL DEFAULT 15 16: 00008520 0 SECTION LOCAL DEFAULT 16 17: 00008538 0 SECTION LOCAL DEFAULT 17 18: 00008540 0 SECTION LOCAL DEFAULT 18 19: 00010544 0 SECTION LOCAL DEFAULT 19 20: 00010548 0 SECTION LOCAL DEFAULT 20 21: 0001054c 0 SECTION LOCAL DEFAULT 21 22: 00010550 0 SECTION LOCAL DEFAULT 22 23: 00010640 0 SECTION LOCAL DEFAULT 23 24: 00010664 0 SECTION LOCAL DEFAULT 24 25: 0001066c 0 SECTION LOCAL DEFAULT 25 26: 00000000 0 SECTION LOCAL DEFAULT 26 27: 00000000 0 SECTION LOCAL DEFAULT 27 28: 0000815c 0 NOTYPE LOCAL DEFAULT 2 $d 29: 0000835c 0 NOTYPE LOCAL DEFAULT 14 $a 30: 00008538 0 NOTYPE LOCAL DEFAULT 17 $d 31: 0000838c 0 NOTYPE LOCAL DEFAULT 14 $d 32: 00008520 0 NOTYPE LOCAL DEFAULT 16 $d 33: 00010664 0 NOTYPE LOCAL DEFAULT 24 $d 34: 00008398 0 NOTYPE LOCAL DEFAULT 14 $a 35: 00008398 0 FUNC LOCAL DEFAULT 14 call_gmon_start 36: 000083b4 0 NOTYPE LOCAL DEFAULT 14 $d 37: 00008300 0 NOTYPE LOCAL DEFAULT 12 $a 38: 00008518 0 NOTYPE LOCAL DEFAULT 15 $a 39: 00008308 0 NOTYPE LOCAL DEFAULT 12 $a 40: 0000851c 0 NOTYPE LOCAL DEFAULT 15 $a 41: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 42: 0001054c 0 OBJECT LOCAL DEFAULT 21 __JCR_LIST__ 43: 00010668 0 NOTYPE LOCAL DEFAULT 24 $d 44: 000083bc 0 NOTYPE LOCAL DEFAULT 14 $a 45: 000083bc 0 FUNC LOCAL DEFAULT 14 __do_global_dtors_aux 46: 000083d4 0 NOTYPE LOCAL DEFAULT 14 $d 47: 0001066c 1 OBJECT LOCAL DEFAULT 25 completed.5637 48: 00010548 0 NOTYPE LOCAL DEFAULT 20 $d 49: 00010548 0 OBJECT LOCAL DEFAULT 20 __do_global_dtors_aux_fini_array_entry 50: 000083d8 0 NOTYPE LOCAL DEFAULT 14 $a 51: 000083d8 0 FUNC LOCAL DEFAULT 14 frame_dummy 52: 00008400 0 NOTYPE LOCAL DEFAULT 14 $d 53: 00010544 0 NOTYPE LOCAL DEFAULT 19 $d 54: 00010544 0 OBJECT LOCAL DEFAULT 19 __frame_dummy_init_array_entry 55: 0001066c 0 NOTYPE LOCAL DEFAULT 25 $d 56: 00000000 0 FILE LOCAL DEFAULT ABS hello.c 57: 00008524 0 NOTYPE LOCAL DEFAULT 16 $d 58: 00008408 0 NOTYPE LOCAL DEFAULT 14 $a 59: 00008468 0 NOTYPE LOCAL DEFAULT 14 $d 60: 00008474 0 NOTYPE LOCAL DEFAULT 14 $a 61: 000084b4 0 NOTYPE LOCAL DEFAULT 14 $a 62: 0000850c 0 NOTYPE LOCAL DEFAULT 14 $d 63: 00008514 0 NOTYPE LOCAL DEFAULT 14 $a 64: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 65: 00008540 0 NOTYPE LOCAL DEFAULT 18 $d 66: 00008540 0 OBJECT LOCAL DEFAULT 18 __FRAME_END__ 67: 0001054c 0 NOTYPE LOCAL DEFAULT 21 $d 68: 0001054c 0 OBJECT LOCAL DEFAULT 21 __JCR_END__ 69: 00010548 0 NOTYPE LOCAL DEFAULT 19 __init_array_end 70: 00010550 0 OBJECT LOCAL DEFAULT 22 _DYNAMIC 71: 00010544 0 NOTYPE LOCAL DEFAULT 19 __init_array_start 72: 00010640 0 OBJECT LOCAL DEFAULT 23 _GLOBAL_OFFSET_TABLE_ 73: 0000830c 0 NOTYPE LOCAL DEFAULT 13 $a 74: 0000831c 0 NOTYPE LOCAL DEFAULT 13 $d 75: 00008320 0 NOTYPE LOCAL DEFAULT 13 $a 76: 00008514 4 FUNC GLOBAL DEFAULT 14 __libc_csu_fini 77: 00010664 0 NOTYPE WEAK DEFAULT 24 data_start 78: 00008320 0 FUNC GLOBAL DEFAULT UND printf@@GLIBC_2.4 79: 0001066c 0 NOTYPE GLOBAL DEFAULT ABS __bss_start__ 80: 00010670 0 NOTYPE GLOBAL DEFAULT ABS _bss_end__ 81: 0001066c 0 NOTYPE GLOBAL DEFAULT ABS _edata 82: 00008518 0 FUNC GLOBAL DEFAULT 15 _fini 83: 00010670 0 NOTYPE GLOBAL DEFAULT ABS __bss_end__ 84: 00010664 0 NOTYPE GLOBAL DEFAULT 24 __data_start 85: 0000832c 0 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_2.4 86: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 87: 00010668 0 OBJECT GLOBAL HIDDEN 24 __dso_handle 88: 00008408 108 FUNC GLOBAL DEFAULT 14 announcement 89: 00008520 4 OBJECT GLOBAL DEFAULT 16 _IO_stdin_used 90: 000084b4 96 FUNC GLOBAL DEFAULT 14 __libc_csu_init 91: 00008344 0 FUNC GLOBAL DEFAULT UND snprintf@@GLIBC_2.4 92: 00010670 0 NOTYPE GLOBAL DEFAULT ABS _end 93: 0000835c 0 FUNC GLOBAL DEFAULT 14 _start 94: 00010670 0 NOTYPE GLOBAL DEFAULT ABS __end__ 95: 0001066c 0 NOTYPE GLOBAL DEFAULT ABS __bss_start 96: 00008474 64 FUNC GLOBAL DEFAULT 14 main 97: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses 98: 00008350 0 FUNC GLOBAL DEFAULT UND abort@@GLIBC_2.4 99: 00008300 0 FUNC GLOBAL DEFAULT 12 _init ../build-tree/wrapper-test-stock ../build-tree/wrapper-test-stock: ok (0x8408) # 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/gcc-4.6 -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 readelf -ldrsW ../build-tree/wrapper-test-compiled Elf file type is DYN (Shared object file) Entry point 0x6c4 There are 9 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align EXIDX 0x0008f8 0x000008f8 0x000008f8 0x00008 0x00008 R 0x4 PHDR 0x000034 0x00000034 0x00000034 0x00120 0x00120 R E 0x4 INTERP 0x000154 0x00000154 0x00000154 0x00027 0x00027 R 0x1 [Requesting program interpreter: /lib/arm-linux-gnueabihf/ld-linux.so.3] LOAD 0x000000 0x00000000 0x00000000 0x00904 0x00904 R E 0x8000 LOAD 0x000efc 0x00008efc 0x00008efc 0x00150 0x00154 RW 0x8000 DYNAMIC 0x000f08 0x00008f08 0x00008f08 0x000f8 0x000f8 RW 0x4 NOTE 0x00017c 0x0000017c 0x0000017c 0x00044 0x00044 R 0x4 GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4 GNU_RELRO 0x000efc 0x00008efc 0x00008efc 0x00104 0x00104 R 0x1 Section to Segment mapping: Segment Sections... 00 .ARM.exidx 01 02 .interp 03 .interp .note.ABI-tag .note.gnu.build-id .hash .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .ARM.exidx .eh_frame 04 .init_array .fini_array .jcr .dynamic .got .data .bss 05 .dynamic 06 .note.ABI-tag .note.gnu.build-id 07 08 .init_array .fini_array .jcr .dynamic Dynamic section at offset 0xf08 contains 27 entries: Tag Type Name/Value 0x00000001 (NEEDED) Shared library: [libc.so.6] 0x00000001 (NEEDED) Shared library: [ld-linux-armhf.so.3] 0x0000000c (INIT) 0x634 0x0000000d (FINI) 0x8d8 0x00000019 (INIT_ARRAY) 0x8efc 0x0000001b (INIT_ARRAYSZ) 4 (bytes) 0x0000001a (FINI_ARRAY) 0x8f00 0x0000001c (FINI_ARRAYSZ) 4 (bytes) 0x00000004 (HASH) 0x1c0 0x6ffffef5 (GNU_HASH) 0x268 0x00000005 (STRTAB) 0x428 0x00000006 (SYMTAB) 0x2b8 0x0000000a (STRSZ) 275 (bytes) 0x0000000b (SYMENT) 16 (bytes) 0x00000015 (DEBUG) 0x0 0x00000003 (PLTGOT) 0x9000 0x00000002 (PLTRELSZ) 56 (bytes) 0x00000014 (PLTREL) REL 0x00000017 (JMPREL) 0x5fc 0x00000011 (REL) 0x5ac 0x00000012 (RELSZ) 80 (bytes) 0x00000013 (RELENT) 8 (bytes) 0x6ffffffe (VERNEED) 0x56c 0x6fffffff (VERNEEDNUM) 2 0x6ffffff0 (VERSYM) 0x53c 0x6ffffffa (RELCOUNT) 6 0x00000000 (NULL) 0x0 Relocation section '.rel.dyn' at offset 0x5ac contains 10 entries: Offset Info Type Sym. Value Symbol's Name 00008efc 00000017 R_ARM_RELATIVE 00008f00 00000017 R_ARM_RELATIVE 00009028 00000017 R_ARM_RELATIVE 00009038 00000017 R_ARM_RELATIVE 0000903c 00000017 R_ARM_RELATIVE 00009048 00000017 R_ARM_RELATIVE 0000902c 00000315 R_ARM_GLOB_DAT 00000000 __cxa_finalize 00009030 00000415 R_ARM_GLOB_DAT 00000000 __stack_chk_guard 00009034 00000715 R_ARM_GLOB_DAT 00000000 __gmon_start__ 00009040 00000a15 R_ARM_GLOB_DAT 00000000 _Jv_RegisterClasses Relocation section '.rel.plt' at offset 0x5fc contains 7 entries: Offset Info Type Sym. Value Symbol's Name 0000900c 00000316 R_ARM_JUMP_SLOT 00000000 __cxa_finalize 00009010 00000516 R_ARM_JUMP_SLOT 00000000 __stack_chk_fail 00009014 00000616 R_ARM_JUMP_SLOT 00000000 __libc_start_main 00009018 00000716 R_ARM_JUMP_SLOT 00000000 __gmon_start__ 0000901c 00000816 R_ARM_JUMP_SLOT 00000000 snprintf 00009020 00000916 R_ARM_JUMP_SLOT 00000000 __printf_chk 00009024 00000b16 R_ARM_JUMP_SLOT 00000000 abort Symbol table '.dynsym' contains 23 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000154 0 SECTION LOCAL DEFAULT 1 2: 00008f04 0 SECTION LOCAL DEFAULT 21 3: 00000000 0 FUNC WEAK DEFAULT UND __cxa_finalize@GLIBC_2.4 (2) 4: 00000000 0 OBJECT GLOBAL DEFAULT UND __stack_chk_guard@GLIBC_2.4 (3) 5: 00000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@GLIBC_2.4 (2) 6: 00000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.4 (2) 7: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 8: 00000000 0 FUNC GLOBAL DEFAULT UND snprintf@GLIBC_2.4 (2) 9: 00000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@GLIBC_2.4 (2) 10: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses 11: 00000000 0 FUNC GLOBAL DEFAULT UND abort@GLIBC_2.4 (2) 12: 00009050 0 NOTYPE GLOBAL DEFAULT ABS _bss_end__ 13: 0000904c 0 NOTYPE GLOBAL DEFAULT ABS _edata 14: 00009044 0 NOTYPE GLOBAL DEFAULT 24 __data_start 15: 00009050 0 NOTYPE GLOBAL DEFAULT ABS _end 16: 00009050 0 NOTYPE GLOBAL DEFAULT ABS __bss_end__ 17: 00000874 96 FUNC GLOBAL DEFAULT 14 __libc_csu_init 18: 0000904c 0 NOTYPE GLOBAL DEFAULT ABS __bss_start 19: 000006a8 28 FUNC GLOBAL DEFAULT 14 main 20: 000008d4 4 FUNC GLOBAL DEFAULT 14 __libc_csu_fini 21: 0000904c 0 NOTYPE GLOBAL DEFAULT ABS __bss_start__ 22: 00009050 0 NOTYPE GLOBAL DEFAULT ABS __end__ Symbol table '.symtab' contains 112 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000154 0 SECTION LOCAL DEFAULT 1 2: 0000017c 0 SECTION LOCAL DEFAULT 2 3: 0000019c 0 SECTION LOCAL DEFAULT 3 4: 000001c0 0 SECTION LOCAL DEFAULT 4 5: 00000268 0 SECTION LOCAL DEFAULT 5 6: 000002b8 0 SECTION LOCAL DEFAULT 6 7: 00000428 0 SECTION LOCAL DEFAULT 7 8: 0000053c 0 SECTION LOCAL DEFAULT 8 9: 0000056c 0 SECTION LOCAL DEFAULT 9 10: 000005ac 0 SECTION LOCAL DEFAULT 10 11: 000005fc 0 SECTION LOCAL DEFAULT 11 12: 00000634 0 SECTION LOCAL DEFAULT 12 13: 00000640 0 SECTION LOCAL DEFAULT 13 14: 000006a8 0 SECTION LOCAL DEFAULT 14 15: 000008d8 0 SECTION LOCAL DEFAULT 15 16: 000008e0 0 SECTION LOCAL DEFAULT 16 17: 000008f8 0 SECTION LOCAL DEFAULT 17 18: 00000900 0 SECTION LOCAL DEFAULT 18 19: 00008efc 0 SECTION LOCAL DEFAULT 19 20: 00008f00 0 SECTION LOCAL DEFAULT 20 21: 00008f04 0 SECTION LOCAL DEFAULT 21 22: 00008f08 0 SECTION LOCAL DEFAULT 22 23: 00009000 0 SECTION LOCAL DEFAULT 23 24: 00009044 0 SECTION LOCAL DEFAULT 24 25: 0000904c 0 SECTION LOCAL DEFAULT 25 26: 00000000 0 SECTION LOCAL DEFAULT 26 27: 00000000 0 SECTION LOCAL DEFAULT 27 28: 00000000 0 SECTION LOCAL DEFAULT 28 29: 00000000 0 SECTION LOCAL DEFAULT 29 30: 00000000 0 SECTION LOCAL DEFAULT 30 31: 00000000 0 SECTION LOCAL DEFAULT 31 32: 00000000 0 SECTION LOCAL DEFAULT 32 33: 00000000 0 SECTION LOCAL DEFAULT 33 34: 00000000 0 SECTION LOCAL DEFAULT 34 35: 00000000 0 SECTION LOCAL DEFAULT 35 36: 0000017c 0 NOTYPE LOCAL DEFAULT 2 $d 37: 000006c4 0 NOTYPE LOCAL DEFAULT 14 $a 38: 0000070c 0 NOTYPE LOCAL DEFAULT 14 $d 39: 000008f8 0 NOTYPE LOCAL DEFAULT 17 $d 40: 000008e0 0 NOTYPE LOCAL DEFAULT 16 $d 41: 00009044 0 NOTYPE LOCAL DEFAULT 24 $d 42: 0000071c 0 NOTYPE LOCAL DEFAULT 14 $a 43: 0000071c 0 FUNC LOCAL DEFAULT 14 call_gmon_start 44: 00000738 0 NOTYPE LOCAL DEFAULT 14 $d 45: 00000634 0 NOTYPE LOCAL DEFAULT 12 $a 46: 000008d8 0 NOTYPE LOCAL DEFAULT 15 $a 47: 0000063c 0 NOTYPE LOCAL DEFAULT 12 $a 48: 000008dc 0 NOTYPE LOCAL DEFAULT 15 $a 49: 00000000 0 FILE LOCAL DEFAULT ABS hello.c 50: 000007e8 0 NOTYPE LOCAL DEFAULT 14 $a 51: 00000860 0 NOTYPE LOCAL DEFAULT 14 $d 52: 000006a8 0 NOTYPE LOCAL DEFAULT 14 $a 53: 000008e4 0 NOTYPE LOCAL DEFAULT 16 $d 54: 00000010 0 NOTYPE LOCAL DEFAULT 32 $d 55: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 56: 00008f04 0 OBJECT LOCAL DEFAULT 21 __JCR_LIST__ 57: 00009048 0 NOTYPE LOCAL DEFAULT 24 $d 58: 00000740 0 NOTYPE LOCAL DEFAULT 14 $a 59: 00000740 0 FUNC LOCAL DEFAULT 14 __do_global_dtors_aux 60: 00000790 0 NOTYPE LOCAL DEFAULT 14 $d 61: 0000904c 1 OBJECT LOCAL DEFAULT 25 completed.5637 62: 00008f00 0 NOTYPE LOCAL DEFAULT 20 $d 63: 00008f00 0 OBJECT LOCAL DEFAULT 20 __do_global_dtors_aux_fini_array_entry 64: 000007a4 0 NOTYPE LOCAL DEFAULT 14 $a 65: 000007a4 0 FUNC LOCAL DEFAULT 14 frame_dummy 66: 000007dc 0 NOTYPE LOCAL DEFAULT 14 $d 67: 00008efc 0 NOTYPE LOCAL DEFAULT 19 $d 68: 00008efc 0 OBJECT LOCAL DEFAULT 19 __frame_dummy_init_array_entry 69: 0000904c 0 NOTYPE LOCAL DEFAULT 25 $d 70: 00000874 0 NOTYPE LOCAL DEFAULT 14 $a 71: 000008cc 0 NOTYPE LOCAL DEFAULT 14 $d 72: 000008d4 0 NOTYPE LOCAL DEFAULT 14 $a 73: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 74: 00000900 0 NOTYPE LOCAL DEFAULT 18 $d 75: 00000900 0 OBJECT LOCAL DEFAULT 18 __FRAME_END__ 76: 00008f04 0 NOTYPE LOCAL DEFAULT 21 $d 77: 00008f04 0 OBJECT LOCAL DEFAULT 21 __JCR_END__ 78: 00008f00 0 NOTYPE LOCAL DEFAULT 19 __init_array_end 79: 00008f08 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC 80: 00008efc 0 NOTYPE LOCAL DEFAULT 19 __init_array_start 81: 00009000 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ 82: 00000640 0 NOTYPE LOCAL DEFAULT 13 $a 83: 00000650 0 NOTYPE LOCAL DEFAULT 13 $d 84: 00000654 0 NOTYPE LOCAL DEFAULT 13 $a 85: 000008d4 4 FUNC GLOBAL DEFAULT 14 __libc_csu_fini 86: 00000000 0 FUNC WEAK DEFAULT UND __cxa_finalize@@GLIBC_2.4 87: 00009044 0 NOTYPE WEAK DEFAULT 24 data_start 88: 0000904c 0 NOTYPE GLOBAL DEFAULT ABS __bss_start__ 89: 00000000 0 OBJECT GLOBAL DEFAULT UND __stack_chk_guard@@GLIBC_2.4 90: 00009050 0 NOTYPE GLOBAL DEFAULT ABS _bss_end__ 91: 0000904c 0 NOTYPE GLOBAL DEFAULT ABS _edata 92: 000008d8 0 FUNC GLOBAL DEFAULT 15 _fini 93: 00009050 0 NOTYPE GLOBAL DEFAULT ABS __bss_end__ 94: 00000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@@GLIBC_2.4 95: 00009044 0 NOTYPE GLOBAL DEFAULT 24 __data_start 96: 00000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_2.4 97: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 98: 00009048 0 OBJECT GLOBAL HIDDEN 24 __dso_handle 99: 000007e8 140 FUNC GLOBAL DEFAULT 14 announcement 100: 000008e0 4 OBJECT GLOBAL DEFAULT 16 _IO_stdin_used 101: 00000874 96 FUNC GLOBAL DEFAULT 14 __libc_csu_init 102: 00000000 0 FUNC GLOBAL DEFAULT UND snprintf@@GLIBC_2.4 103: 00009050 0 NOTYPE GLOBAL DEFAULT ABS _end 104: 000006c4 0 FUNC GLOBAL DEFAULT 14 _start 105: 00000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@@GLIBC_2.4 106: 00009050 0 NOTYPE GLOBAL DEFAULT ABS __end__ 107: 0000904c 0 NOTYPE GLOBAL DEFAULT ABS __bss_start 108: 000006a8 28 FUNC GLOBAL DEFAULT 14 main 109: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses 110: 00000000 0 FUNC GLOBAL DEFAULT UND abort@@GLIBC_2.4 111: 00000634 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 (0x4004e7e8) ../build-tree/wrapper-test-compiled ../build-tree/wrapper-test-compiled: ok (0x400e07e8) # 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/gcc-4.6 -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 /usr/bin/ld.bfd -z now --sysroot=/ --build-id --no-add-needed --eh-frame-hdr -dynamic-linker /lib/arm-linux-gnueabihf/ld-linux.so.3 -X --hash-style=both -m armelf_linux_eabi -pie -o ../build-tree/wrapper-test-linked /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/Scrt1.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crti.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtbeginS.o -L../build-tree -L/usr/lib/gcc/arm-linux-gnueabihf/4.6 -L/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf -L/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../.. -L/lib/arm-linux-gnueabihf -L/usr/lib/arm-linux-gnueabihf -z relro /tmp/cczXhq5Y.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtendS.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crtn.o readelf -ldrsW ../build-tree/wrapper-test-linked Elf file type is DYN (Shared object file) Entry point 0x6c4 There are 9 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align EXIDX 0x0008f8 0x000008f8 0x000008f8 0x00008 0x00008 R 0x4 PHDR 0x000034 0x00000034 0x00000034 0x00120 0x00120 R E 0x4 INTERP 0x000154 0x00000154 0x00000154 0x00027 0x00027 R 0x1 [Requesting program interpreter: /lib/arm-linux-gnueabihf/ld-linux.so.3] LOAD 0x000000 0x00000000 0x00000000 0x00904 0x00904 R E 0x8000 LOAD 0x000ea8 0x00008ea8 0x00008ea8 0x00160 0x00164 RW 0x8000 DYNAMIC 0x000eb4 0x00008eb4 0x00008eb4 0x00108 0x00108 RW 0x4 NOTE 0x00017c 0x0000017c 0x0000017c 0x00044 0x00044 R 0x4 GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4 GNU_RELRO 0x000ea8 0x00008ea8 0x00008ea8 0x00158 0x00158 R 0x1 Section to Segment mapping: Segment Sections... 00 .ARM.exidx 01 02 .interp 03 .interp .note.ABI-tag .note.gnu.build-id .hash .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .ARM.exidx .eh_frame 04 .init_array .fini_array .jcr .dynamic .got .data .bss 05 .dynamic 06 .note.ABI-tag .note.gnu.build-id 07 08 .init_array .fini_array .jcr .dynamic .got Dynamic section at offset 0xeb4 contains 29 entries: Tag Type Name/Value 0x00000001 (NEEDED) Shared library: [libc.so.6] 0x00000001 (NEEDED) Shared library: [ld-linux-armhf.so.3] 0x0000000c (INIT) 0x634 0x0000000d (FINI) 0x8d8 0x00000019 (INIT_ARRAY) 0x8ea8 0x0000001b (INIT_ARRAYSZ) 4 (bytes) 0x0000001a (FINI_ARRAY) 0x8eac 0x0000001c (FINI_ARRAYSZ) 4 (bytes) 0x00000004 (HASH) 0x1c0 0x6ffffef5 (GNU_HASH) 0x268 0x00000005 (STRTAB) 0x428 0x00000006 (SYMTAB) 0x2b8 0x0000000a (STRSZ) 275 (bytes) 0x0000000b (SYMENT) 16 (bytes) 0x00000015 (DEBUG) 0x0 0x00000003 (PLTGOT) 0x8fbc 0x00000002 (PLTRELSZ) 56 (bytes) 0x00000014 (PLTREL) REL 0x00000017 (JMPREL) 0x5fc 0x00000011 (REL) 0x5ac 0x00000012 (RELSZ) 80 (bytes) 0x00000013 (RELENT) 8 (bytes) 0x00000018 (BIND_NOW) 0x6ffffffb (FLAGS_1) Flags: NOW 0x6ffffffe (VERNEED) 0x56c 0x6fffffff (VERNEEDNUM) 2 0x6ffffff0 (VERSYM) 0x53c 0x6ffffffa (RELCOUNT) 6 0x00000000 (NULL) 0x0 Relocation section '.rel.dyn' at offset 0x5ac contains 10 entries: Offset Info Type Sym. Value Symbol's Name 00008ea8 00000017 R_ARM_RELATIVE 00008eac 00000017 R_ARM_RELATIVE 00008fe4 00000017 R_ARM_RELATIVE 00008ff4 00000017 R_ARM_RELATIVE 00008ff8 00000017 R_ARM_RELATIVE 00009004 00000017 R_ARM_RELATIVE 00008fe8 00000315 R_ARM_GLOB_DAT 00000000 __cxa_finalize 00008fec 00000415 R_ARM_GLOB_DAT 00000000 __stack_chk_guard 00008ff0 00000715 R_ARM_GLOB_DAT 00000000 __gmon_start__ 00008ffc 00000a15 R_ARM_GLOB_DAT 00000000 _Jv_RegisterClasses Relocation section '.rel.plt' at offset 0x5fc contains 7 entries: Offset Info Type Sym. Value Symbol's Name 00008fc8 00000316 R_ARM_JUMP_SLOT 00000000 __cxa_finalize 00008fcc 00000516 R_ARM_JUMP_SLOT 00000000 __stack_chk_fail 00008fd0 00000616 R_ARM_JUMP_SLOT 00000000 __libc_start_main 00008fd4 00000716 R_ARM_JUMP_SLOT 00000000 __gmon_start__ 00008fd8 00000816 R_ARM_JUMP_SLOT 00000000 snprintf 00008fdc 00000916 R_ARM_JUMP_SLOT 00000000 __printf_chk 00008fe0 00000b16 R_ARM_JUMP_SLOT 00000000 abort Symbol table '.dynsym' contains 23 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000154 0 SECTION LOCAL DEFAULT 1 2: 00008eb0 0 SECTION LOCAL DEFAULT 21 3: 00000000 0 FUNC WEAK DEFAULT UND __cxa_finalize@GLIBC_2.4 (2) 4: 00000000 0 OBJECT GLOBAL DEFAULT UND __stack_chk_guard@GLIBC_2.4 (3) 5: 00000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@GLIBC_2.4 (2) 6: 00000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.4 (2) 7: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 8: 00000000 0 FUNC GLOBAL DEFAULT UND snprintf@GLIBC_2.4 (2) 9: 00000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@GLIBC_2.4 (2) 10: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses 11: 00000000 0 FUNC GLOBAL DEFAULT UND abort@GLIBC_2.4 (2) 12: 0000900c 0 NOTYPE GLOBAL DEFAULT ABS _bss_end__ 13: 00009008 0 NOTYPE GLOBAL DEFAULT ABS _edata 14: 00009000 0 NOTYPE GLOBAL DEFAULT 24 __data_start 15: 0000900c 0 NOTYPE GLOBAL DEFAULT ABS _end 16: 0000900c 0 NOTYPE GLOBAL DEFAULT ABS __bss_end__ 17: 00000874 96 FUNC GLOBAL DEFAULT 14 __libc_csu_init 18: 00009008 0 NOTYPE GLOBAL DEFAULT ABS __bss_start 19: 000006a8 28 FUNC GLOBAL DEFAULT 14 main 20: 000008d4 4 FUNC GLOBAL DEFAULT 14 __libc_csu_fini 21: 00009008 0 NOTYPE GLOBAL DEFAULT ABS __bss_start__ 22: 0000900c 0 NOTYPE GLOBAL DEFAULT ABS __end__ Symbol table '.symtab' contains 112 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000154 0 SECTION LOCAL DEFAULT 1 2: 0000017c 0 SECTION LOCAL DEFAULT 2 3: 0000019c 0 SECTION LOCAL DEFAULT 3 4: 000001c0 0 SECTION LOCAL DEFAULT 4 5: 00000268 0 SECTION LOCAL DEFAULT 5 6: 000002b8 0 SECTION LOCAL DEFAULT 6 7: 00000428 0 SECTION LOCAL DEFAULT 7 8: 0000053c 0 SECTION LOCAL DEFAULT 8 9: 0000056c 0 SECTION LOCAL DEFAULT 9 10: 000005ac 0 SECTION LOCAL DEFAULT 10 11: 000005fc 0 SECTION LOCAL DEFAULT 11 12: 00000634 0 SECTION LOCAL DEFAULT 12 13: 00000640 0 SECTION LOCAL DEFAULT 13 14: 000006a8 0 SECTION LOCAL DEFAULT 14 15: 000008d8 0 SECTION LOCAL DEFAULT 15 16: 000008e0 0 SECTION LOCAL DEFAULT 16 17: 000008f8 0 SECTION LOCAL DEFAULT 17 18: 00000900 0 SECTION LOCAL DEFAULT 18 19: 00008ea8 0 SECTION LOCAL DEFAULT 19 20: 00008eac 0 SECTION LOCAL DEFAULT 20 21: 00008eb0 0 SECTION LOCAL DEFAULT 21 22: 00008eb4 0 SECTION LOCAL DEFAULT 22 23: 00008fbc 0 SECTION LOCAL DEFAULT 23 24: 00009000 0 SECTION LOCAL DEFAULT 24 25: 00009008 0 SECTION LOCAL DEFAULT 25 26: 00000000 0 SECTION LOCAL DEFAULT 26 27: 00000000 0 SECTION LOCAL DEFAULT 27 28: 00000000 0 SECTION LOCAL DEFAULT 28 29: 00000000 0 SECTION LOCAL DEFAULT 29 30: 00000000 0 SECTION LOCAL DEFAULT 30 31: 00000000 0 SECTION LOCAL DEFAULT 31 32: 00000000 0 SECTION LOCAL DEFAULT 32 33: 00000000 0 SECTION LOCAL DEFAULT 33 34: 00000000 0 SECTION LOCAL DEFAULT 34 35: 00000000 0 SECTION LOCAL DEFAULT 35 36: 0000017c 0 NOTYPE LOCAL DEFAULT 2 $d 37: 000006c4 0 NOTYPE LOCAL DEFAULT 14 $a 38: 0000070c 0 NOTYPE LOCAL DEFAULT 14 $d 39: 000008f8 0 NOTYPE LOCAL DEFAULT 17 $d 40: 000008e0 0 NOTYPE LOCAL DEFAULT 16 $d 41: 00009000 0 NOTYPE LOCAL DEFAULT 24 $d 42: 0000071c 0 NOTYPE LOCAL DEFAULT 14 $a 43: 0000071c 0 FUNC LOCAL DEFAULT 14 call_gmon_start 44: 00000738 0 NOTYPE LOCAL DEFAULT 14 $d 45: 00000634 0 NOTYPE LOCAL DEFAULT 12 $a 46: 000008d8 0 NOTYPE LOCAL DEFAULT 15 $a 47: 0000063c 0 NOTYPE LOCAL DEFAULT 12 $a 48: 000008dc 0 NOTYPE LOCAL DEFAULT 15 $a 49: 00000000 0 FILE LOCAL DEFAULT ABS hello.c 50: 000007e8 0 NOTYPE LOCAL DEFAULT 14 $a 51: 00000860 0 NOTYPE LOCAL DEFAULT 14 $d 52: 000006a8 0 NOTYPE LOCAL DEFAULT 14 $a 53: 000008e4 0 NOTYPE LOCAL DEFAULT 16 $d 54: 00000010 0 NOTYPE LOCAL DEFAULT 32 $d 55: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 56: 00008eb0 0 OBJECT LOCAL DEFAULT 21 __JCR_LIST__ 57: 00009004 0 NOTYPE LOCAL DEFAULT 24 $d 58: 00000740 0 NOTYPE LOCAL DEFAULT 14 $a 59: 00000740 0 FUNC LOCAL DEFAULT 14 __do_global_dtors_aux 60: 00000790 0 NOTYPE LOCAL DEFAULT 14 $d 61: 00009008 1 OBJECT LOCAL DEFAULT 25 completed.5637 62: 00008eac 0 NOTYPE LOCAL DEFAULT 20 $d 63: 00008eac 0 OBJECT LOCAL DEFAULT 20 __do_global_dtors_aux_fini_array_entry 64: 000007a4 0 NOTYPE LOCAL DEFAULT 14 $a 65: 000007a4 0 FUNC LOCAL DEFAULT 14 frame_dummy 66: 000007dc 0 NOTYPE LOCAL DEFAULT 14 $d 67: 00008ea8 0 NOTYPE LOCAL DEFAULT 19 $d 68: 00008ea8 0 OBJECT LOCAL DEFAULT 19 __frame_dummy_init_array_entry 69: 00009008 0 NOTYPE LOCAL DEFAULT 25 $d 70: 00000874 0 NOTYPE LOCAL DEFAULT 14 $a 71: 000008cc 0 NOTYPE LOCAL DEFAULT 14 $d 72: 000008d4 0 NOTYPE LOCAL DEFAULT 14 $a 73: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 74: 00000900 0 NOTYPE LOCAL DEFAULT 18 $d 75: 00000900 0 OBJECT LOCAL DEFAULT 18 __FRAME_END__ 76: 00008eb0 0 NOTYPE LOCAL DEFAULT 21 $d 77: 00008eb0 0 OBJECT LOCAL DEFAULT 21 __JCR_END__ 78: 00008eac 0 NOTYPE LOCAL DEFAULT 19 __init_array_end 79: 00008eb4 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC 80: 00008ea8 0 NOTYPE LOCAL DEFAULT 19 __init_array_start 81: 00008fbc 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ 82: 00000640 0 NOTYPE LOCAL DEFAULT 13 $a 83: 00000650 0 NOTYPE LOCAL DEFAULT 13 $d 84: 00000654 0 NOTYPE LOCAL DEFAULT 13 $a 85: 000008d4 4 FUNC GLOBAL DEFAULT 14 __libc_csu_fini 86: 00000000 0 FUNC WEAK DEFAULT UND __cxa_finalize@@GLIBC_2.4 87: 00009000 0 NOTYPE WEAK DEFAULT 24 data_start 88: 00009008 0 NOTYPE GLOBAL DEFAULT ABS __bss_start__ 89: 00000000 0 OBJECT GLOBAL DEFAULT UND __stack_chk_guard@@GLIBC_2.4 90: 0000900c 0 NOTYPE GLOBAL DEFAULT ABS _bss_end__ 91: 00009008 0 NOTYPE GLOBAL DEFAULT ABS _edata 92: 000008d8 0 FUNC GLOBAL DEFAULT 15 _fini 93: 0000900c 0 NOTYPE GLOBAL DEFAULT ABS __bss_end__ 94: 00000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@@GLIBC_2.4 95: 00009000 0 NOTYPE GLOBAL DEFAULT 24 __data_start 96: 00000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_2.4 97: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 98: 00009004 0 OBJECT GLOBAL HIDDEN 24 __dso_handle 99: 000007e8 140 FUNC GLOBAL DEFAULT 14 announcement 100: 000008e0 4 OBJECT GLOBAL DEFAULT 16 _IO_stdin_used 101: 00000874 96 FUNC GLOBAL DEFAULT 14 __libc_csu_init 102: 00000000 0 FUNC GLOBAL DEFAULT UND snprintf@@GLIBC_2.4 103: 0000900c 0 NOTYPE GLOBAL DEFAULT ABS _end 104: 000006c4 0 FUNC GLOBAL DEFAULT 14 _start 105: 00000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@@GLIBC_2.4 106: 0000900c 0 NOTYPE GLOBAL DEFAULT ABS __end__ 107: 00009008 0 NOTYPE GLOBAL DEFAULT ABS __bss_start 108: 000006a8 28 FUNC GLOBAL DEFAULT 14 main 109: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses 110: 00000000 0 FUNC GLOBAL DEFAULT UND abort@@GLIBC_2.4 111: 00000634 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 (0x4005c7e8) ../build-tree/wrapper-test-linked ../build-tree/wrapper-test-linked: ok (0x400127e8) # 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 (some protected functions found) 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.4 # Test Format (no-op currently) # Test for RELRO readelf -lW ../build-tree/wrapper-test-linked | grep GNU_RELRO GNU_RELRO 0x000ea8 0x00008ea8 0x00008ea8 0x00158 0x00158 R 0x1 # Test for BIND_NOW readelf -dW ../build-tree/wrapper-test-linked | grep BIND_NOW 0x00000018 (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/gcc-4.6 -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 /usr/bin/ld.bfd -z now --sysroot=/ --build-id --no-add-needed --eh-frame-hdr -dynamic-linker /lib/arm-linux-gnueabihf/ld-linux.so.3 -X --hash-style=both -m armelf_linux_eabi -pie -o ../build-tree/wrapper-test-fPIC-direct /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/Scrt1.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crti.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtbeginS.o -L../build-tree -L/usr/lib/gcc/arm-linux-gnueabihf/4.6 -L/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf -L/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../.. -L/lib/arm-linux-gnueabihf -L/usr/lib/arm-linux-gnueabihf -z relro /tmp/ccEWlQan.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtendS.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crtn.o ../build-tree/wrapper-test-fPIC-direct ../build-tree/wrapper-test-fPIC-direct: ok (0x4008781c) # 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/gcc-4.6 -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 # 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/gcc-4.6 -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 /usr/bin/ld.bfd -z now --sysroot=/ --build-id --no-add-needed --eh-frame-hdr -dynamic-linker /lib/arm-linux-gnueabihf/ld-linux.so.3 -X --hash-style=both -m armelf_linux_eabi -pie -o ../build-tree/wrapper-test-fPIC /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/Scrt1.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crti.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtbeginS.o -L../build-tree -L/usr/lib/gcc/arm-linux-gnueabihf/4.6 -L/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf -L/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../.. -L/lib/arm-linux-gnueabihf -L/usr/lib/arm-linux-gnueabihf -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/lib/gcc/arm-linux-gnueabihf/4.6/crtendS.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crtn.o ../build-tree/wrapper-test-fPIC ../build-tree/wrapper-test-fPIC: ok (0x4008c81c) # 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/gcc-4.6 -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 format.c: In function 'main': format.c:11:5: error: format not a string literal and no format arguments [-Werror=format-security] cc1: some warnings being treated as errors # Make sure build succeeds with -Wno-format-security ../build-tree/hardened-cc -B ../build-tree/ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -O2 -Wno-format-security -Wl,-z,relro -o ../build-tree/wrapper-test-format-security format.c /usr/bin/gcc-4.6 -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 -Wno-format-security -Wl,-z,relro -o ../build-tree/wrapper-test-format-security format.c /usr/bin/ld.bfd -z now --sysroot=/ --build-id --no-add-needed --eh-frame-hdr -dynamic-linker /lib/arm-linux-gnueabihf/ld-linux.so.3 -X --hash-style=both -m armelf_linux_eabi -pie -o ../build-tree/wrapper-test-format-security /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/Scrt1.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crti.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtbeginS.o -L../build-tree -L/usr/lib/gcc/arm-linux-gnueabihf/4.6 -L/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf -L/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../.. -L/lib/arm-linux-gnueabihf -L/usr/lib/arm-linux-gnueabihf -z relro /tmp/ccAU2t5s.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtendS.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crtn.o # Make sure build stack-protects a small ssp buffer ../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-ssp-buffer-size-protect ssp-buffer-size-protect.c /usr/bin/gcc-4.6 -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-ssp-buffer-size-protect ssp-buffer-size-protect.c /usr/bin/ld.bfd -z now --sysroot=/ --build-id --no-add-needed --eh-frame-hdr -dynamic-linker /lib/arm-linux-gnueabihf/ld-linux.so.3 -X --hash-style=both -m armelf_linux_eabi -pie -o ../build-tree/wrapper-test-ssp-buffer-size-protect /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/Scrt1.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crti.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtbeginS.o -L../build-tree -L/usr/lib/gcc/arm-linux-gnueabihf/4.6 -L/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf -L/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../.. -L/lib/arm-linux-gnueabihf -L/usr/lib/arm-linux-gnueabihf -z relro /tmp/cceQHDHR.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtendS.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crtn.o # Test Stack Protector nm ../build-tree/wrapper-test-ssp-buffer-size-protect | egrep '__stack_chk_fail($|@@GLIBC)' U __stack_chk_fail@@GLIBC_2.4 # Make sure build does not stack-protects a tiny ssp buffer ../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-ssp-buffer-size-skip ssp-buffer-size-skip.c /usr/bin/gcc-4.6 -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-ssp-buffer-size-skip ssp-buffer-size-skip.c /usr/bin/ld.bfd -z now --sysroot=/ --build-id --no-add-needed --eh-frame-hdr -dynamic-linker /lib/arm-linux-gnueabihf/ld-linux.so.3 -X --hash-style=both -m armelf_linux_eabi -pie -o ../build-tree/wrapper-test-ssp-buffer-size-skip /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/Scrt1.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crti.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtbeginS.o -L../build-tree -L/usr/lib/gcc/arm-linux-gnueabihf/4.6 -L/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf -L/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../.. -L/lib/arm-linux-gnueabihf -L/usr/lib/arm-linux-gnueabihf -z relro /tmp/ccr6TvWy.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtendS.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crtn.o # Test Stack Protector is correctly skipped ! nm ../build-tree/wrapper-test-ssp-buffer-size-skip | egrep '__stack_chk_fail($|@@GLIBC)' ../build-tree/hardened-cc -B ../build-tree/ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -O2 -Wl,-z,relro -c -o ../build-tree/wrapper-test-all.o hello.c /usr/bin/gcc-4.6 -fstack-protector --param=ssp-buffer-size=4 -fPIE -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 -c -o ../build-tree/wrapper-test-all.o hello.c ar r ../build-tree/wrapper-test-all.a ../build-tree/wrapper-test-all.o ar: creating ../build-tree/wrapper-test-all.a readelf -ldrsW ../build-tree/wrapper-test-all.a File: ../build-tree/wrapper-test-all.a(wrapper-test-all.o) There are no program headers in this file. Relocation section '.rel.text' at offset 0x132c contains 7 entries: Offset Info Type Sym. Value Symbol's Name 00000038 00001a1b R_ARM_PLT32 00000000 snprintf 00000054 00001b1b R_ARM_PLT32 00000000 __printf_chk 00000074 00001c1b R_ARM_PLT32 00000000 __stack_chk_fail 00000078 00001d19 R_ARM_BASE_PREL 00000000 _GLOBAL_OFFSET_TABLE_ 0000007c 00001e1a R_ARM_GOT_BREL 00000000 __stack_chk_guard 00000080 00000703 R_ARM_REL32 00000000 .LC0 00000084 00000803 R_ARM_REL32 00000004 .LC1 Relocation section '.rel.text.startup' at offset 0x1364 contains 1 entries: Offset Info Type Sym. Value Symbol's Name 00000008 0000191b R_ARM_PLT32 00000000 announcement Relocation section '.rel.debug_info' at offset 0x136c contains 78 entries: Offset Info Type Sym. Value Symbol's Name 00000006 00000e02 R_ARM_ABS32 00000000 .debug_abbrev 0000000c 00001302 R_ARM_ABS32 00000000 .debug_str 00000011 00001302 R_ARM_ABS32 00000000 .debug_str 00000015 00001302 R_ARM_ABS32 00000000 .debug_str 00000021 00001102 R_ARM_ABS32 00000000 .debug_ranges 00000025 00001202 R_ARM_ABS32 00000000 .debug_line 0000002a 00001302 R_ARM_ABS32 00000000 .debug_str 00000037 00001302 R_ARM_ABS32 00000000 .debug_str 0000003e 00001302 R_ARM_ABS32 00000000 .debug_str 00000045 00001302 R_ARM_ABS32 00000000 .debug_str 0000004c 00001302 R_ARM_ABS32 00000000 .debug_str 00000053 00001302 R_ARM_ABS32 00000000 .debug_str 0000005a 00001302 R_ARM_ABS32 00000000 .debug_str 00000068 00001302 R_ARM_ABS32 00000000 .debug_str 0000006f 00001302 R_ARM_ABS32 00000000 .debug_str 00000074 00001302 R_ARM_ABS32 00000000 .debug_str 0000007f 00001302 R_ARM_ABS32 00000000 .debug_str 0000008c 00001302 R_ARM_ABS32 00000000 .debug_str 00000091 00001302 R_ARM_ABS32 00000000 .debug_str 000000a6 00001302 R_ARM_ABS32 00000000 .debug_str 000000ab 00001302 R_ARM_ABS32 00000000 .debug_str 000000b8 00001302 R_ARM_ABS32 00000000 .debug_str 000000c7 00001302 R_ARM_ABS32 00000000 .debug_str 000000d6 00001302 R_ARM_ABS32 00000000 .debug_str 000000e5 00001302 R_ARM_ABS32 00000000 .debug_str 000000f4 00001302 R_ARM_ABS32 00000000 .debug_str 00000103 00001302 R_ARM_ABS32 00000000 .debug_str 00000112 00001302 R_ARM_ABS32 00000000 .debug_str 00000121 00001302 R_ARM_ABS32 00000000 .debug_str 00000130 00001302 R_ARM_ABS32 00000000 .debug_str 0000013f 00001302 R_ARM_ABS32 00000000 .debug_str 0000014e 00001302 R_ARM_ABS32 00000000 .debug_str 0000015d 00001302 R_ARM_ABS32 00000000 .debug_str 0000016c 00001302 R_ARM_ABS32 00000000 .debug_str 0000017b 00001302 R_ARM_ABS32 00000000 .debug_str 0000018a 00001302 R_ARM_ABS32 00000000 .debug_str 00000199 00001302 R_ARM_ABS32 00000000 .debug_str 000001a8 00001302 R_ARM_ABS32 00000000 .debug_str 000001b7 00001302 R_ARM_ABS32 00000000 .debug_str 000001c6 00001302 R_ARM_ABS32 00000000 .debug_str 000001d5 00001302 R_ARM_ABS32 00000000 .debug_str 000001e4 00001302 R_ARM_ABS32 00000000 .debug_str 000001f3 00001302 R_ARM_ABS32 00000000 .debug_str 00000202 00001302 R_ARM_ABS32 00000000 .debug_str 00000211 00001302 R_ARM_ABS32 00000000 .debug_str 00000220 00001302 R_ARM_ABS32 00000000 .debug_str 0000022f 00001302 R_ARM_ABS32 00000000 .debug_str 0000023e 00001302 R_ARM_ABS32 00000000 .debug_str 0000024d 00001302 R_ARM_ABS32 00000000 .debug_str 0000025c 00001302 R_ARM_ABS32 00000000 .debug_str 0000026c 00001302 R_ARM_ABS32 00000000 .debug_str 00000273 00001302 R_ARM_ABS32 00000000 .debug_str 0000027f 00001302 R_ARM_ABS32 00000000 .debug_str 0000028d 00001302 R_ARM_ABS32 00000000 .debug_str 0000029b 00001302 R_ARM_ABS32 00000000 .debug_str 000002e8 00001302 R_ARM_ABS32 00000000 .debug_str 00000310 00001302 R_ARM_ABS32 00000000 .debug_str 0000031e 00001302 R_ARM_ABS32 00000000 .debug_str 00000330 00001302 R_ARM_ABS32 00000000 .debug_str 0000033e 00001302 R_ARM_ABS32 00000000 .debug_str 00000349 00000202 R_ARM_ABS32 00000000 .text 0000034d 00000202 R_ARM_ABS32 00000000 .text 00000351 00000f02 R_ARM_ABS32 00000000 .debug_loc 0000035a 00001302 R_ARM_ABS32 00000000 .debug_str 00000364 00000f02 R_ARM_ABS32 00000000 .debug_loc 0000037c 00000202 R_ARM_ABS32 00000000 .text 00000380 00000202 R_ARM_ABS32 00000000 .text 0000038d 00000b02 R_ARM_ABS32 00000000 .rodata.str1.4 000003a7 00001302 R_ARM_ABS32 00000000 .debug_str 000003b2 00000902 R_ARM_ABS32 00000000 .text.startup 000003b6 00000902 R_ARM_ABS32 00000000 .text.startup 000003ba 00000f02 R_ARM_ABS32 00000000 .debug_loc 000003c3 00001302 R_ARM_ABS32 00000000 .debug_str 000003cd 00000f02 R_ARM_ABS32 00000000 .debug_loc 000003d2 00001302 R_ARM_ABS32 00000000 .debug_str 000003dc 00000f02 R_ARM_ABS32 00000000 .debug_loc 000003e8 00001302 R_ARM_ABS32 00000000 .debug_str 000003f5 00001302 R_ARM_ABS32 00000000 .debug_str Relocation section '.rel.debug_loc' at offset 0x15dc contains 20 entries: Offset Info Type Sym. Value Symbol's Name 00000000 00000202 R_ARM_ABS32 00000000 .text 00000004 00000202 R_ARM_ABS32 00000000 .text 0000000c 00000202 R_ARM_ABS32 00000000 .text 00000010 00000202 R_ARM_ABS32 00000000 .text 00000018 00000202 R_ARM_ABS32 00000000 .text 0000001c 00000202 R_ARM_ABS32 00000000 .text 00000025 00000202 R_ARM_ABS32 00000000 .text 00000029 00000202 R_ARM_ABS32 00000000 .text 0000003a 00000202 R_ARM_ABS32 00000000 .text 0000003e 00000202 R_ARM_ABS32 00000000 .text 00000045 00000202 R_ARM_ABS32 00000000 .text 00000049 00000202 R_ARM_ABS32 00000000 .text 00000058 00000902 R_ARM_ABS32 00000000 .text.startup 0000005c 00000902 R_ARM_ABS32 00000000 .text.startup 00000064 00000902 R_ARM_ABS32 00000000 .text.startup 00000068 00000902 R_ARM_ABS32 00000000 .text.startup 00000078 00000902 R_ARM_ABS32 00000000 .text.startup 0000007c 00000902 R_ARM_ABS32 00000000 .text.startup 0000008b 00000902 R_ARM_ABS32 00000000 .text.startup 0000008f 00000902 R_ARM_ABS32 00000000 .text.startup Relocation section '.rel.debug_aranges' at offset 0x167c contains 3 entries: Offset Info Type Sym. Value Symbol's Name 00000006 00000d02 R_ARM_ABS32 00000000 .debug_info 00000010 00000202 R_ARM_ABS32 00000000 .text 00000018 00000902 R_ARM_ABS32 00000000 .text.startup Relocation section '.rel.debug_ranges' at offset 0x1694 contains 4 entries: Offset Info Type Sym. Value Symbol's Name 00000000 00000202 R_ARM_ABS32 00000000 .text 00000004 00000202 R_ARM_ABS32 00000000 .text 00000008 00000902 R_ARM_ABS32 00000000 .text.startup 0000000c 00000902 R_ARM_ABS32 00000000 .text.startup Relocation section '.rel.debug_line' at offset 0x16b4 contains 2 entries: Offset Info Type Sym. Value Symbol's Name 000000c4 00000202 R_ARM_ABS32 00000000 .text 000000f6 00000902 R_ARM_ABS32 00000000 .text.startup Relocation section '.rel.debug_frame' at offset 0x16c4 contains 4 entries: Offset Info Type Sym. Value Symbol's Name 00000014 00001602 R_ARM_ABS32 00000000 .debug_frame 00000018 00000202 R_ARM_ABS32 00000000 .text 00000034 00001602 R_ARM_ABS32 00000000 .debug_frame 00000038 00000902 R_ARM_ABS32 00000000 .text.startup Symbol table '.symtab' contains 32 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000 0 FILE LOCAL DEFAULT ABS hello.c 2: 00000000 0 SECTION LOCAL DEFAULT 1 3: 00000000 0 SECTION LOCAL DEFAULT 3 4: 00000000 0 SECTION LOCAL DEFAULT 4 5: 00000000 0 NOTYPE LOCAL DEFAULT 1 $a 6: 00000078 0 NOTYPE LOCAL DEFAULT 1 $d 7: 00000000 0 NOTYPE LOCAL DEFAULT 7 .LC0 8: 00000004 0 NOTYPE LOCAL DEFAULT 7 .LC1 9: 00000000 0 SECTION LOCAL DEFAULT 5 10: 00000000 0 NOTYPE LOCAL DEFAULT 5 $a 11: 00000000 0 SECTION LOCAL DEFAULT 7 12: 00000000 0 NOTYPE LOCAL DEFAULT 7 $d 13: 00000000 0 SECTION LOCAL DEFAULT 8 14: 00000000 0 SECTION LOCAL DEFAULT 10 15: 00000000 0 SECTION LOCAL DEFAULT 11 16: 00000000 0 SECTION LOCAL DEFAULT 13 17: 00000000 0 SECTION LOCAL DEFAULT 15 18: 00000000 0 SECTION LOCAL DEFAULT 17 19: 00000000 0 SECTION LOCAL DEFAULT 19 20: 00000000 0 SECTION LOCAL DEFAULT 21 21: 00000010 0 NOTYPE LOCAL DEFAULT 23 $d 22: 00000000 0 SECTION LOCAL DEFAULT 23 23: 00000000 0 SECTION LOCAL DEFAULT 20 24: 00000000 0 SECTION LOCAL DEFAULT 22 25: 00000000 140 FUNC GLOBAL DEFAULT 1 announcement 26: 00000000 0 NOTYPE GLOBAL DEFAULT UND snprintf 27: 00000000 0 NOTYPE GLOBAL DEFAULT UND __printf_chk 28: 00000000 0 NOTYPE GLOBAL DEFAULT UND __stack_chk_fail 29: 00000000 0 NOTYPE GLOBAL DEFAULT UND _GLOBAL_OFFSET_TABLE_ 30: 00000000 0 NOTYPE GLOBAL DEFAULT UND __stack_chk_guard 31: 00000000 28 FUNC GLOBAL DEFAULT 5 main perl ../build-tree/hardening-check ../build-tree/wrapper-test-all.a ../build-tree/wrapper-test-all.a: Position Independent Executable: no, object archive (ignored) Stack protected: yes Fortify Source functions: yes (some protected functions found) Read-only relocations: no, non-ELF (ignored) Immediate binding: no, non-ELF (ignored) DEB_BUILD_HARDENING=0 ../build-tree/hardened-cc -B ../build-tree/ -c -o ../build-tree/wrapper-test-none.o hello.c /usr/bin/gcc-4.6 -B ../build-tree/ -c -o ../build-tree/wrapper-test-none.o hello.c ar r ../build-tree/wrapper-test-none.a ../build-tree/wrapper-test-none.o ar: creating ../build-tree/wrapper-test-none.a readelf -ldrsW ../build-tree/wrapper-test-none.a File: ../build-tree/wrapper-test-none.a(wrapper-test-none.o) There are no program headers in this file. Relocation section '.rel.text' at offset 0x4d0 contains 6 entries: Offset Info Type Sym. Value Symbol's Name 00000030 00000e1c R_ARM_CALL 00000000 snprintf 0000004c 00000f1c R_ARM_CALL 00000000 printf 00000060 00000502 R_ARM_ABS32 00000000 .rodata 00000064 00000502 R_ARM_ABS32 00000000 .rodata 00000068 00000d02 R_ARM_ABS32 00000000 announcement 0000008c 00000d1c R_ARM_CALL 00000000 announcement Symbol table '.symtab' contains 17 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000 0 FILE LOCAL DEFAULT ABS hello.c 2: 00000000 0 SECTION LOCAL DEFAULT 1 3: 00000000 0 SECTION LOCAL DEFAULT 3 4: 00000000 0 SECTION LOCAL DEFAULT 4 5: 00000000 0 SECTION LOCAL DEFAULT 5 6: 00000000 0 NOTYPE LOCAL DEFAULT 5 $d 7: 00000000 0 NOTYPE LOCAL DEFAULT 1 $a 8: 00000060 0 NOTYPE LOCAL DEFAULT 1 $d 9: 0000006c 0 NOTYPE LOCAL DEFAULT 1 $a 10: 00000000 0 SECTION LOCAL DEFAULT 7 11: 00000000 0 SECTION LOCAL DEFAULT 6 12: 00000000 0 SECTION LOCAL DEFAULT 8 13: 00000000 108 FUNC GLOBAL DEFAULT 1 announcement 14: 00000000 0 NOTYPE GLOBAL DEFAULT UND snprintf 15: 00000000 0 NOTYPE GLOBAL DEFAULT UND printf 16: 0000006c 64 FUNC GLOBAL DEFAULT 1 main if perl ../build-tree/hardening-check ../build-tree/wrapper-test-none.a; then exit 1; fi ../build-tree/wrapper-test-none.a: Position Independent Executable: no, object archive (ignored) Stack protected: no, not found! Fortify Source functions: no, only unprotected functions found! Read-only relocations: no, non-ELF (ignored) Immediate binding: no, non-ELF (ignored) make[3]: Leaving directory `/«PKGBUILDDIR»/tests' make -f Makefile.includes check make[3]: Entering directory `/«PKGBUILDDIR»/tests' # Compiler and linker options disabled. DEB_BUILD_HARDENING=0 cc -o ../build-tree/includes-test-stock hello.c readelf -ldrsW ../build-tree/includes-test-stock Elf file type is EXEC (Executable file) Entry point 0x835c There are 8 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align EXIDX 0x000538 0x00008538 0x00008538 0x00008 0x00008 R 0x4 PHDR 0x000034 0x00008034 0x00008034 0x00100 0x00100 R E 0x4 INTERP 0x000134 0x00008134 0x00008134 0x00027 0x00027 R 0x1 [Requesting program interpreter: /lib/arm-linux-gnueabihf/ld-linux.so.3] LOAD 0x000000 0x00008000 0x00008000 0x00544 0x00544 R E 0x8000 LOAD 0x000544 0x00010544 0x00010544 0x00128 0x0012c RW 0x8000 DYNAMIC 0x000550 0x00010550 0x00010550 0x000f0 0x000f0 RW 0x4 NOTE 0x00015c 0x0000815c 0x0000815c 0x00044 0x00044 R 0x4 GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4 Section to Segment mapping: Segment Sections... 00 .ARM.exidx 01 02 .interp 03 .interp .note.ABI-tag .note.gnu.build-id .hash .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .ARM.exidx .eh_frame 04 .init_array .fini_array .jcr .dynamic .got .data .bss 05 .dynamic 06 .note.ABI-tag .note.gnu.build-id 07 Dynamic section at offset 0x550 contains 25 entries: Tag Type Name/Value 0x00000001 (NEEDED) Shared library: [libc.so.6] 0x0000000c (INIT) 0x8300 0x0000000d (FINI) 0x8518 0x00000019 (INIT_ARRAY) 0x10544 0x0000001b (INIT_ARRAYSZ) 4 (bytes) 0x0000001a (FINI_ARRAY) 0x10548 0x0000001c (FINI_ARRAYSZ) 4 (bytes) 0x00000004 (HASH) 0x81a0 0x6ffffef5 (GNU_HASH) 0x81cc 0x00000005 (STRTAB) 0x825c 0x00000006 (SYMTAB) 0x81fc 0x0000000a (STRSZ) 69 (bytes) 0x0000000b (SYMENT) 16 (bytes) 0x00000015 (DEBUG) 0x0 0x00000003 (PLTGOT) 0x10640 0x00000002 (PLTRELSZ) 40 (bytes) 0x00000014 (PLTREL) REL 0x00000017 (JMPREL) 0x82d8 0x00000011 (REL) 0x82d0 0x00000012 (RELSZ) 8 (bytes) 0x00000013 (RELENT) 8 (bytes) 0x6ffffffe (VERNEED) 0x82b0 0x6fffffff (VERNEEDNUM) 1 0x6ffffff0 (VERSYM) 0x82a2 0x00000000 (NULL) 0x0 Relocation section '.rel.dyn' at offset 0x2d0 contains 1 entries: Offset Info Type Sym. Value Symbol's Name 00010660 00000115 R_ARM_GLOB_DAT 00000000 __gmon_start__ Relocation section '.rel.plt' at offset 0x2d8 contains 5 entries: Offset Info Type Sym. Value Symbol's Name 0001064c 00000216 R_ARM_JUMP_SLOT 00008320 printf 00010650 00000516 R_ARM_JUMP_SLOT 0000832c __libc_start_main 00010654 00000116 R_ARM_JUMP_SLOT 00000000 __gmon_start__ 00010658 00000316 R_ARM_JUMP_SLOT 00008344 snprintf 0001065c 00000416 R_ARM_JUMP_SLOT 00008350 abort Symbol table '.dynsym' contains 6 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 2: 00008320 0 FUNC GLOBAL DEFAULT UND printf@GLIBC_2.4 (2) 3: 00008344 0 FUNC GLOBAL DEFAULT UND snprintf@GLIBC_2.4 (2) 4: 00008350 0 FUNC GLOBAL DEFAULT UND abort@GLIBC_2.4 (2) 5: 0000832c 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.4 (2) Symbol table '.symtab' contains 100 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00008134 0 SECTION LOCAL DEFAULT 1 2: 0000815c 0 SECTION LOCAL DEFAULT 2 3: 0000817c 0 SECTION LOCAL DEFAULT 3 4: 000081a0 0 SECTION LOCAL DEFAULT 4 5: 000081cc 0 SECTION LOCAL DEFAULT 5 6: 000081fc 0 SECTION LOCAL DEFAULT 6 7: 0000825c 0 SECTION LOCAL DEFAULT 7 8: 000082a2 0 SECTION LOCAL DEFAULT 8 9: 000082b0 0 SECTION LOCAL DEFAULT 9 10: 000082d0 0 SECTION LOCAL DEFAULT 10 11: 000082d8 0 SECTION LOCAL DEFAULT 11 12: 00008300 0 SECTION LOCAL DEFAULT 12 13: 0000830c 0 SECTION LOCAL DEFAULT 13 14: 0000835c 0 SECTION LOCAL DEFAULT 14 15: 00008518 0 SECTION LOCAL DEFAULT 15 16: 00008520 0 SECTION LOCAL DEFAULT 16 17: 00008538 0 SECTION LOCAL DEFAULT 17 18: 00008540 0 SECTION LOCAL DEFAULT 18 19: 00010544 0 SECTION LOCAL DEFAULT 19 20: 00010548 0 SECTION LOCAL DEFAULT 20 21: 0001054c 0 SECTION LOCAL DEFAULT 21 22: 00010550 0 SECTION LOCAL DEFAULT 22 23: 00010640 0 SECTION LOCAL DEFAULT 23 24: 00010664 0 SECTION LOCAL DEFAULT 24 25: 0001066c 0 SECTION LOCAL DEFAULT 25 26: 00000000 0 SECTION LOCAL DEFAULT 26 27: 00000000 0 SECTION LOCAL DEFAULT 27 28: 0000815c 0 NOTYPE LOCAL DEFAULT 2 $d 29: 0000835c 0 NOTYPE LOCAL DEFAULT 14 $a 30: 00008538 0 NOTYPE LOCAL DEFAULT 17 $d 31: 0000838c 0 NOTYPE LOCAL DEFAULT 14 $d 32: 00008520 0 NOTYPE LOCAL DEFAULT 16 $d 33: 00010664 0 NOTYPE LOCAL DEFAULT 24 $d 34: 00008398 0 NOTYPE LOCAL DEFAULT 14 $a 35: 00008398 0 FUNC LOCAL DEFAULT 14 call_gmon_start 36: 000083b4 0 NOTYPE LOCAL DEFAULT 14 $d 37: 00008300 0 NOTYPE LOCAL DEFAULT 12 $a 38: 00008518 0 NOTYPE LOCAL DEFAULT 15 $a 39: 00008308 0 NOTYPE LOCAL DEFAULT 12 $a 40: 0000851c 0 NOTYPE LOCAL DEFAULT 15 $a 41: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 42: 0001054c 0 OBJECT LOCAL DEFAULT 21 __JCR_LIST__ 43: 00010668 0 NOTYPE LOCAL DEFAULT 24 $d 44: 000083bc 0 NOTYPE LOCAL DEFAULT 14 $a 45: 000083bc 0 FUNC LOCAL DEFAULT 14 __do_global_dtors_aux 46: 000083d4 0 NOTYPE LOCAL DEFAULT 14 $d 47: 0001066c 1 OBJECT LOCAL DEFAULT 25 completed.5637 48: 00010548 0 NOTYPE LOCAL DEFAULT 20 $d 49: 00010548 0 OBJECT LOCAL DEFAULT 20 __do_global_dtors_aux_fini_array_entry 50: 000083d8 0 NOTYPE LOCAL DEFAULT 14 $a 51: 000083d8 0 FUNC LOCAL DEFAULT 14 frame_dummy 52: 00008400 0 NOTYPE LOCAL DEFAULT 14 $d 53: 00010544 0 NOTYPE LOCAL DEFAULT 19 $d 54: 00010544 0 OBJECT LOCAL DEFAULT 19 __frame_dummy_init_array_entry 55: 0001066c 0 NOTYPE LOCAL DEFAULT 25 $d 56: 00000000 0 FILE LOCAL DEFAULT ABS hello.c 57: 00008524 0 NOTYPE LOCAL DEFAULT 16 $d 58: 00008408 0 NOTYPE LOCAL DEFAULT 14 $a 59: 00008468 0 NOTYPE LOCAL DEFAULT 14 $d 60: 00008474 0 NOTYPE LOCAL DEFAULT 14 $a 61: 000084b4 0 NOTYPE LOCAL DEFAULT 14 $a 62: 0000850c 0 NOTYPE LOCAL DEFAULT 14 $d 63: 00008514 0 NOTYPE LOCAL DEFAULT 14 $a 64: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 65: 00008540 0 NOTYPE LOCAL DEFAULT 18 $d 66: 00008540 0 OBJECT LOCAL DEFAULT 18 __FRAME_END__ 67: 0001054c 0 NOTYPE LOCAL DEFAULT 21 $d 68: 0001054c 0 OBJECT LOCAL DEFAULT 21 __JCR_END__ 69: 00010548 0 NOTYPE LOCAL DEFAULT 19 __init_array_end 70: 00010550 0 OBJECT LOCAL DEFAULT 22 _DYNAMIC 71: 00010544 0 NOTYPE LOCAL DEFAULT 19 __init_array_start 72: 00010640 0 OBJECT LOCAL DEFAULT 23 _GLOBAL_OFFSET_TABLE_ 73: 0000830c 0 NOTYPE LOCAL DEFAULT 13 $a 74: 0000831c 0 NOTYPE LOCAL DEFAULT 13 $d 75: 00008320 0 NOTYPE LOCAL DEFAULT 13 $a 76: 00008514 4 FUNC GLOBAL DEFAULT 14 __libc_csu_fini 77: 00010664 0 NOTYPE WEAK DEFAULT 24 data_start 78: 00008320 0 FUNC GLOBAL DEFAULT UND printf@@GLIBC_2.4 79: 0001066c 0 NOTYPE GLOBAL DEFAULT ABS __bss_start__ 80: 00010670 0 NOTYPE GLOBAL DEFAULT ABS _bss_end__ 81: 0001066c 0 NOTYPE GLOBAL DEFAULT ABS _edata 82: 00008518 0 FUNC GLOBAL DEFAULT 15 _fini 83: 00010670 0 NOTYPE GLOBAL DEFAULT ABS __bss_end__ 84: 00010664 0 NOTYPE GLOBAL DEFAULT 24 __data_start 85: 0000832c 0 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_2.4 86: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 87: 00010668 0 OBJECT GLOBAL HIDDEN 24 __dso_handle 88: 00008408 108 FUNC GLOBAL DEFAULT 14 announcement 89: 00008520 4 OBJECT GLOBAL DEFAULT 16 _IO_stdin_used 90: 000084b4 96 FUNC GLOBAL DEFAULT 14 __libc_csu_init 91: 00008344 0 FUNC GLOBAL DEFAULT UND snprintf@@GLIBC_2.4 92: 00010670 0 NOTYPE GLOBAL DEFAULT ABS _end 93: 0000835c 0 FUNC GLOBAL DEFAULT 14 _start 94: 00010670 0 NOTYPE GLOBAL DEFAULT ABS __end__ 95: 0001066c 0 NOTYPE GLOBAL DEFAULT ABS __bss_start 96: 00008474 64 FUNC GLOBAL DEFAULT 14 main 97: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses 98: 00008350 0 FUNC GLOBAL DEFAULT UND abort@@GLIBC_2.4 99: 00008300 0 FUNC GLOBAL DEFAULT 12 _init ../build-tree/includes-test-stock ../build-tree/includes-test-stock: ok (0x8408) # Compiler options enabled. (linker is not wrapper) cc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIE -fstack-protector --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -fPIE -pie -Wl,-z,relro -Wl,-z,now -o ../build-tree/includes-test-compiled hello.c readelf -ldrsW ../build-tree/includes-test-compiled Elf file type is DYN (Shared object file) Entry point 0x6c4 There are 9 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align EXIDX 0x0008f8 0x000008f8 0x000008f8 0x00008 0x00008 R 0x4 PHDR 0x000034 0x00000034 0x00000034 0x00120 0x00120 R E 0x4 INTERP 0x000154 0x00000154 0x00000154 0x00027 0x00027 R 0x1 [Requesting program interpreter: /lib/arm-linux-gnueabihf/ld-linux.so.3] LOAD 0x000000 0x00000000 0x00000000 0x00904 0x00904 R E 0x8000 LOAD 0x000ea8 0x00008ea8 0x00008ea8 0x00160 0x00164 RW 0x8000 DYNAMIC 0x000eb4 0x00008eb4 0x00008eb4 0x00108 0x00108 RW 0x4 NOTE 0x00017c 0x0000017c 0x0000017c 0x00044 0x00044 R 0x4 GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4 GNU_RELRO 0x000ea8 0x00008ea8 0x00008ea8 0x00158 0x00158 R 0x1 Section to Segment mapping: Segment Sections... 00 .ARM.exidx 01 02 .interp 03 .interp .note.ABI-tag .note.gnu.build-id .hash .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .ARM.exidx .eh_frame 04 .init_array .fini_array .jcr .dynamic .got .data .bss 05 .dynamic 06 .note.ABI-tag .note.gnu.build-id 07 08 .init_array .fini_array .jcr .dynamic .got Dynamic section at offset 0xeb4 contains 29 entries: Tag Type Name/Value 0x00000001 (NEEDED) Shared library: [libc.so.6] 0x00000001 (NEEDED) Shared library: [ld-linux-armhf.so.3] 0x0000000c (INIT) 0x634 0x0000000d (FINI) 0x8d8 0x00000019 (INIT_ARRAY) 0x8ea8 0x0000001b (INIT_ARRAYSZ) 4 (bytes) 0x0000001a (FINI_ARRAY) 0x8eac 0x0000001c (FINI_ARRAYSZ) 4 (bytes) 0x00000004 (HASH) 0x1c0 0x6ffffef5 (GNU_HASH) 0x268 0x00000005 (STRTAB) 0x428 0x00000006 (SYMTAB) 0x2b8 0x0000000a (STRSZ) 275 (bytes) 0x0000000b (SYMENT) 16 (bytes) 0x00000015 (DEBUG) 0x0 0x00000003 (PLTGOT) 0x8fbc 0x00000002 (PLTRELSZ) 56 (bytes) 0x00000014 (PLTREL) REL 0x00000017 (JMPREL) 0x5fc 0x00000011 (REL) 0x5ac 0x00000012 (RELSZ) 80 (bytes) 0x00000013 (RELENT) 8 (bytes) 0x00000018 (BIND_NOW) 0x6ffffffb (FLAGS_1) Flags: NOW 0x6ffffffe (VERNEED) 0x56c 0x6fffffff (VERNEEDNUM) 2 0x6ffffff0 (VERSYM) 0x53c 0x6ffffffa (RELCOUNT) 6 0x00000000 (NULL) 0x0 Relocation section '.rel.dyn' at offset 0x5ac contains 10 entries: Offset Info Type Sym. Value Symbol's Name 00008ea8 00000017 R_ARM_RELATIVE 00008eac 00000017 R_ARM_RELATIVE 00008fe4 00000017 R_ARM_RELATIVE 00008ff4 00000017 R_ARM_RELATIVE 00008ff8 00000017 R_ARM_RELATIVE 00009004 00000017 R_ARM_RELATIVE 00008fe8 00000315 R_ARM_GLOB_DAT 00000000 __cxa_finalize 00008fec 00000415 R_ARM_GLOB_DAT 00000000 __stack_chk_guard 00008ff0 00000715 R_ARM_GLOB_DAT 00000000 __gmon_start__ 00008ffc 00000a15 R_ARM_GLOB_DAT 00000000 _Jv_RegisterClasses Relocation section '.rel.plt' at offset 0x5fc contains 7 entries: Offset Info Type Sym. Value Symbol's Name 00008fc8 00000316 R_ARM_JUMP_SLOT 00000000 __cxa_finalize 00008fcc 00000516 R_ARM_JUMP_SLOT 00000000 __stack_chk_fail 00008fd0 00000616 R_ARM_JUMP_SLOT 00000000 __libc_start_main 00008fd4 00000716 R_ARM_JUMP_SLOT 00000000 __gmon_start__ 00008fd8 00000816 R_ARM_JUMP_SLOT 00000000 snprintf 00008fdc 00000916 R_ARM_JUMP_SLOT 00000000 __printf_chk 00008fe0 00000b16 R_ARM_JUMP_SLOT 00000000 abort Symbol table '.dynsym' contains 23 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000154 0 SECTION LOCAL DEFAULT 1 2: 00008eb0 0 SECTION LOCAL DEFAULT 21 3: 00000000 0 FUNC WEAK DEFAULT UND __cxa_finalize@GLIBC_2.4 (2) 4: 00000000 0 OBJECT GLOBAL DEFAULT UND __stack_chk_guard@GLIBC_2.4 (3) 5: 00000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@GLIBC_2.4 (2) 6: 00000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.4 (2) 7: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 8: 00000000 0 FUNC GLOBAL DEFAULT UND snprintf@GLIBC_2.4 (2) 9: 00000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@GLIBC_2.4 (2) 10: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses 11: 00000000 0 FUNC GLOBAL DEFAULT UND abort@GLIBC_2.4 (2) 12: 0000900c 0 NOTYPE GLOBAL DEFAULT ABS _bss_end__ 13: 00009008 0 NOTYPE GLOBAL DEFAULT ABS _edata 14: 00009000 0 NOTYPE GLOBAL DEFAULT 24 __data_start 15: 0000900c 0 NOTYPE GLOBAL DEFAULT ABS _end 16: 0000900c 0 NOTYPE GLOBAL DEFAULT ABS __bss_end__ 17: 00000874 96 FUNC GLOBAL DEFAULT 14 __libc_csu_init 18: 00009008 0 NOTYPE GLOBAL DEFAULT ABS __bss_start 19: 000006a8 28 FUNC GLOBAL DEFAULT 14 main 20: 000008d4 4 FUNC GLOBAL DEFAULT 14 __libc_csu_fini 21: 00009008 0 NOTYPE GLOBAL DEFAULT ABS __bss_start__ 22: 0000900c 0 NOTYPE GLOBAL DEFAULT ABS __end__ Symbol table '.symtab' contains 112 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000154 0 SECTION LOCAL DEFAULT 1 2: 0000017c 0 SECTION LOCAL DEFAULT 2 3: 0000019c 0 SECTION LOCAL DEFAULT 3 4: 000001c0 0 SECTION LOCAL DEFAULT 4 5: 00000268 0 SECTION LOCAL DEFAULT 5 6: 000002b8 0 SECTION LOCAL DEFAULT 6 7: 00000428 0 SECTION LOCAL DEFAULT 7 8: 0000053c 0 SECTION LOCAL DEFAULT 8 9: 0000056c 0 SECTION LOCAL DEFAULT 9 10: 000005ac 0 SECTION LOCAL DEFAULT 10 11: 000005fc 0 SECTION LOCAL DEFAULT 11 12: 00000634 0 SECTION LOCAL DEFAULT 12 13: 00000640 0 SECTION LOCAL DEFAULT 13 14: 000006a8 0 SECTION LOCAL DEFAULT 14 15: 000008d8 0 SECTION LOCAL DEFAULT 15 16: 000008e0 0 SECTION LOCAL DEFAULT 16 17: 000008f8 0 SECTION LOCAL DEFAULT 17 18: 00000900 0 SECTION LOCAL DEFAULT 18 19: 00008ea8 0 SECTION LOCAL DEFAULT 19 20: 00008eac 0 SECTION LOCAL DEFAULT 20 21: 00008eb0 0 SECTION LOCAL DEFAULT 21 22: 00008eb4 0 SECTION LOCAL DEFAULT 22 23: 00008fbc 0 SECTION LOCAL DEFAULT 23 24: 00009000 0 SECTION LOCAL DEFAULT 24 25: 00009008 0 SECTION LOCAL DEFAULT 25 26: 00000000 0 SECTION LOCAL DEFAULT 26 27: 00000000 0 SECTION LOCAL DEFAULT 27 28: 00000000 0 SECTION LOCAL DEFAULT 28 29: 00000000 0 SECTION LOCAL DEFAULT 29 30: 00000000 0 SECTION LOCAL DEFAULT 30 31: 00000000 0 SECTION LOCAL DEFAULT 31 32: 00000000 0 SECTION LOCAL DEFAULT 32 33: 00000000 0 SECTION LOCAL DEFAULT 33 34: 00000000 0 SECTION LOCAL DEFAULT 34 35: 00000000 0 SECTION LOCAL DEFAULT 35 36: 0000017c 0 NOTYPE LOCAL DEFAULT 2 $d 37: 000006c4 0 NOTYPE LOCAL DEFAULT 14 $a 38: 0000070c 0 NOTYPE LOCAL DEFAULT 14 $d 39: 000008f8 0 NOTYPE LOCAL DEFAULT 17 $d 40: 000008e0 0 NOTYPE LOCAL DEFAULT 16 $d 41: 00009000 0 NOTYPE LOCAL DEFAULT 24 $d 42: 0000071c 0 NOTYPE LOCAL DEFAULT 14 $a 43: 0000071c 0 FUNC LOCAL DEFAULT 14 call_gmon_start 44: 00000738 0 NOTYPE LOCAL DEFAULT 14 $d 45: 00000634 0 NOTYPE LOCAL DEFAULT 12 $a 46: 000008d8 0 NOTYPE LOCAL DEFAULT 15 $a 47: 0000063c 0 NOTYPE LOCAL DEFAULT 12 $a 48: 000008dc 0 NOTYPE LOCAL DEFAULT 15 $a 49: 00000000 0 FILE LOCAL DEFAULT ABS hello.c 50: 000007e8 0 NOTYPE LOCAL DEFAULT 14 $a 51: 00000860 0 NOTYPE LOCAL DEFAULT 14 $d 52: 000006a8 0 NOTYPE LOCAL DEFAULT 14 $a 53: 000008e4 0 NOTYPE LOCAL DEFAULT 16 $d 54: 00000010 0 NOTYPE LOCAL DEFAULT 32 $d 55: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 56: 00008eb0 0 OBJECT LOCAL DEFAULT 21 __JCR_LIST__ 57: 00009004 0 NOTYPE LOCAL DEFAULT 24 $d 58: 00000740 0 NOTYPE LOCAL DEFAULT 14 $a 59: 00000740 0 FUNC LOCAL DEFAULT 14 __do_global_dtors_aux 60: 00000790 0 NOTYPE LOCAL DEFAULT 14 $d 61: 00009008 1 OBJECT LOCAL DEFAULT 25 completed.5637 62: 00008eac 0 NOTYPE LOCAL DEFAULT 20 $d 63: 00008eac 0 OBJECT LOCAL DEFAULT 20 __do_global_dtors_aux_fini_array_entry 64: 000007a4 0 NOTYPE LOCAL DEFAULT 14 $a 65: 000007a4 0 FUNC LOCAL DEFAULT 14 frame_dummy 66: 000007dc 0 NOTYPE LOCAL DEFAULT 14 $d 67: 00008ea8 0 NOTYPE LOCAL DEFAULT 19 $d 68: 00008ea8 0 OBJECT LOCAL DEFAULT 19 __frame_dummy_init_array_entry 69: 00009008 0 NOTYPE LOCAL DEFAULT 25 $d 70: 00000874 0 NOTYPE LOCAL DEFAULT 14 $a 71: 000008cc 0 NOTYPE LOCAL DEFAULT 14 $d 72: 000008d4 0 NOTYPE LOCAL DEFAULT 14 $a 73: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 74: 00000900 0 NOTYPE LOCAL DEFAULT 18 $d 75: 00000900 0 OBJECT LOCAL DEFAULT 18 __FRAME_END__ 76: 00008eb0 0 NOTYPE LOCAL DEFAULT 21 $d 77: 00008eb0 0 OBJECT LOCAL DEFAULT 21 __JCR_END__ 78: 00008eac 0 NOTYPE LOCAL DEFAULT 19 __init_array_end 79: 00008eb4 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC 80: 00008ea8 0 NOTYPE LOCAL DEFAULT 19 __init_array_start 81: 00008fbc 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ 82: 00000640 0 NOTYPE LOCAL DEFAULT 13 $a 83: 00000650 0 NOTYPE LOCAL DEFAULT 13 $d 84: 00000654 0 NOTYPE LOCAL DEFAULT 13 $a 85: 000008d4 4 FUNC GLOBAL DEFAULT 14 __libc_csu_fini 86: 00000000 0 FUNC WEAK DEFAULT UND __cxa_finalize@@GLIBC_2.4 87: 00009000 0 NOTYPE WEAK DEFAULT 24 data_start 88: 00009008 0 NOTYPE GLOBAL DEFAULT ABS __bss_start__ 89: 00000000 0 OBJECT GLOBAL DEFAULT UND __stack_chk_guard@@GLIBC_2.4 90: 0000900c 0 NOTYPE GLOBAL DEFAULT ABS _bss_end__ 91: 00009008 0 NOTYPE GLOBAL DEFAULT ABS _edata 92: 000008d8 0 FUNC GLOBAL DEFAULT 15 _fini 93: 0000900c 0 NOTYPE GLOBAL DEFAULT ABS __bss_end__ 94: 00000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@@GLIBC_2.4 95: 00009000 0 NOTYPE GLOBAL DEFAULT 24 __data_start 96: 00000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_2.4 97: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 98: 00009004 0 OBJECT GLOBAL HIDDEN 24 __dso_handle 99: 000007e8 140 FUNC GLOBAL DEFAULT 14 announcement 100: 000008e0 4 OBJECT GLOBAL DEFAULT 16 _IO_stdin_used 101: 00000874 96 FUNC GLOBAL DEFAULT 14 __libc_csu_init 102: 00000000 0 FUNC GLOBAL DEFAULT UND snprintf@@GLIBC_2.4 103: 0000900c 0 NOTYPE GLOBAL DEFAULT ABS _end 104: 000006c4 0 FUNC GLOBAL DEFAULT 14 _start 105: 00000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@@GLIBC_2.4 106: 0000900c 0 NOTYPE GLOBAL DEFAULT ABS __end__ 107: 00009008 0 NOTYPE GLOBAL DEFAULT ABS __bss_start 108: 000006a8 28 FUNC GLOBAL DEFAULT 14 main 109: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses 110: 00000000 0 FUNC GLOBAL DEFAULT UND abort@@GLIBC_2.4 111: 00000634 0 FUNC GLOBAL DEFAULT 12 _init # Run twice to show off PIE, if available in kernel ../build-tree/includes-test-compiled ../build-tree/includes-test-compiled: ok (0x400627e8) ../build-tree/includes-test-compiled ../build-tree/includes-test-compiled: ok (0x400647e8) # Compiler and linker options enabled. cc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIE -fstack-protector --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -fPIE -pie -Wl,-z,relro -Wl,-z,now -o ../build-tree/includes-test-linked hello.c readelf -ldrsW ../build-tree/includes-test-linked Elf file type is DYN (Shared object file) Entry point 0x6c4 There are 9 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align EXIDX 0x0008f8 0x000008f8 0x000008f8 0x00008 0x00008 R 0x4 PHDR 0x000034 0x00000034 0x00000034 0x00120 0x00120 R E 0x4 INTERP 0x000154 0x00000154 0x00000154 0x00027 0x00027 R 0x1 [Requesting program interpreter: /lib/arm-linux-gnueabihf/ld-linux.so.3] LOAD 0x000000 0x00000000 0x00000000 0x00904 0x00904 R E 0x8000 LOAD 0x000ea8 0x00008ea8 0x00008ea8 0x00160 0x00164 RW 0x8000 DYNAMIC 0x000eb4 0x00008eb4 0x00008eb4 0x00108 0x00108 RW 0x4 NOTE 0x00017c 0x0000017c 0x0000017c 0x00044 0x00044 R 0x4 GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4 GNU_RELRO 0x000ea8 0x00008ea8 0x00008ea8 0x00158 0x00158 R 0x1 Section to Segment mapping: Segment Sections... 00 .ARM.exidx 01 02 .interp 03 .interp .note.ABI-tag .note.gnu.build-id .hash .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .ARM.exidx .eh_frame 04 .init_array .fini_array .jcr .dynamic .got .data .bss 05 .dynamic 06 .note.ABI-tag .note.gnu.build-id 07 08 .init_array .fini_array .jcr .dynamic .got Dynamic section at offset 0xeb4 contains 29 entries: Tag Type Name/Value 0x00000001 (NEEDED) Shared library: [libc.so.6] 0x00000001 (NEEDED) Shared library: [ld-linux-armhf.so.3] 0x0000000c (INIT) 0x634 0x0000000d (FINI) 0x8d8 0x00000019 (INIT_ARRAY) 0x8ea8 0x0000001b (INIT_ARRAYSZ) 4 (bytes) 0x0000001a (FINI_ARRAY) 0x8eac 0x0000001c (FINI_ARRAYSZ) 4 (bytes) 0x00000004 (HASH) 0x1c0 0x6ffffef5 (GNU_HASH) 0x268 0x00000005 (STRTAB) 0x428 0x00000006 (SYMTAB) 0x2b8 0x0000000a (STRSZ) 275 (bytes) 0x0000000b (SYMENT) 16 (bytes) 0x00000015 (DEBUG) 0x0 0x00000003 (PLTGOT) 0x8fbc 0x00000002 (PLTRELSZ) 56 (bytes) 0x00000014 (PLTREL) REL 0x00000017 (JMPREL) 0x5fc 0x00000011 (REL) 0x5ac 0x00000012 (RELSZ) 80 (bytes) 0x00000013 (RELENT) 8 (bytes) 0x00000018 (BIND_NOW) 0x6ffffffb (FLAGS_1) Flags: NOW 0x6ffffffe (VERNEED) 0x56c 0x6fffffff (VERNEEDNUM) 2 0x6ffffff0 (VERSYM) 0x53c 0x6ffffffa (RELCOUNT) 6 0x00000000 (NULL) 0x0 Relocation section '.rel.dyn' at offset 0x5ac contains 10 entries: Offset Info Type Sym. Value Symbol's Name 00008ea8 00000017 R_ARM_RELATIVE 00008eac 00000017 R_ARM_RELATIVE 00008fe4 00000017 R_ARM_RELATIVE 00008ff4 00000017 R_ARM_RELATIVE 00008ff8 00000017 R_ARM_RELATIVE 00009004 00000017 R_ARM_RELATIVE 00008fe8 00000315 R_ARM_GLOB_DAT 00000000 __cxa_finalize 00008fec 00000415 R_ARM_GLOB_DAT 00000000 __stack_chk_guard 00008ff0 00000715 R_ARM_GLOB_DAT 00000000 __gmon_start__ 00008ffc 00000a15 R_ARM_GLOB_DAT 00000000 _Jv_RegisterClasses Relocation section '.rel.plt' at offset 0x5fc contains 7 entries: Offset Info Type Sym. Value Symbol's Name 00008fc8 00000316 R_ARM_JUMP_SLOT 00000000 __cxa_finalize 00008fcc 00000516 R_ARM_JUMP_SLOT 00000000 __stack_chk_fail 00008fd0 00000616 R_ARM_JUMP_SLOT 00000000 __libc_start_main 00008fd4 00000716 R_ARM_JUMP_SLOT 00000000 __gmon_start__ 00008fd8 00000816 R_ARM_JUMP_SLOT 00000000 snprintf 00008fdc 00000916 R_ARM_JUMP_SLOT 00000000 __printf_chk 00008fe0 00000b16 R_ARM_JUMP_SLOT 00000000 abort Symbol table '.dynsym' contains 23 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000154 0 SECTION LOCAL DEFAULT 1 2: 00008eb0 0 SECTION LOCAL DEFAULT 21 3: 00000000 0 FUNC WEAK DEFAULT UND __cxa_finalize@GLIBC_2.4 (2) 4: 00000000 0 OBJECT GLOBAL DEFAULT UND __stack_chk_guard@GLIBC_2.4 (3) 5: 00000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@GLIBC_2.4 (2) 6: 00000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.4 (2) 7: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 8: 00000000 0 FUNC GLOBAL DEFAULT UND snprintf@GLIBC_2.4 (2) 9: 00000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@GLIBC_2.4 (2) 10: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses 11: 00000000 0 FUNC GLOBAL DEFAULT UND abort@GLIBC_2.4 (2) 12: 0000900c 0 NOTYPE GLOBAL DEFAULT ABS _bss_end__ 13: 00009008 0 NOTYPE GLOBAL DEFAULT ABS _edata 14: 00009000 0 NOTYPE GLOBAL DEFAULT 24 __data_start 15: 0000900c 0 NOTYPE GLOBAL DEFAULT ABS _end 16: 0000900c 0 NOTYPE GLOBAL DEFAULT ABS __bss_end__ 17: 00000874 96 FUNC GLOBAL DEFAULT 14 __libc_csu_init 18: 00009008 0 NOTYPE GLOBAL DEFAULT ABS __bss_start 19: 000006a8 28 FUNC GLOBAL DEFAULT 14 main 20: 000008d4 4 FUNC GLOBAL DEFAULT 14 __libc_csu_fini 21: 00009008 0 NOTYPE GLOBAL DEFAULT ABS __bss_start__ 22: 0000900c 0 NOTYPE GLOBAL DEFAULT ABS __end__ Symbol table '.symtab' contains 112 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000154 0 SECTION LOCAL DEFAULT 1 2: 0000017c 0 SECTION LOCAL DEFAULT 2 3: 0000019c 0 SECTION LOCAL DEFAULT 3 4: 000001c0 0 SECTION LOCAL DEFAULT 4 5: 00000268 0 SECTION LOCAL DEFAULT 5 6: 000002b8 0 SECTION LOCAL DEFAULT 6 7: 00000428 0 SECTION LOCAL DEFAULT 7 8: 0000053c 0 SECTION LOCAL DEFAULT 8 9: 0000056c 0 SECTION LOCAL DEFAULT 9 10: 000005ac 0 SECTION LOCAL DEFAULT 10 11: 000005fc 0 SECTION LOCAL DEFAULT 11 12: 00000634 0 SECTION LOCAL DEFAULT 12 13: 00000640 0 SECTION LOCAL DEFAULT 13 14: 000006a8 0 SECTION LOCAL DEFAULT 14 15: 000008d8 0 SECTION LOCAL DEFAULT 15 16: 000008e0 0 SECTION LOCAL DEFAULT 16 17: 000008f8 0 SECTION LOCAL DEFAULT 17 18: 00000900 0 SECTION LOCAL DEFAULT 18 19: 00008ea8 0 SECTION LOCAL DEFAULT 19 20: 00008eac 0 SECTION LOCAL DEFAULT 20 21: 00008eb0 0 SECTION LOCAL DEFAULT 21 22: 00008eb4 0 SECTION LOCAL DEFAULT 22 23: 00008fbc 0 SECTION LOCAL DEFAULT 23 24: 00009000 0 SECTION LOCAL DEFAULT 24 25: 00009008 0 SECTION LOCAL DEFAULT 25 26: 00000000 0 SECTION LOCAL DEFAULT 26 27: 00000000 0 SECTION LOCAL DEFAULT 27 28: 00000000 0 SECTION LOCAL DEFAULT 28 29: 00000000 0 SECTION LOCAL DEFAULT 29 30: 00000000 0 SECTION LOCAL DEFAULT 30 31: 00000000 0 SECTION LOCAL DEFAULT 31 32: 00000000 0 SECTION LOCAL DEFAULT 32 33: 00000000 0 SECTION LOCAL DEFAULT 33 34: 00000000 0 SECTION LOCAL DEFAULT 34 35: 00000000 0 SECTION LOCAL DEFAULT 35 36: 0000017c 0 NOTYPE LOCAL DEFAULT 2 $d 37: 000006c4 0 NOTYPE LOCAL DEFAULT 14 $a 38: 0000070c 0 NOTYPE LOCAL DEFAULT 14 $d 39: 000008f8 0 NOTYPE LOCAL DEFAULT 17 $d 40: 000008e0 0 NOTYPE LOCAL DEFAULT 16 $d 41: 00009000 0 NOTYPE LOCAL DEFAULT 24 $d 42: 0000071c 0 NOTYPE LOCAL DEFAULT 14 $a 43: 0000071c 0 FUNC LOCAL DEFAULT 14 call_gmon_start 44: 00000738 0 NOTYPE LOCAL DEFAULT 14 $d 45: 00000634 0 NOTYPE LOCAL DEFAULT 12 $a 46: 000008d8 0 NOTYPE LOCAL DEFAULT 15 $a 47: 0000063c 0 NOTYPE LOCAL DEFAULT 12 $a 48: 000008dc 0 NOTYPE LOCAL DEFAULT 15 $a 49: 00000000 0 FILE LOCAL DEFAULT ABS hello.c 50: 000007e8 0 NOTYPE LOCAL DEFAULT 14 $a 51: 00000860 0 NOTYPE LOCAL DEFAULT 14 $d 52: 000006a8 0 NOTYPE LOCAL DEFAULT 14 $a 53: 000008e4 0 NOTYPE LOCAL DEFAULT 16 $d 54: 00000010 0 NOTYPE LOCAL DEFAULT 32 $d 55: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 56: 00008eb0 0 OBJECT LOCAL DEFAULT 21 __JCR_LIST__ 57: 00009004 0 NOTYPE LOCAL DEFAULT 24 $d 58: 00000740 0 NOTYPE LOCAL DEFAULT 14 $a 59: 00000740 0 FUNC LOCAL DEFAULT 14 __do_global_dtors_aux 60: 00000790 0 NOTYPE LOCAL DEFAULT 14 $d 61: 00009008 1 OBJECT LOCAL DEFAULT 25 completed.5637 62: 00008eac 0 NOTYPE LOCAL DEFAULT 20 $d 63: 00008eac 0 OBJECT LOCAL DEFAULT 20 __do_global_dtors_aux_fini_array_entry 64: 000007a4 0 NOTYPE LOCAL DEFAULT 14 $a 65: 000007a4 0 FUNC LOCAL DEFAULT 14 frame_dummy 66: 000007dc 0 NOTYPE LOCAL DEFAULT 14 $d 67: 00008ea8 0 NOTYPE LOCAL DEFAULT 19 $d 68: 00008ea8 0 OBJECT LOCAL DEFAULT 19 __frame_dummy_init_array_entry 69: 00009008 0 NOTYPE LOCAL DEFAULT 25 $d 70: 00000874 0 NOTYPE LOCAL DEFAULT 14 $a 71: 000008cc 0 NOTYPE LOCAL DEFAULT 14 $d 72: 000008d4 0 NOTYPE LOCAL DEFAULT 14 $a 73: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 74: 00000900 0 NOTYPE LOCAL DEFAULT 18 $d 75: 00000900 0 OBJECT LOCAL DEFAULT 18 __FRAME_END__ 76: 00008eb0 0 NOTYPE LOCAL DEFAULT 21 $d 77: 00008eb0 0 OBJECT LOCAL DEFAULT 21 __JCR_END__ 78: 00008eac 0 NOTYPE LOCAL DEFAULT 19 __init_array_end 79: 00008eb4 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC 80: 00008ea8 0 NOTYPE LOCAL DEFAULT 19 __init_array_start 81: 00008fbc 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ 82: 00000640 0 NOTYPE LOCAL DEFAULT 13 $a 83: 00000650 0 NOTYPE LOCAL DEFAULT 13 $d 84: 00000654 0 NOTYPE LOCAL DEFAULT 13 $a 85: 000008d4 4 FUNC GLOBAL DEFAULT 14 __libc_csu_fini 86: 00000000 0 FUNC WEAK DEFAULT UND __cxa_finalize@@GLIBC_2.4 87: 00009000 0 NOTYPE WEAK DEFAULT 24 data_start 88: 00009008 0 NOTYPE GLOBAL DEFAULT ABS __bss_start__ 89: 00000000 0 OBJECT GLOBAL DEFAULT UND __stack_chk_guard@@GLIBC_2.4 90: 0000900c 0 NOTYPE GLOBAL DEFAULT ABS _bss_end__ 91: 00009008 0 NOTYPE GLOBAL DEFAULT ABS _edata 92: 000008d8 0 FUNC GLOBAL DEFAULT 15 _fini 93: 0000900c 0 NOTYPE GLOBAL DEFAULT ABS __bss_end__ 94: 00000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@@GLIBC_2.4 95: 00009000 0 NOTYPE GLOBAL DEFAULT 24 __data_start 96: 00000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_2.4 97: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 98: 00009004 0 OBJECT GLOBAL HIDDEN 24 __dso_handle 99: 000007e8 140 FUNC GLOBAL DEFAULT 14 announcement 100: 000008e0 4 OBJECT GLOBAL DEFAULT 16 _IO_stdin_used 101: 00000874 96 FUNC GLOBAL DEFAULT 14 __libc_csu_init 102: 00000000 0 FUNC GLOBAL DEFAULT UND snprintf@@GLIBC_2.4 103: 0000900c 0 NOTYPE GLOBAL DEFAULT ABS _end 104: 000006c4 0 FUNC GLOBAL DEFAULT 14 _start 105: 00000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@@GLIBC_2.4 106: 0000900c 0 NOTYPE GLOBAL DEFAULT ABS __end__ 107: 00009008 0 NOTYPE GLOBAL DEFAULT ABS __bss_start 108: 000006a8 28 FUNC GLOBAL DEFAULT 14 main 109: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses 110: 00000000 0 FUNC GLOBAL DEFAULT UND abort@@GLIBC_2.4 111: 00000634 0 FUNC GLOBAL DEFAULT 12 _init # Run twice to show off PIE, if available in kernel ../build-tree/includes-test-linked ../build-tree/includes-test-linked: ok (0x400027e8) ../build-tree/includes-test-linked ../build-tree/includes-test-linked: ok (0x400f17e8) # Check state of hardening features via check script perl ../build-tree/hardening-check ../build-tree/includes-test-linked ../build-tree/includes-test-linked: Position Independent Executable: yes Stack protected: yes Fortify Source functions: yes (some protected functions found) Read-only relocations: yes Immediate binding: yes # Manually check state of hardening features # Test PIE readelf -lW ../build-tree/includes-test-linked | grep '^Elf file type is DYN' Elf file type is DYN (Shared object file) # Test Stack Protector nm ../build-tree/includes-test-linked | egrep '__stack_chk_fail($|@@GLIBC)' U __stack_chk_fail@@GLIBC_2.4 # Test Fortify nm ../build-tree/includes-test-linked | egrep '__(sn)?printf_chk($|@@GLIBC)' U __printf_chk@@GLIBC_2.4 # Test Format (no-op currently) # Test for RELRO readelf -lW ../build-tree/includes-test-linked | grep GNU_RELRO GNU_RELRO 0x000ea8 0x00008ea8 0x00008ea8 0x00158 0x00158 R 0x1 # Test for BIND_NOW readelf -dW ../build-tree/includes-test-linked | grep BIND_NOW 0x00000018 (BIND_NOW) # Build directly with -fPIC already defined cc -fPIC -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIE -fstack-protector --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -fPIE -pie -Wl,-z,relro -Wl,-z,now -o ../build-tree/includes-test-fPIC-direct hello.c ../build-tree/includes-test-fPIC-direct ../build-tree/includes-test-fPIC-direct: ok (0x400877e8) # Build .o with -fPIC already defined cc -fPIC -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIE -fstack-protector --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -fPIE -pie -Wl,-z,relro -Wl,-z,now -o ../build-tree/includes-test-fPIC.o -c hello.c # Link .o with -fPIC already defined cc -fPIC -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIE -fstack-protector --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -fPIE -pie -Wl,-z,relro -Wl,-z,now -o ../build-tree/includes-test-fPIC ../build-tree/includes-test-fPIC.o ../build-tree/includes-test-fPIC ../build-tree/includes-test-fPIC: ok (0x400537e8) # Make sure build fails due to -Werror=format-security ! cc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIE -fstack-protector --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -fPIE -pie -Wl,-z,relro -Wl,-z,now -o ../build-tree/includes-test-format-security format.c format.c: In function 'main': format.c:11:5: error: format not a string literal and no format arguments [-Werror=format-security] cc1: some warnings being treated as errors # Make sure build succeeds with -Wno-format-security cc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIE -fstack-protector --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wno-format-security -Wl,-z,relro -fPIE -pie -Wl,-z,relro -Wl,-z,now -o ../build-tree/includes-test-format-security format.c # Make sure build stack-protects a small ssp buffer cc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIE -fstack-protector --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -fPIE -pie -Wl,-z,relro -Wl,-z,now -o ../build-tree/includes-test-ssp-buffer-size-protect ssp-buffer-size-protect.c # Test Stack Protector nm ../build-tree/includes-test-ssp-buffer-size-protect | egrep '__stack_chk_fail($|@@GLIBC)' U __stack_chk_fail@@GLIBC_2.4 # Make sure build does not stack-protects a tiny ssp buffer cc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIE -fstack-protector --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -fPIE -pie -Wl,-z,relro -Wl,-z,now -o ../build-tree/includes-test-ssp-buffer-size-skip ssp-buffer-size-skip.c # Test Stack Protector is correctly skipped ! nm ../build-tree/includes-test-ssp-buffer-size-skip | egrep '__stack_chk_fail($|@@GLIBC)' cc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIE -fstack-protector --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -fPIE -pie -Wl,-z,relro -Wl,-z,now -c -o ../build-tree/includes-test-all.o hello.c ar r ../build-tree/includes-test-all.a ../build-tree/includes-test-all.o ar: creating ../build-tree/includes-test-all.a readelf -ldrsW ../build-tree/includes-test-all.a File: ../build-tree/includes-test-all.a(includes-test-all.o) There are no program headers in this file. Relocation section '.rel.text' at offset 0x132c contains 7 entries: Offset Info Type Sym. Value Symbol's Name 00000038 00001a1b R_ARM_PLT32 00000000 snprintf 00000054 00001b1b R_ARM_PLT32 00000000 __printf_chk 00000074 00001c1b R_ARM_PLT32 00000000 __stack_chk_fail 00000078 00001d19 R_ARM_BASE_PREL 00000000 _GLOBAL_OFFSET_TABLE_ 0000007c 00001e1a R_ARM_GOT_BREL 00000000 __stack_chk_guard 00000080 00000703 R_ARM_REL32 00000000 .LC0 00000084 00000803 R_ARM_REL32 00000004 .LC1 Relocation section '.rel.text.startup' at offset 0x1364 contains 1 entries: Offset Info Type Sym. Value Symbol's Name 00000008 0000191b R_ARM_PLT32 00000000 announcement Relocation section '.rel.debug_info' at offset 0x136c contains 78 entries: Offset Info Type Sym. Value Symbol's Name 00000006 00000e02 R_ARM_ABS32 00000000 .debug_abbrev 0000000c 00001302 R_ARM_ABS32 00000000 .debug_str 00000011 00001302 R_ARM_ABS32 00000000 .debug_str 00000015 00001302 R_ARM_ABS32 00000000 .debug_str 00000021 00001102 R_ARM_ABS32 00000000 .debug_ranges 00000025 00001202 R_ARM_ABS32 00000000 .debug_line 0000002a 00001302 R_ARM_ABS32 00000000 .debug_str 00000037 00001302 R_ARM_ABS32 00000000 .debug_str 0000003e 00001302 R_ARM_ABS32 00000000 .debug_str 00000045 00001302 R_ARM_ABS32 00000000 .debug_str 0000004c 00001302 R_ARM_ABS32 00000000 .debug_str 00000053 00001302 R_ARM_ABS32 00000000 .debug_str 0000005a 00001302 R_ARM_ABS32 00000000 .debug_str 00000068 00001302 R_ARM_ABS32 00000000 .debug_str 0000006f 00001302 R_ARM_ABS32 00000000 .debug_str 00000074 00001302 R_ARM_ABS32 00000000 .debug_str 0000007f 00001302 R_ARM_ABS32 00000000 .debug_str 0000008c 00001302 R_ARM_ABS32 00000000 .debug_str 00000091 00001302 R_ARM_ABS32 00000000 .debug_str 000000a6 00001302 R_ARM_ABS32 00000000 .debug_str 000000ab 00001302 R_ARM_ABS32 00000000 .debug_str 000000b8 00001302 R_ARM_ABS32 00000000 .debug_str 000000c7 00001302 R_ARM_ABS32 00000000 .debug_str 000000d6 00001302 R_ARM_ABS32 00000000 .debug_str 000000e5 00001302 R_ARM_ABS32 00000000 .debug_str 000000f4 00001302 R_ARM_ABS32 00000000 .debug_str 00000103 00001302 R_ARM_ABS32 00000000 .debug_str 00000112 00001302 R_ARM_ABS32 00000000 .debug_str 00000121 00001302 R_ARM_ABS32 00000000 .debug_str 00000130 00001302 R_ARM_ABS32 00000000 .debug_str 0000013f 00001302 R_ARM_ABS32 00000000 .debug_str 0000014e 00001302 R_ARM_ABS32 00000000 .debug_str 0000015d 00001302 R_ARM_ABS32 00000000 .debug_str 0000016c 00001302 R_ARM_ABS32 00000000 .debug_str 0000017b 00001302 R_ARM_ABS32 00000000 .debug_str 0000018a 00001302 R_ARM_ABS32 00000000 .debug_str 00000199 00001302 R_ARM_ABS32 00000000 .debug_str 000001a8 00001302 R_ARM_ABS32 00000000 .debug_str 000001b7 00001302 R_ARM_ABS32 00000000 .debug_str 000001c6 00001302 R_ARM_ABS32 00000000 .debug_str 000001d5 00001302 R_ARM_ABS32 00000000 .debug_str 000001e4 00001302 R_ARM_ABS32 00000000 .debug_str 000001f3 00001302 R_ARM_ABS32 00000000 .debug_str 00000202 00001302 R_ARM_ABS32 00000000 .debug_str 00000211 00001302 R_ARM_ABS32 00000000 .debug_str 00000220 00001302 R_ARM_ABS32 00000000 .debug_str 0000022f 00001302 R_ARM_ABS32 00000000 .debug_str 0000023e 00001302 R_ARM_ABS32 00000000 .debug_str 0000024d 00001302 R_ARM_ABS32 00000000 .debug_str 0000025c 00001302 R_ARM_ABS32 00000000 .debug_str 0000026c 00001302 R_ARM_ABS32 00000000 .debug_str 00000273 00001302 R_ARM_ABS32 00000000 .debug_str 0000027f 00001302 R_ARM_ABS32 00000000 .debug_str 0000028d 00001302 R_ARM_ABS32 00000000 .debug_str 0000029b 00001302 R_ARM_ABS32 00000000 .debug_str 000002e8 00001302 R_ARM_ABS32 00000000 .debug_str 00000310 00001302 R_ARM_ABS32 00000000 .debug_str 0000031e 00001302 R_ARM_ABS32 00000000 .debug_str 00000330 00001302 R_ARM_ABS32 00000000 .debug_str 0000033e 00001302 R_ARM_ABS32 00000000 .debug_str 00000349 00000202 R_ARM_ABS32 00000000 .text 0000034d 00000202 R_ARM_ABS32 00000000 .text 00000351 00000f02 R_ARM_ABS32 00000000 .debug_loc 0000035a 00001302 R_ARM_ABS32 00000000 .debug_str 00000364 00000f02 R_ARM_ABS32 00000000 .debug_loc 0000037c 00000202 R_ARM_ABS32 00000000 .text 00000380 00000202 R_ARM_ABS32 00000000 .text 0000038d 00000b02 R_ARM_ABS32 00000000 .rodata.str1.4 000003a7 00001302 R_ARM_ABS32 00000000 .debug_str 000003b2 00000902 R_ARM_ABS32 00000000 .text.startup 000003b6 00000902 R_ARM_ABS32 00000000 .text.startup 000003ba 00000f02 R_ARM_ABS32 00000000 .debug_loc 000003c3 00001302 R_ARM_ABS32 00000000 .debug_str 000003cd 00000f02 R_ARM_ABS32 00000000 .debug_loc 000003d2 00001302 R_ARM_ABS32 00000000 .debug_str 000003dc 00000f02 R_ARM_ABS32 00000000 .debug_loc 000003e8 00001302 R_ARM_ABS32 00000000 .debug_str 000003f5 00001302 R_ARM_ABS32 00000000 .debug_str Relocation section '.rel.debug_loc' at offset 0x15dc contains 20 entries: Offset Info Type Sym. Value Symbol's Name 00000000 00000202 R_ARM_ABS32 00000000 .text 00000004 00000202 R_ARM_ABS32 00000000 .text 0000000c 00000202 R_ARM_ABS32 00000000 .text 00000010 00000202 R_ARM_ABS32 00000000 .text 00000018 00000202 R_ARM_ABS32 00000000 .text 0000001c 00000202 R_ARM_ABS32 00000000 .text 00000025 00000202 R_ARM_ABS32 00000000 .text 00000029 00000202 R_ARM_ABS32 00000000 .text 0000003a 00000202 R_ARM_ABS32 00000000 .text 0000003e 00000202 R_ARM_ABS32 00000000 .text 00000045 00000202 R_ARM_ABS32 00000000 .text 00000049 00000202 R_ARM_ABS32 00000000 .text 00000058 00000902 R_ARM_ABS32 00000000 .text.startup 0000005c 00000902 R_ARM_ABS32 00000000 .text.startup 00000064 00000902 R_ARM_ABS32 00000000 .text.startup 00000068 00000902 R_ARM_ABS32 00000000 .text.startup 00000078 00000902 R_ARM_ABS32 00000000 .text.startup 0000007c 00000902 R_ARM_ABS32 00000000 .text.startup 0000008b 00000902 R_ARM_ABS32 00000000 .text.startup 0000008f 00000902 R_ARM_ABS32 00000000 .text.startup Relocation section '.rel.debug_aranges' at offset 0x167c contains 3 entries: Offset Info Type Sym. Value Symbol's Name 00000006 00000d02 R_ARM_ABS32 00000000 .debug_info 00000010 00000202 R_ARM_ABS32 00000000 .text 00000018 00000902 R_ARM_ABS32 00000000 .text.startup Relocation section '.rel.debug_ranges' at offset 0x1694 contains 4 entries: Offset Info Type Sym. Value Symbol's Name 00000000 00000202 R_ARM_ABS32 00000000 .text 00000004 00000202 R_ARM_ABS32 00000000 .text 00000008 00000902 R_ARM_ABS32 00000000 .text.startup 0000000c 00000902 R_ARM_ABS32 00000000 .text.startup Relocation section '.rel.debug_line' at offset 0x16b4 contains 2 entries: Offset Info Type Sym. Value Symbol's Name 000000c4 00000202 R_ARM_ABS32 00000000 .text 000000f6 00000902 R_ARM_ABS32 00000000 .text.startup Relocation section '.rel.debug_frame' at offset 0x16c4 contains 4 entries: Offset Info Type Sym. Value Symbol's Name 00000014 00001602 R_ARM_ABS32 00000000 .debug_frame 00000018 00000202 R_ARM_ABS32 00000000 .text 00000034 00001602 R_ARM_ABS32 00000000 .debug_frame 00000038 00000902 R_ARM_ABS32 00000000 .text.startup Symbol table '.symtab' contains 32 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000 0 FILE LOCAL DEFAULT ABS hello.c 2: 00000000 0 SECTION LOCAL DEFAULT 1 3: 00000000 0 SECTION LOCAL DEFAULT 3 4: 00000000 0 SECTION LOCAL DEFAULT 4 5: 00000000 0 NOTYPE LOCAL DEFAULT 1 $a 6: 00000078 0 NOTYPE LOCAL DEFAULT 1 $d 7: 00000000 0 NOTYPE LOCAL DEFAULT 7 .LC0 8: 00000004 0 NOTYPE LOCAL DEFAULT 7 .LC1 9: 00000000 0 SECTION LOCAL DEFAULT 5 10: 00000000 0 NOTYPE LOCAL DEFAULT 5 $a 11: 00000000 0 SECTION LOCAL DEFAULT 7 12: 00000000 0 NOTYPE LOCAL DEFAULT 7 $d 13: 00000000 0 SECTION LOCAL DEFAULT 8 14: 00000000 0 SECTION LOCAL DEFAULT 10 15: 00000000 0 SECTION LOCAL DEFAULT 11 16: 00000000 0 SECTION LOCAL DEFAULT 13 17: 00000000 0 SECTION LOCAL DEFAULT 15 18: 00000000 0 SECTION LOCAL DEFAULT 17 19: 00000000 0 SECTION LOCAL DEFAULT 19 20: 00000000 0 SECTION LOCAL DEFAULT 21 21: 00000010 0 NOTYPE LOCAL DEFAULT 23 $d 22: 00000000 0 SECTION LOCAL DEFAULT 23 23: 00000000 0 SECTION LOCAL DEFAULT 20 24: 00000000 0 SECTION LOCAL DEFAULT 22 25: 00000000 140 FUNC GLOBAL DEFAULT 1 announcement 26: 00000000 0 NOTYPE GLOBAL DEFAULT UND snprintf 27: 00000000 0 NOTYPE GLOBAL DEFAULT UND __printf_chk 28: 00000000 0 NOTYPE GLOBAL DEFAULT UND __stack_chk_fail 29: 00000000 0 NOTYPE GLOBAL DEFAULT UND _GLOBAL_OFFSET_TABLE_ 30: 00000000 0 NOTYPE GLOBAL DEFAULT UND __stack_chk_guard 31: 00000000 28 FUNC GLOBAL DEFAULT 5 main perl ../build-tree/hardening-check ../build-tree/includes-test-all.a ../build-tree/includes-test-all.a: Position Independent Executable: no, object archive (ignored) Stack protected: yes Fortify Source functions: yes (some protected functions found) Read-only relocations: no, non-ELF (ignored) Immediate binding: no, non-ELF (ignored) DEB_BUILD_HARDENING=0 cc -c -o ../build-tree/includes-test-none.o hello.c ar r ../build-tree/includes-test-none.a ../build-tree/includes-test-none.o ar: creating ../build-tree/includes-test-none.a readelf -ldrsW ../build-tree/includes-test-none.a File: ../build-tree/includes-test-none.a(includes-test-none.o) There are no program headers in this file. Relocation section '.rel.text' at offset 0x4d0 contains 6 entries: Offset Info Type Sym. Value Symbol's Name 00000030 00000e1c R_ARM_CALL 00000000 snprintf 0000004c 00000f1c R_ARM_CALL 00000000 printf 00000060 00000502 R_ARM_ABS32 00000000 .rodata 00000064 00000502 R_ARM_ABS32 00000000 .rodata 00000068 00000d02 R_ARM_ABS32 00000000 announcement 0000008c 00000d1c R_ARM_CALL 00000000 announcement Symbol table '.symtab' contains 17 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000 0 FILE LOCAL DEFAULT ABS hello.c 2: 00000000 0 SECTION LOCAL DEFAULT 1 3: 00000000 0 SECTION LOCAL DEFAULT 3 4: 00000000 0 SECTION LOCAL DEFAULT 4 5: 00000000 0 SECTION LOCAL DEFAULT 5 6: 00000000 0 NOTYPE LOCAL DEFAULT 5 $d 7: 00000000 0 NOTYPE LOCAL DEFAULT 1 $a 8: 00000060 0 NOTYPE LOCAL DEFAULT 1 $d 9: 0000006c 0 NOTYPE LOCAL DEFAULT 1 $a 10: 00000000 0 SECTION LOCAL DEFAULT 7 11: 00000000 0 SECTION LOCAL DEFAULT 6 12: 00000000 0 SECTION LOCAL DEFAULT 8 13: 00000000 108 FUNC GLOBAL DEFAULT 1 announcement 14: 00000000 0 NOTYPE GLOBAL DEFAULT UND snprintf 15: 00000000 0 NOTYPE GLOBAL DEFAULT UND printf 16: 0000006c 64 FUNC GLOBAL DEFAULT 1 main if perl ../build-tree/hardening-check ../build-tree/includes-test-none.a; then exit 1; fi ../build-tree/includes-test-none.a: Position Independent Executable: no, object archive (ignored) Stack protected: no, not found! Fortify Source functions: no, only unprotected functions found! Read-only relocations: no, non-ELF (ignored) Immediate binding: no, non-ELF (ignored) # Disable PIE cc \ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fstack-protector --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 \ -Wl,-z,relro -Wl,-z,relro -Wl,-z,now \ -o ../build-tree/includes-disabled hello.c if perl ../build-tree/hardening-check ../build-tree/includes-disabled; then exit 1; fi ../build-tree/includes-disabled: Position Independent Executable: no, normal executable! Stack protected: yes Fortify Source functions: yes (some protected functions found) Read-only relocations: yes Immediate binding: yes # Disable stack protector cc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIE -fstack-protector --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -fPIE -pie -Wl,-z,relro -Wl,-z,now -fno-stack-protector -o ../build-tree/includes-disabled hello.c if perl ../build-tree/hardening-check ../build-tree/includes-disabled; then exit 1; fi ../build-tree/includes-disabled: Position Independent Executable: yes Stack protected: no, not found! Fortify Source functions: yes (some protected functions found) Read-only relocations: yes Immediate binding: yes # Disable fortify cc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIE -fstack-protector --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -fPIE -pie -Wl,-z,relro -Wl,-z,now -U_FORTIFY_SOURCE -o ../build-tree/includes-disabled hello.c if perl ../build-tree/hardening-check ../build-tree/includes-disabled; then exit 1; fi ../build-tree/includes-disabled: Position Independent Executable: yes Stack protected: yes Fortify Source functions: no, only unprotected functions found! Read-only relocations: yes Immediate binding: yes # Disable relro cc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIE -fstack-protector --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,-z,norelro -o ../build-tree/includes-disabled hello.c if perl ../build-tree/hardening-check ../build-tree/includes-disabled; then exit 1; fi ../build-tree/includes-disabled: Position Independent Executable: yes Stack protected: yes Fortify Source functions: yes (some protected functions found) Read-only relocations: no, not found! Immediate binding: yes # Disable bindnow cc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIE -fstack-protector --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,-z,lazy -o ../build-tree/includes-disabled hello.c if perl ../build-tree/hardening-check ../build-tree/includes-disabled; then exit 1; fi ../build-tree/includes-disabled: Position Independent Executable: yes Stack protected: yes Fortify Source functions: yes (some protected functions found) Read-only relocations: yes Immediate binding: no, not found! # Disable everything cc \ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fstack-protector --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 \ -Wl,-z,relro -Wl,-z,relro -Wl,-z,now \ -fno-stack-protector \ -U_FORTIFY_SOURCE \ -Wno-format-security \ -Wl,-z,norelro \ -Wl,-z,lazy \ -o ../build-tree/includes-disabled hello.c if perl ../build-tree/hardening-check ../build-tree/includes-disabled; then exit 1; fi ../build-tree/includes-disabled: Position Independent Executable: no, normal executable! Stack protected: no, not found! Fortify Source functions: no, only unprotected functions found! Read-only relocations: no, not found! Immediate binding: no, not found! readelf -ldW ../build-tree/includes-disabled Elf file type is EXEC (Executable file) Entry point 0x8378 There are 8 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align EXIDX 0x0004f0 0x000084f0 0x000084f0 0x00008 0x00008 R 0x4 PHDR 0x000034 0x00008034 0x00008034 0x00100 0x00100 R E 0x4 INTERP 0x000134 0x00008134 0x00008134 0x00027 0x00027 R 0x1 [Requesting program interpreter: /lib/arm-linux-gnueabihf/ld-linux.so.3] LOAD 0x000000 0x00008000 0x00008000 0x004fc 0x004fc R E 0x8000 LOAD 0x0004fc 0x000104fc 0x000104fc 0x00128 0x0012c RW 0x8000 DYNAMIC 0x000508 0x00010508 0x00010508 0x000f0 0x000f0 RW 0x4 NOTE 0x00015c 0x0000815c 0x0000815c 0x00044 0x00044 R 0x4 GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4 Section to Segment mapping: Segment Sections... 00 .ARM.exidx 01 02 .interp 03 .interp .note.ABI-tag .note.gnu.build-id .hash .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .ARM.exidx .eh_frame 04 .init_array .fini_array .jcr .dynamic .got .data .bss 05 .dynamic 06 .note.ABI-tag .note.gnu.build-id 07 Dynamic section at offset 0x508 contains 25 entries: Tag Type Name/Value 0x00000001 (NEEDED) Shared library: [libc.so.6] 0x0000000c (INIT) 0x8300 0x0000000d (FINI) 0x84d0 0x00000019 (INIT_ARRAY) 0x104fc 0x0000001b (INIT_ARRAYSZ) 4 (bytes) 0x0000001a (FINI_ARRAY) 0x10500 0x0000001c (FINI_ARRAYSZ) 4 (bytes) 0x00000004 (HASH) 0x81a0 0x6ffffef5 (GNU_HASH) 0x81cc 0x00000005 (STRTAB) 0x825c 0x00000006 (SYMTAB) 0x81fc 0x0000000a (STRSZ) 69 (bytes) 0x0000000b (SYMENT) 16 (bytes) 0x00000015 (DEBUG) 0x0 0x00000003 (PLTGOT) 0x105f8 0x00000002 (PLTRELSZ) 40 (bytes) 0x00000014 (PLTREL) REL 0x00000017 (JMPREL) 0x82d8 0x00000011 (REL) 0x82d0 0x00000012 (RELSZ) 8 (bytes) 0x00000013 (RELENT) 8 (bytes) 0x6ffffffe (VERNEED) 0x82b0 0x6fffffff (VERNEEDNUM) 1 0x6ffffff0 (VERSYM) 0x82a2 0x00000000 (NULL) 0x0 make[3]: Leaving directory `/«PKGBUILDDIR»/tests' make[2]: Leaving directory `/«PKGBUILDDIR»/tests' make[1]: Leaving directory `/«PKGBUILDDIR»' fakeroot debian/rules binary-arch dh binary-arch dh_testroot -a dh_prep -a dh_installdirs -a dh_auto_install -a dh_install -a dh_installdocs -a dh_installchangelogs -a dh_installexamples -a dh_installman -a dh_installcatalogs -a dh_installcron -a dh_installdebconf -a dh_installemacsen -a dh_installifupdown -a dh_installinfo -a dh_installinit -a dh_installmenu -a dh_installmime -a dh_installmodules -a dh_installlogcheck -a dh_installlogrotate -a dh_installpam -a dh_installppp -a dh_installudev -a dh_installwm -a dh_installxfonts -a dh_installgsettings -a dh_bugfiles -a dh_ucf -a dh_lintian -a dh_gconf -a dh_icons -a dh_perl -a dh_usrlocal -a dh_link -a dh_compress -a dh_fixperms -a dh_strip -a dh_makeshlibs -a dh_shlibdeps -a dh_installdeb -a dh_gencontrol -a dh_md5sums -a dh_builddeb -a dpkg-deb: building package `hardening-wrapper' in `../hardening-wrapper_2.2_armhf.deb'. dpkg-genchanges -B -mbuildd >../hardening-wrapper_2.2_armhf.changes dpkg-genchanges: arch-specific upload - not including arch-independent packages dpkg-genchanges: binary-only upload - not including any source code dpkg-source --after-build hardening-wrapper-2.2 dpkg-buildpackage: binary only upload (no source included) ──────────────────────────────────────────────────────────────────────────────── Build finished at 20120624-2231 Finished ──────── I: Built successfully ┌──────────────────────────────────────────────────────────────────────────────┐ │ Changes │ └──────────────────────────────────────────────────────────────────────────────┘ hardening-wrapper_2.2_armhf.changes: ──────────────────────────────────── Format: 1.8 Date: Thu, 14 Jun 2012 09:40:03 -0700 Source: hardening-wrapper Binary: hardening-wrapper hardening-includes Architecture: armhf Version: 2.2 Distribution: testing Urgency: low Maintainer: buildd Changed-By: Kees Cook Description: hardening-includes - Makefile for enabling compiler flags for security hardening hardening-wrapper - Compiler wrapper to enable security hardening flags Closes: 677530 Changes: hardening-wrapper (2.2) unstable; urgency=low . * debian/control: add missing Dep on binutils, thanks to Stéphane Graber. * hardened-cc: use "=" as argument separator for better interoperability with dpkg-buildflags. * hardening-check: reset tag list for each argument (Closes: 677530). Checksums-Sha1: fc1cbb653752a1a71e0056e2d28e983b4fb8f03b 13504 hardening-wrapper_2.2_armhf.deb Checksums-Sha256: 3e18e66e38206c0e339b7cf163e48ebe8918147313221ad37727e025528ff068 13504 hardening-wrapper_2.2_armhf.deb Files: 0100e0723ed4bb5e9770569a248e8e14 13504 devel optional hardening-wrapper_2.2_armhf.deb ┌──────────────────────────────────────────────────────────────────────────────┐ │ Package contents │ └──────────────────────────────────────────────────────────────────────────────┘ hardening-wrapper_2.2_armhf.deb ─────────────────────────────── new debian package, version 2.0. size 13504 bytes: control archive= 1373 bytes. 521 bytes, 14 lines control 834 bytes, 12 lines md5sums 592 bytes, 32 lines * postinst #!/bin/sh 371 bytes, 22 lines * postrm #!/bin/sh 382 bytes, 22 lines * preinst #!/bin/sh Package: hardening-wrapper Version: 2.2 Architecture: armhf Maintainer: Package Hardening Installed-Size: 70 Depends: gcc | g++, perl Section: devel Priority: optional Multi-Arch: foreign Homepage: http://wiki.debian.org/Hardening Description: Compiler wrapper to enable security hardening flags Replaces gcc, g++, and ld with wrapper scripts that set security hardening compilation flags, as an alternative to changing gcc specs. Enabled when DEB_BUILD_HARDENING=1 is set. drwxr-xr-x root/root 0 2012-06-24 22:31 ./ drwxr-xr-x root/root 0 2012-06-24 22:31 ./usr/ drwxr-xr-x root/root 0 2012-06-24 22:31 ./usr/share/ drwxr-xr-x root/root 0 2012-06-24 22:31 ./usr/share/doc/ drwxr-xr-x root/root 0 2012-06-24 22:31 ./usr/share/doc/hardening-wrapper/ -rw-r--r-- root/root 4262 2012-06-14 09:41 ./usr/share/doc/hardening-wrapper/changelog.gz -rw-r--r-- root/root 18 2011-07-03 13:12 ./usr/share/doc/hardening-wrapper/TODO -rw-r--r-- root/root 64 2011-07-03 13:12 ./usr/share/doc/hardening-wrapper/AUTHORS -rw-r--r-- root/root 1181 2012-03-31 13:48 ./usr/share/doc/hardening-wrapper/copyright -rw-r--r-- root/root 2949 2011-07-03 13:13 ./usr/share/doc/hardening-wrapper/README.Debian drwxr-xr-x root/root 0 2012-06-24 22:31 ./usr/share/man/ drwxr-xr-x root/root 0 2012-06-24 22:31 ./usr/share/man/man1/ -rw-r--r-- root/root 734 2012-06-24 22:31 ./usr/share/man/man1/hardened-ld.1.gz -rw-r--r-- root/root 825 2012-06-24 22:31 ./usr/share/man/man1/hardened-cc.1.gz -rw-r--r-- root/root 827 2012-06-24 22:31 ./usr/share/man/man1/hardened-c++.1.gz drwxr-xr-x root/root 0 2012-06-24 22:31 ./usr/share/lintian/ drwxr-xr-x root/root 0 2012-06-24 22:31 ./usr/share/lintian/overrides/ -rw-r--r-- root/root 108 2012-03-31 14:39 ./usr/share/lintian/overrides/hardening-wrapper drwxr-xr-x root/root 0 2012-06-24 22:31 ./usr/bin/ -rwxr-xr-x root/root 5351 2012-06-24 22:30 ./usr/bin/hardened-c++ -rwxr-xr-x root/root 5348 2012-06-24 22:30 ./usr/bin/hardened-cc -rwxr-xr-x root/root 2504 2012-06-24 22:30 ./usr/bin/hardened-ld lrwxrwxrwx root/root 0 2012-06-24 22:31 ./usr/share/man/man1/hardening-wrapper.1.gz -> hardened-cc.1.gz lrwxrwxrwx root/root 0 2012-06-24 22:31 ./usr/bin/g++-4.7 -> hardened-c++ lrwxrwxrwx root/root 0 2012-06-24 22:31 ./usr/bin/gcc-4.4 -> hardened-cc lrwxrwxrwx root/root 0 2012-06-24 22:31 ./usr/bin/gcc-4.5 -> hardened-cc lrwxrwxrwx root/root 0 2012-06-24 22:31 ./usr/bin/g++-4.3 -> hardened-c++ lrwxrwxrwx root/root 0 2012-06-24 22:31 ./usr/bin/gcc-4.2 -> hardened-cc lrwxrwxrwx root/root 0 2012-06-24 22:31 ./usr/bin/g++-4.4 -> hardened-c++ lrwxrwxrwx root/root 0 2012-06-24 22:31 ./usr/bin/gcc-4.7 -> hardened-cc lrwxrwxrwx root/root 0 2012-06-24 22:31 ./usr/bin/g++-4.2 -> hardened-c++ lrwxrwxrwx root/root 0 2012-06-24 22:31 ./usr/bin/gcc-4.6 -> hardened-cc lrwxrwxrwx root/root 0 2012-06-24 22:31 ./usr/bin/ld.bfd -> hardened-ld lrwxrwxrwx root/root 0 2012-06-24 22:31 ./usr/bin/ld.gold -> hardened-ld lrwxrwxrwx root/root 0 2012-06-24 22:31 ./usr/bin/gcc-4.3 -> hardened-cc lrwxrwxrwx root/root 0 2012-06-24 22:31 ./usr/bin/g++-4.6 -> hardened-c++ lrwxrwxrwx root/root 0 2012-06-24 22:31 ./usr/bin/g++-4.5 -> hardened-c++ ┌──────────────────────────────────────────────────────────────────────────────┐ │ Post Build │ └──────────────────────────────────────────────────────────────────────────────┘ ┌──────────────────────────────────────────────────────────────────────────────┐ │ Cleanup │ └──────────────────────────────────────────────────────────────────────────────┘ Purging /«BUILDDIR» Reading package lists... Building dependency tree... Reading state information... 0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded. Reading package lists... Building dependency tree... Reading state information... The following packages will be REMOVED: bsdmainutils* debhelper* file* gettext* gettext-base* groff-base* html2text* intltool-debian* libasprintf0c2* libcroco3* libffi5* libgettextpo0* libglib2.0-0* libmagic1* libpcre3* libpipeline1* libunistring0* libxml2* man-db* po-debconf* sbuild-build-depends-core-dummy* sbuild-build-depends-hardening-wrapper-dummy* 0 upgraded, 0 newly installed, 22 to remove and 8 not upgraded. After this operation, 24.4 MB disk space will be freed. (Reading database ... 12043 files and directories currently installed.) Removing sbuild-build-depends-hardening-wrapper-dummy ... Removing debhelper ... Removing man-db ... Purging configuration files for man-db ... Removing bsdmainutils ... Purging configuration files for bsdmainutils ... Removing file ... Removing po-debconf ... Removing intltool-debian ... Removing gettext ... Removing gettext-base ... Removing groff-base ... Purging configuration files for groff-base ... Removing html2text ... Purging configuration files for html2text ... Removing libasprintf0c2:armhf ... Removing libcroco3:armhf ... Purging configuration files for libcroco3:armhf ... Removing libglib2.0-0:armhf ... Purging configuration files for libglib2.0-0:armhf ... Removing libffi5:armhf ... Purging configuration files for libffi5:armhf ... Removing libgettextpo0:armhf ... Removing libmagic1:armhf ... Purging configuration files for libmagic1:armhf ... Removing libpcre3:armhf ... Purging configuration files for libpcre3:armhf ... Removing libpipeline1:armhf ... Purging configuration files for libpipeline1:armhf ... Removing libunistring0:armhf ... Purging configuration files for libunistring0:armhf ... Removing libxml2:armhf ... Purging configuration files for libxml2:armhf ... Removing sbuild-build-depends-core-dummy ... ┌──────────────────────────────────────────────────────────────────────────────┐ │ Summary │ └──────────────────────────────────────────────────────────────────────────────┘ Architecture: armhf Build-Space: 684 Build-Time: 64 Distribution: testing Install-Time: 69 Job: hardening-wrapper_2.2 Package: hardening-wrapper Package-Time: 151 Source-Version: 2.2 Space: 684 Status: successful Version: 2.2 ──────────────────────────────────────────────────────────────────────────────── Finished at 20120624-2231 Build needed 00:02:31, 684k disc space