<86>Sep 2 01:55:28 userdel[101932]: delete user 'rooter' <86>Sep 2 01:55:28 userdel[101932]: removed shadow group 'rooter' owned by 'rooter' <86>Sep 2 01:55:28 groupadd[101951]: group added to /etc/group: name=rooter, GID=591 <86>Sep 2 01:55:28 groupadd[101951]: group added to /etc/gshadow: name=rooter <86>Sep 2 01:55:28 groupadd[101951]: new group: name=rooter, GID=591 <86>Sep 2 01:55:28 useradd[101961]: new user: name=rooter, UID=591, GID=591, home=/root, shell=/bin/bash <86>Sep 2 01:55:28 userdel[101981]: delete user 'builder' <86>Sep 2 01:55:28 userdel[101981]: removed group 'builder' owned by 'builder' <86>Sep 2 01:55:28 userdel[101981]: removed shadow group 'builder' owned by 'builder' <86>Sep 2 01:55:28 groupadd[101998]: group added to /etc/group: name=builder, GID=592 <86>Sep 2 01:55:28 groupadd[101998]: group added to /etc/gshadow: name=builder <86>Sep 2 01:55:28 groupadd[101998]: new group: name=builder, GID=592 <86>Sep 2 01:55:28 useradd[102068]: new user: name=builder, UID=592, GID=592, home=/usr/src, shell=/bin/bash warning: user mike does not exist - using root warning: group mike does not exist - using root warning: user mike does not exist - using root warning: group mike does not exist - using root warning: user mike does not exist - using root warning: group mike does not exist - using root <13>Sep 2 01:55:31 rpmi: perl-Term-Cap-1.17-alt1 1445018869 installed <13>Sep 2 01:55:31 rpmi: perl-Term-ANSIColor-4.06-alt1 1479407083 installed <13>Sep 2 01:55:31 rpmi: perl-Pod-Escapes-1.07-alt1 1418767892 installed <13>Sep 2 01:55:31 rpmi: perl-Filter-1.59-alt1.1 sisyphus+219907.400.1.1 1548343225 installed <13>Sep 2 01:55:31 rpmi: perl-Encode-3.01-alt1 sisyphus+224923.100.1.1 1552474113 installed <13>Sep 2 01:55:31 rpmi: perl-Pod-Simple-3.39-alt1 sisyphus+234046.100.1.1 1562497785 installed <13>Sep 2 01:55:31 rpmi: perl-Pod-Usage-1.69-alt1 1464274721 installed <13>Sep 2 01:55:31 rpmi: perl-podlators-4.12-alt1 sisyphus+231574.100.1.1 1559749961 installed Building target platforms: x86_64 Building for target x86_64 Wrote: /usr/src/in/nosrpm/hardening-wrapper-2.6-alt1.nosrc.rpm Installing hardening-wrapper-2.6-alt1.src.rpm Building target platforms: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.55323 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf hardening-wrapper-2.6 + /bin/mkdir -p hardening-wrapper-2.6 + cd hardening-wrapper-2.6 + echo 'Source #0 (hardening-wrapper_2.6.tar.xz):' Source #0 (hardening-wrapper_2.6.tar.xz): + /usr/bin/xz -dc /usr/src/RPM/SOURCES/hardening-wrapper_2.6.tar.xz + /bin/tar -xf - + /bin/chmod -c -Rf u+rwX,go-w . + echo 'Patch #0 (hardening-wrapper-2.6-fix_perl.patch):' Patch #0 (hardening-wrapper-2.6-fix_perl.patch): + /usr/bin/patch -p1 patching file hardening-wrapper/Makefile + sed -i.debian -e '/^[ \t]*if \[ -z \"\$.DEB_/d' hardening-wrapper/Makefile + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.55323 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd hardening-wrapper-2.6 + make -j8 -C hardening-wrapper make: Entering directory '/usr/src/RPM/BUILD/hardening-wrapper-2.6/hardening-wrapper' 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#/ '""'/; s/ #ARCH#/ '""'/;' build-tree/hardened-cc build-tree/hardened-ld perl -pi -e "s/default\{'DEB_BUILD_HARDENING_PIE'\}=1;/default{'DEB_BUILD_HARDENING_PIE'}=0;/;" 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: Leaving directory '/usr/src/RPM/BUILD/hardening-wrapper-2.6/hardening-wrapper' + exit 0 Executing(%install): /bin/sh -e /usr/src/tmp/rpm-tmp.55323 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + /bin/chmod -Rf u+rwX -- /usr/src/tmp/hardening-wrapper-buildroot + : + /bin/rm -rf -- /usr/src/tmp/hardening-wrapper-buildroot + cd hardening-wrapper-2.6 + install -pDm0755 hardening-wrapper/build-tree/hardening-check /usr/src/tmp/hardening-wrapper-buildroot/usr/bin/hardening-check + install -pDm0644 hardening-wrapper/build-tree/hardening-check.1 /usr/src/tmp/hardening-wrapper-buildroot/usr/share/man/man1/hardening-check.1 + /usr/lib/rpm/brp-alt Cleaning files in /usr/src/tmp/hardening-wrapper-buildroot (auto) Verifying and fixing files in /usr/src/tmp/hardening-wrapper-buildroot (binconfig,pkgconfig,libtool,desktop) Checking contents of files in /usr/src/tmp/hardening-wrapper-buildroot/ (default) Compressing files in /usr/src/tmp/hardening-wrapper-buildroot (auto) Verifying ELF objects in /usr/src/tmp/hardening-wrapper-buildroot (arch=normal,fhs=normal,lfs=relaxed,lint=relaxed,rpath=normal,stack=normal,textrel=normal,unresolved=normal) Hardlinking identical .pyc and .pyo files Executing(%check): /bin/sh -e /usr/src/tmp/rpm-tmp.88049 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd hardening-wrapper-2.6 + make -j8 -C hardening-wrapper check make: Entering directory '/usr/src/RPM/BUILD/hardening-wrapper-2.6/hardening-wrapper' make -C tests check make[1]: Entering directory '/usr/src/RPM/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. make[1]: Leaving directory '/usr/src/RPM/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[1]: Entering directory '/usr/src/RPM/BUILD/hardening-wrapper-2.6/hardening-wrapper/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 (0x401132) cc -Wall -fstack-protector-strong hello.c -o ../build-tree/cc-test || true ../build-tree/cc-test || true ../build-tree/cc-test: ok (0x401132) cc -Wall -fPIE -pie hello.c -o ../build-tree/cc-test || true ../build-tree/cc-test || true ../build-tree/cc-test: ok (0x5611493b2155) ../build-tree/cc-test || true ../build-tree/cc-test: ok (0x559ccf05f155) make -f Makefile.wrapper check make[2]: Entering directory '/usr/src/RPM/BUILD/hardening-wrapper-2.6/hardening-wrapper/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_wrapper -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 0x401060 There are 11 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000040 0x0000000000400040 0x0000000000400040 0x000268 0x000268 R 0x8 INTERP 0x0002a8 0x00000000004002a8 0x00000000004002a8 0x00001c 0x00001c R 0x1 [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2] LOAD 0x000000 0x0000000000400000 0x0000000000400000 0x0004c8 0x0004c8 R 0x1000 LOAD 0x001000 0x0000000000401000 0x0000000000401000 0x00024d 0x00024d R E 0x1000 LOAD 0x002000 0x0000000000402000 0x0000000000402000 0x000170 0x000170 R 0x1000 LOAD 0x002e10 0x0000000000403e10 0x0000000000403e10 0x000224 0x000228 RW 0x1000 DYNAMIC 0x002e20 0x0000000000403e20 0x0000000000403e20 0x0001d0 0x0001d0 RW 0x8 NOTE 0x0002c4 0x00000000004002c4 0x00000000004002c4 0x000044 0x000044 R 0x4 GNU_EH_FRAME 0x002020 0x0000000000402020 0x0000000000402020 0x00003c 0x00003c R 0x4 GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW 0x10 GNU_RELRO 0x002e10 0x0000000000403e10 0x0000000000403e10 0x0001f0 0x0001f0 R 0x1 Section to Segment mapping: Segment Sections... 00 01 .interp 02 .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rela.dyn .rela.plt 03 .init .plt .text .fini 04 .rodata .eh_frame_hdr .eh_frame 05 .init_array .fini_array .dynamic .got .got.plt .data .bss 06 .dynamic 07 .note.ABI-tag .note.gnu.build-id 08 .eh_frame_hdr 09 10 .init_array .fini_array .dynamic .got Dynamic section at offset 0x2e20 contains 24 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x000000000000000c (INIT) 0x401000 0x000000000000000d (FINI) 0x401244 0x0000000000000019 (INIT_ARRAY) 0x403e10 0x000000000000001b (INIT_ARRAYSZ) 8 (bytes) 0x000000000000001a (FINI_ARRAY) 0x403e18 0x000000000000001c (FINI_ARRAYSZ) 8 (bytes) 0x000000006ffffef5 (GNU_HASH) 0x400308 0x0000000000000005 (STRTAB) 0x4003b8 0x0000000000000006 (SYMTAB) 0x400328 0x000000000000000a (STRSZ) 92 (bytes) 0x000000000000000b (SYMENT) 24 (bytes) 0x0000000000000015 (DEBUG) 0x0 0x0000000000000003 (PLTGOT) 0x404000 0x0000000000000002 (PLTRELSZ) 72 (bytes) 0x0000000000000014 (PLTREL) RELA 0x0000000000000017 (JMPREL) 0x400480 0x0000000000000007 (RELA) 0x400450 0x0000000000000008 (RELASZ) 48 (bytes) 0x0000000000000009 (RELAENT) 24 (bytes) 0x000000006ffffffe (VERNEED) 0x400420 0x000000006fffffff (VERNEEDNUM) 1 0x000000006ffffff0 (VERSYM) 0x400414 0x0000000000000000 (NULL) 0x0 Relocation section '.rela.dyn' at offset 0x450 contains 2 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000403ff0 0000000400000006 R_X86_64_GLOB_DAT 0000000000000000 __libc_start_main@GLIBC_2.2.5 + 0 0000000000403ff8 0000000500000006 R_X86_64_GLOB_DAT 0000000000000000 __gmon_start__ + 0 Relocation section '.rela.plt' at offset 0x480 contains 3 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000404018 0000000100000007 R_X86_64_JUMP_SLOT 0000000000000000 __stack_chk_fail@GLIBC_2.4 + 0 0000000000404020 0000000200000007 R_X86_64_JUMP_SLOT 0000000000000000 printf@GLIBC_2.2.5 + 0 0000000000404028 0000000300000007 R_X86_64_JUMP_SLOT 0000000000000000 snprintf@GLIBC_2.2.5 + 0 Symbol table '.dynsym' contains 6 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@GLIBC_2.4 (2) 2: 0000000000000000 0 FUNC GLOBAL DEFAULT UND printf@GLIBC_2.2.5 (3) 3: 0000000000000000 0 FUNC GLOBAL DEFAULT UND snprintf@GLIBC_2.2.5 (3) 4: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.2.5 (3) 5: 0000000000000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ Symbol table '.symtab' contains 74 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000004002a8 0 SECTION LOCAL DEFAULT 1 2: 00000000004002c4 0 SECTION LOCAL DEFAULT 2 3: 00000000004002e4 0 SECTION LOCAL DEFAULT 3 4: 0000000000400308 0 SECTION LOCAL DEFAULT 4 5: 0000000000400328 0 SECTION LOCAL DEFAULT 5 6: 00000000004003b8 0 SECTION LOCAL DEFAULT 6 7: 0000000000400414 0 SECTION LOCAL DEFAULT 7 8: 0000000000400420 0 SECTION LOCAL DEFAULT 8 9: 0000000000400450 0 SECTION LOCAL DEFAULT 9 10: 0000000000400480 0 SECTION LOCAL DEFAULT 10 11: 0000000000401000 0 SECTION LOCAL DEFAULT 11 12: 0000000000401020 0 SECTION LOCAL DEFAULT 12 13: 0000000000401060 0 SECTION LOCAL DEFAULT 13 14: 0000000000401244 0 SECTION LOCAL DEFAULT 14 15: 0000000000402000 0 SECTION LOCAL DEFAULT 15 16: 0000000000402020 0 SECTION LOCAL DEFAULT 16 17: 0000000000402060 0 SECTION LOCAL DEFAULT 17 18: 0000000000403e10 0 SECTION LOCAL DEFAULT 18 19: 0000000000403e18 0 SECTION LOCAL DEFAULT 19 20: 0000000000403e20 0 SECTION LOCAL DEFAULT 20 21: 0000000000403ff0 0 SECTION LOCAL DEFAULT 21 22: 0000000000404000 0 SECTION LOCAL DEFAULT 22 23: 0000000000404030 0 SECTION LOCAL DEFAULT 23 24: 0000000000404034 0 SECTION LOCAL DEFAULT 24 25: 0000000000000000 0 SECTION LOCAL DEFAULT 25 26: 0000000000000000 0 SECTION LOCAL DEFAULT 26 27: 0000000000000000 0 SECTION LOCAL DEFAULT 27 28: 0000000000000000 0 SECTION LOCAL DEFAULT 28 29: 0000000000000000 0 SECTION LOCAL DEFAULT 29 30: 0000000000000000 0 SECTION LOCAL DEFAULT 30 31: 0000000000000000 0 SECTION LOCAL DEFAULT 31 32: 0000000000000000 0 SECTION LOCAL DEFAULT 32 33: 0000000000000000 0 SECTION LOCAL DEFAULT 33 34: 0000000000000000 0 FILE LOCAL DEFAULT ABS init.c 35: 0000000000000000 0 FILE LOCAL DEFAULT ABS static-reloc.c 36: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 37: 0000000000401090 0 FUNC LOCAL DEFAULT 13 deregister_tm_clones 38: 00000000004010c0 0 FUNC LOCAL DEFAULT 13 register_tm_clones 39: 0000000000401100 0 FUNC LOCAL DEFAULT 13 __do_global_dtors_aux 40: 0000000000404034 1 OBJECT LOCAL DEFAULT 24 completed.7991 41: 0000000000403e18 0 OBJECT LOCAL DEFAULT 19 __do_global_dtors_aux_fini_array_entry 42: 0000000000401130 0 FUNC LOCAL DEFAULT 13 frame_dummy 43: 0000000000403e10 0 OBJECT LOCAL DEFAULT 18 __frame_dummy_init_array_entry 44: 0000000000000000 0 FILE LOCAL DEFAULT ABS hello.c 45: 0000000000000000 0 FILE LOCAL DEFAULT ABS elf-init.c 46: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 47: 000000000040216c 0 OBJECT LOCAL DEFAULT 17 __FRAME_END__ 48: 0000000000000000 0 FILE LOCAL DEFAULT ABS 49: 0000000000403e18 0 NOTYPE LOCAL DEFAULT 18 __init_array_end 50: 0000000000403e20 0 OBJECT LOCAL DEFAULT 20 _DYNAMIC 51: 0000000000403e10 0 NOTYPE LOCAL DEFAULT 18 __init_array_start 52: 0000000000402020 0 NOTYPE LOCAL DEFAULT 16 __GNU_EH_FRAME_HDR 53: 0000000000404000 0 OBJECT LOCAL DEFAULT 22 _GLOBAL_OFFSET_TABLE_ 54: 0000000000401240 1 FUNC GLOBAL DEFAULT 13 __libc_csu_fini 55: 0000000000404030 0 NOTYPE WEAK DEFAULT 23 data_start 56: 0000000000404034 0 NOTYPE GLOBAL DEFAULT 23 _edata 57: 0000000000401244 0 FUNC GLOBAL DEFAULT 14 _fini 58: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@@GLIBC_2.4 59: 0000000000000000 0 FUNC GLOBAL DEFAULT UND printf@@GLIBC_2.2.5 60: 0000000000000000 0 FUNC GLOBAL DEFAULT UND snprintf@@GLIBC_2.2.5 61: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_2.2.5 62: 0000000000404030 0 NOTYPE GLOBAL DEFAULT 23 __data_start 63: 0000000000000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 64: 0000000000402008 0 OBJECT GLOBAL HIDDEN 15 __dso_handle 65: 0000000000401132 125 FUNC GLOBAL DEFAULT 13 announcement 66: 0000000000402000 4 OBJECT GLOBAL DEFAULT 15 _IO_stdin_used 67: 00000000004011e0 93 FUNC GLOBAL DEFAULT 13 __libc_csu_init 68: 0000000000404038 0 NOTYPE GLOBAL DEFAULT 24 _end 69: 0000000000401060 43 FUNC GLOBAL DEFAULT 13 _start 70: 0000000000404034 0 NOTYPE GLOBAL DEFAULT 24 __bss_start 71: 00000000004011af 40 FUNC GLOBAL DEFAULT 13 main 72: 0000000000404038 0 OBJECT GLOBAL HIDDEN 23 __TMC_END__ 73: 0000000000401000 0 FUNC GLOBAL DEFAULT 11 _init ../build-tree/wrapper-test-stock ../build-tree/wrapper-test-stock: ok (0x401132) # Compiler options enabled. (linker is not wrapper) ../build-tree/hardened-cc -B ../build-tree/ -O2 -o ../build-tree/wrapper-test-compiled hello.c /usr/bin/gcc_wrapper -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -B ../build-tree/ -O2 -o ../build-tree/wrapper-test-compiled hello.c readelf -ldrsW ../build-tree/wrapper-test-compiled Elf file type is EXEC (Executable file) Entry point 0x401080 There are 11 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000040 0x0000000000400040 0x0000000000400040 0x000268 0x000268 R 0x8 INTERP 0x0002a8 0x00000000004002a8 0x00000000004002a8 0x00001c 0x00001c R 0x1 [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2] LOAD 0x000000 0x0000000000400000 0x0000000000400000 0x0004f8 0x0004f8 R 0x1000 LOAD 0x001000 0x0000000000401000 0x0000000000401000 0x00023d 0x00023d R E 0x1000 LOAD 0x002000 0x0000000000402000 0x0000000000402000 0x000168 0x000168 R 0x1000 LOAD 0x002e10 0x0000000000403e10 0x0000000000403e10 0x000224 0x000228 RW 0x1000 DYNAMIC 0x002e20 0x0000000000403e20 0x0000000000403e20 0x0001d0 0x0001d0 RW 0x8 NOTE 0x0002c4 0x00000000004002c4 0x00000000004002c4 0x000044 0x000044 R 0x4 GNU_EH_FRAME 0x002020 0x0000000000402020 0x0000000000402020 0x00003c 0x00003c R 0x4 GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW 0x10 GNU_RELRO 0x002e10 0x0000000000403e10 0x0000000000403e10 0x0001f0 0x0001f0 R 0x1 Section to Segment mapping: Segment Sections... 00 01 .interp 02 .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rela.dyn .rela.plt 03 .init .plt .text .fini 04 .rodata .eh_frame_hdr .eh_frame 05 .init_array .fini_array .dynamic .got .got.plt .data .bss 06 .dynamic 07 .note.ABI-tag .note.gnu.build-id 08 .eh_frame_hdr 09 10 .init_array .fini_array .dynamic .got Dynamic section at offset 0x2e20 contains 24 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x000000000000000c (INIT) 0x401000 0x000000000000000d (FINI) 0x401234 0x0000000000000019 (INIT_ARRAY) 0x403e10 0x000000000000001b (INIT_ARRAYSZ) 8 (bytes) 0x000000000000001a (FINI_ARRAY) 0x403e18 0x000000000000001c (FINI_ARRAYSZ) 8 (bytes) 0x000000006ffffef5 (GNU_HASH) 0x400308 0x0000000000000005 (STRTAB) 0x4003b8 0x0000000000000006 (SYMTAB) 0x400328 0x000000000000000a (STRSZ) 117 (bytes) 0x000000000000000b (SYMENT) 24 (bytes) 0x0000000000000015 (DEBUG) 0x0 0x0000000000000003 (PLTGOT) 0x404000 0x0000000000000002 (PLTRELSZ) 72 (bytes) 0x0000000000000014 (PLTREL) RELA 0x0000000000000017 (JMPREL) 0x4004b0 0x0000000000000007 (RELA) 0x400480 0x0000000000000008 (RELASZ) 48 (bytes) 0x0000000000000009 (RELAENT) 24 (bytes) 0x000000006ffffffe (VERNEED) 0x400440 0x000000006fffffff (VERNEEDNUM) 1 0x000000006ffffff0 (VERSYM) 0x40042e 0x0000000000000000 (NULL) 0x0 Relocation section '.rela.dyn' at offset 0x480 contains 2 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000403ff0 0000000300000006 R_X86_64_GLOB_DAT 0000000000000000 __libc_start_main@GLIBC_2.2.5 + 0 0000000000403ff8 0000000400000006 R_X86_64_GLOB_DAT 0000000000000000 __gmon_start__ + 0 Relocation section '.rela.plt' at offset 0x4b0 contains 3 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000404018 0000000100000007 R_X86_64_JUMP_SLOT 0000000000000000 __stack_chk_fail@GLIBC_2.4 + 0 0000000000404020 0000000200000007 R_X86_64_JUMP_SLOT 0000000000000000 snprintf@GLIBC_2.2.5 + 0 0000000000404028 0000000500000007 R_X86_64_JUMP_SLOT 0000000000000000 __printf_chk@GLIBC_2.3.4 + 0 Symbol table '.dynsym' contains 6 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@GLIBC_2.4 (2) 2: 0000000000000000 0 FUNC GLOBAL DEFAULT UND snprintf@GLIBC_2.2.5 (3) 3: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.2.5 (3) 4: 0000000000000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 5: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@GLIBC_2.3.4 (4) Symbol table '.symtab' contains 74 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000004002a8 0 SECTION LOCAL DEFAULT 1 2: 00000000004002c4 0 SECTION LOCAL DEFAULT 2 3: 00000000004002e4 0 SECTION LOCAL DEFAULT 3 4: 0000000000400308 0 SECTION LOCAL DEFAULT 4 5: 0000000000400328 0 SECTION LOCAL DEFAULT 5 6: 00000000004003b8 0 SECTION LOCAL DEFAULT 6 7: 000000000040042e 0 SECTION LOCAL DEFAULT 7 8: 0000000000400440 0 SECTION LOCAL DEFAULT 8 9: 0000000000400480 0 SECTION LOCAL DEFAULT 9 10: 00000000004004b0 0 SECTION LOCAL DEFAULT 10 11: 0000000000401000 0 SECTION LOCAL DEFAULT 11 12: 0000000000401020 0 SECTION LOCAL DEFAULT 12 13: 0000000000401060 0 SECTION LOCAL DEFAULT 13 14: 0000000000401234 0 SECTION LOCAL DEFAULT 14 15: 0000000000402000 0 SECTION LOCAL DEFAULT 15 16: 0000000000402020 0 SECTION LOCAL DEFAULT 16 17: 0000000000402060 0 SECTION LOCAL DEFAULT 17 18: 0000000000403e10 0 SECTION LOCAL DEFAULT 18 19: 0000000000403e18 0 SECTION LOCAL DEFAULT 19 20: 0000000000403e20 0 SECTION LOCAL DEFAULT 20 21: 0000000000403ff0 0 SECTION LOCAL DEFAULT 21 22: 0000000000404000 0 SECTION LOCAL DEFAULT 22 23: 0000000000404030 0 SECTION LOCAL DEFAULT 23 24: 0000000000404034 0 SECTION LOCAL DEFAULT 24 25: 0000000000000000 0 SECTION LOCAL DEFAULT 25 26: 0000000000000000 0 SECTION LOCAL DEFAULT 26 27: 0000000000000000 0 SECTION LOCAL DEFAULT 27 28: 0000000000000000 0 SECTION LOCAL DEFAULT 28 29: 0000000000000000 0 SECTION LOCAL DEFAULT 29 30: 0000000000000000 0 SECTION LOCAL DEFAULT 30 31: 0000000000000000 0 SECTION LOCAL DEFAULT 31 32: 0000000000000000 0 SECTION LOCAL DEFAULT 32 33: 0000000000000000 0 SECTION LOCAL DEFAULT 33 34: 0000000000000000 0 FILE LOCAL DEFAULT ABS init.c 35: 0000000000000000 0 FILE LOCAL DEFAULT ABS static-reloc.c 36: 0000000000000000 0 FILE LOCAL DEFAULT ABS hello.c 37: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 38: 00000000004010b0 0 FUNC LOCAL DEFAULT 13 deregister_tm_clones 39: 00000000004010e0 0 FUNC LOCAL DEFAULT 13 register_tm_clones 40: 0000000000401120 0 FUNC LOCAL DEFAULT 13 __do_global_dtors_aux 41: 0000000000404034 1 OBJECT LOCAL DEFAULT 24 completed.7991 42: 0000000000403e18 0 OBJECT LOCAL DEFAULT 19 __do_global_dtors_aux_fini_array_entry 43: 0000000000401150 0 FUNC LOCAL DEFAULT 13 frame_dummy 44: 0000000000403e10 0 OBJECT LOCAL DEFAULT 18 __frame_dummy_init_array_entry 45: 0000000000000000 0 FILE LOCAL DEFAULT ABS elf-init.c 46: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 47: 0000000000402164 0 OBJECT LOCAL DEFAULT 17 __FRAME_END__ 48: 0000000000000000 0 FILE LOCAL DEFAULT ABS 49: 0000000000403e18 0 NOTYPE LOCAL DEFAULT 18 __init_array_end 50: 0000000000403e20 0 OBJECT LOCAL DEFAULT 20 _DYNAMIC 51: 0000000000403e10 0 NOTYPE LOCAL DEFAULT 18 __init_array_start 52: 0000000000402020 0 NOTYPE LOCAL DEFAULT 16 __GNU_EH_FRAME_HDR 53: 0000000000404000 0 OBJECT LOCAL DEFAULT 22 _GLOBAL_OFFSET_TABLE_ 54: 0000000000401230 1 FUNC GLOBAL DEFAULT 13 __libc_csu_fini 55: 0000000000404030 0 NOTYPE WEAK DEFAULT 23 data_start 56: 0000000000404034 0 NOTYPE GLOBAL DEFAULT 23 _edata 57: 0000000000401234 0 FUNC GLOBAL DEFAULT 14 _fini 58: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@@GLIBC_2.4 59: 0000000000000000 0 FUNC GLOBAL DEFAULT UND snprintf@@GLIBC_2.2.5 60: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_2.2.5 61: 0000000000404030 0 NOTYPE GLOBAL DEFAULT 23 __data_start 62: 0000000000000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 63: 0000000000402008 0 OBJECT GLOBAL HIDDEN 15 __dso_handle 64: 0000000000401160 104 FUNC GLOBAL DEFAULT 13 announcement 65: 0000000000402000 4 OBJECT GLOBAL DEFAULT 15 _IO_stdin_used 66: 00000000004011d0 93 FUNC GLOBAL DEFAULT 13 __libc_csu_init 67: 0000000000404038 0 NOTYPE GLOBAL DEFAULT 24 _end 68: 0000000000401080 43 FUNC GLOBAL DEFAULT 13 _start 69: 0000000000404034 0 NOTYPE GLOBAL DEFAULT 24 __bss_start 70: 0000000000401060 25 FUNC GLOBAL DEFAULT 13 main 71: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@@GLIBC_2.3.4 72: 0000000000404038 0 OBJECT GLOBAL HIDDEN 23 __TMC_END__ 73: 0000000000401000 0 FUNC GLOBAL DEFAULT 11 _init # Run twice to show off PIE, if available in kernel ../build-tree/wrapper-test-compiled ../build-tree/wrapper-test-compiled: ok (0x401160) ../build-tree/wrapper-test-compiled ../build-tree/wrapper-test-compiled: ok (0x401160) # 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/ -O2 -o ../build-tree/wrapper-test-linked hello.c /usr/bin/gcc_wrapper -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -B ../build-tree/ -O2 -o ../build-tree/wrapper-test-linked hello.c /usr/bin/ld -z relro -z now -plugin /usr/libexec/gcc/x86_64-alt-linux/8/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-alt-linux/8/lto-wrapper -plugin-opt=-fresolution=/usr/src/tmp/ccY0H3mB.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu --as-needed -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o ../build-tree/wrapper-test-linked /usr/lib64/gcc/x86_64-alt-linux/8/../../../../lib64/crt1.o /usr/lib64/gcc/x86_64-alt-linux/8/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-alt-linux/8/crtbegin.o -L../build-tree -L/usr/lib64/gcc/x86_64-alt-linux/8 -L/usr/lib64/gcc/x86_64-alt-linux/8/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-alt-linux/8/../../.. /usr/src/tmp/ccrgLiJs.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib64/gcc/x86_64-alt-linux/8/crtend.o /usr/lib64/gcc/x86_64-alt-linux/8/../../../../lib64/crtn.o readelf -ldrsW ../build-tree/wrapper-test-linked Elf file type is EXEC (Executable file) Entry point 0x401080 There are 11 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000040 0x0000000000400040 0x0000000000400040 0x000268 0x000268 R 0x8 INTERP 0x0002a8 0x00000000004002a8 0x00000000004002a8 0x00001c 0x00001c R 0x1 [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2] LOAD 0x000000 0x0000000000400000 0x0000000000400000 0x0004f8 0x0004f8 R 0x1000 LOAD 0x001000 0x0000000000401000 0x0000000000401000 0x00023d 0x00023d R E 0x1000 LOAD 0x002000 0x0000000000402000 0x0000000000402000 0x000168 0x000168 R 0x1000 LOAD 0x002dc0 0x0000000000403dc0 0x0000000000403dc0 0x000244 0x000248 RW 0x1000 DYNAMIC 0x002dd0 0x0000000000403dd0 0x0000000000403dd0 0x0001f0 0x0001f0 RW 0x8 NOTE 0x0002c4 0x00000000004002c4 0x00000000004002c4 0x000044 0x000044 R 0x4 GNU_EH_FRAME 0x002020 0x0000000000402020 0x0000000000402020 0x00003c 0x00003c R 0x4 GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW 0x10 GNU_RELRO 0x002dc0 0x0000000000403dc0 0x0000000000403dc0 0x000240 0x000240 R 0x1 Section to Segment mapping: Segment Sections... 00 01 .interp 02 .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rela.dyn .rela.plt 03 .init .plt .text .fini 04 .rodata .eh_frame_hdr .eh_frame 05 .init_array .fini_array .dynamic .got .data .bss 06 .dynamic 07 .note.ABI-tag .note.gnu.build-id 08 .eh_frame_hdr 09 10 .init_array .fini_array .dynamic .got Dynamic section at offset 0x2dd0 contains 26 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x000000000000000c (INIT) 0x401000 0x000000000000000d (FINI) 0x401234 0x0000000000000019 (INIT_ARRAY) 0x403dc0 0x000000000000001b (INIT_ARRAYSZ) 8 (bytes) 0x000000000000001a (FINI_ARRAY) 0x403dc8 0x000000000000001c (FINI_ARRAYSZ) 8 (bytes) 0x000000006ffffef5 (GNU_HASH) 0x400308 0x0000000000000005 (STRTAB) 0x4003b8 0x0000000000000006 (SYMTAB) 0x400328 0x000000000000000a (STRSZ) 117 (bytes) 0x000000000000000b (SYMENT) 24 (bytes) 0x0000000000000015 (DEBUG) 0x0 0x0000000000000003 (PLTGOT) 0x403fc0 0x0000000000000002 (PLTRELSZ) 72 (bytes) 0x0000000000000014 (PLTREL) RELA 0x0000000000000017 (JMPREL) 0x4004b0 0x0000000000000007 (RELA) 0x400480 0x0000000000000008 (RELASZ) 48 (bytes) 0x0000000000000009 (RELAENT) 24 (bytes) 0x0000000000000018 (BIND_NOW) 0x000000006ffffffb (FLAGS_1) Flags: NOW 0x000000006ffffffe (VERNEED) 0x400440 0x000000006fffffff (VERNEEDNUM) 1 0x000000006ffffff0 (VERSYM) 0x40042e 0x0000000000000000 (NULL) 0x0 Relocation section '.rela.dyn' at offset 0x480 contains 2 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000403ff0 0000000300000006 R_X86_64_GLOB_DAT 0000000000000000 __libc_start_main@GLIBC_2.2.5 + 0 0000000000403ff8 0000000400000006 R_X86_64_GLOB_DAT 0000000000000000 __gmon_start__ + 0 Relocation section '.rela.plt' at offset 0x4b0 contains 3 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000403fd8 0000000100000007 R_X86_64_JUMP_SLOT 0000000000000000 __stack_chk_fail@GLIBC_2.4 + 0 0000000000403fe0 0000000200000007 R_X86_64_JUMP_SLOT 0000000000000000 snprintf@GLIBC_2.2.5 + 0 0000000000403fe8 0000000500000007 R_X86_64_JUMP_SLOT 0000000000000000 __printf_chk@GLIBC_2.3.4 + 0 Symbol table '.dynsym' contains 6 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@GLIBC_2.4 (2) 2: 0000000000000000 0 FUNC GLOBAL DEFAULT UND snprintf@GLIBC_2.2.5 (3) 3: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.2.5 (3) 4: 0000000000000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 5: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@GLIBC_2.3.4 (4) Symbol table '.symtab' contains 73 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000004002a8 0 SECTION LOCAL DEFAULT 1 2: 00000000004002c4 0 SECTION LOCAL DEFAULT 2 3: 00000000004002e4 0 SECTION LOCAL DEFAULT 3 4: 0000000000400308 0 SECTION LOCAL DEFAULT 4 5: 0000000000400328 0 SECTION LOCAL DEFAULT 5 6: 00000000004003b8 0 SECTION LOCAL DEFAULT 6 7: 000000000040042e 0 SECTION LOCAL DEFAULT 7 8: 0000000000400440 0 SECTION LOCAL DEFAULT 8 9: 0000000000400480 0 SECTION LOCAL DEFAULT 9 10: 00000000004004b0 0 SECTION LOCAL DEFAULT 10 11: 0000000000401000 0 SECTION LOCAL DEFAULT 11 12: 0000000000401020 0 SECTION LOCAL DEFAULT 12 13: 0000000000401060 0 SECTION LOCAL DEFAULT 13 14: 0000000000401234 0 SECTION LOCAL DEFAULT 14 15: 0000000000402000 0 SECTION LOCAL DEFAULT 15 16: 0000000000402020 0 SECTION LOCAL DEFAULT 16 17: 0000000000402060 0 SECTION LOCAL DEFAULT 17 18: 0000000000403dc0 0 SECTION LOCAL DEFAULT 18 19: 0000000000403dc8 0 SECTION LOCAL DEFAULT 19 20: 0000000000403dd0 0 SECTION LOCAL DEFAULT 20 21: 0000000000403fc0 0 SECTION LOCAL DEFAULT 21 22: 0000000000404000 0 SECTION LOCAL DEFAULT 22 23: 0000000000404004 0 SECTION LOCAL DEFAULT 23 24: 0000000000000000 0 SECTION LOCAL DEFAULT 24 25: 0000000000000000 0 SECTION LOCAL DEFAULT 25 26: 0000000000000000 0 SECTION LOCAL DEFAULT 26 27: 0000000000000000 0 SECTION LOCAL DEFAULT 27 28: 0000000000000000 0 SECTION LOCAL DEFAULT 28 29: 0000000000000000 0 SECTION LOCAL DEFAULT 29 30: 0000000000000000 0 SECTION LOCAL DEFAULT 30 31: 0000000000000000 0 SECTION LOCAL DEFAULT 31 32: 0000000000000000 0 SECTION LOCAL DEFAULT 32 33: 0000000000000000 0 FILE LOCAL DEFAULT ABS init.c 34: 0000000000000000 0 FILE LOCAL DEFAULT ABS static-reloc.c 35: 0000000000000000 0 FILE LOCAL DEFAULT ABS hello.c 36: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 37: 00000000004010b0 0 FUNC LOCAL DEFAULT 13 deregister_tm_clones 38: 00000000004010e0 0 FUNC LOCAL DEFAULT 13 register_tm_clones 39: 0000000000401120 0 FUNC LOCAL DEFAULT 13 __do_global_dtors_aux 40: 0000000000404004 1 OBJECT LOCAL DEFAULT 23 completed.7991 41: 0000000000403dc8 0 OBJECT LOCAL DEFAULT 19 __do_global_dtors_aux_fini_array_entry 42: 0000000000401150 0 FUNC LOCAL DEFAULT 13 frame_dummy 43: 0000000000403dc0 0 OBJECT LOCAL DEFAULT 18 __frame_dummy_init_array_entry 44: 0000000000000000 0 FILE LOCAL DEFAULT ABS elf-init.c 45: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 46: 0000000000402164 0 OBJECT LOCAL DEFAULT 17 __FRAME_END__ 47: 0000000000000000 0 FILE LOCAL DEFAULT ABS 48: 0000000000403dc8 0 NOTYPE LOCAL DEFAULT 18 __init_array_end 49: 0000000000403dd0 0 OBJECT LOCAL DEFAULT 20 _DYNAMIC 50: 0000000000403dc0 0 NOTYPE LOCAL DEFAULT 18 __init_array_start 51: 0000000000402020 0 NOTYPE LOCAL DEFAULT 16 __GNU_EH_FRAME_HDR 52: 0000000000403fc0 0 OBJECT LOCAL DEFAULT 21 _GLOBAL_OFFSET_TABLE_ 53: 0000000000401230 1 FUNC GLOBAL DEFAULT 13 __libc_csu_fini 54: 0000000000404000 0 NOTYPE WEAK DEFAULT 22 data_start 55: 0000000000404004 0 NOTYPE GLOBAL DEFAULT 22 _edata 56: 0000000000401234 0 FUNC GLOBAL DEFAULT 14 _fini 57: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@@GLIBC_2.4 58: 0000000000000000 0 FUNC GLOBAL DEFAULT UND snprintf@@GLIBC_2.2.5 59: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_2.2.5 60: 0000000000404000 0 NOTYPE GLOBAL DEFAULT 22 __data_start 61: 0000000000000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 62: 0000000000402008 0 OBJECT GLOBAL HIDDEN 15 __dso_handle 63: 0000000000401160 104 FUNC GLOBAL DEFAULT 13 announcement 64: 0000000000402000 4 OBJECT GLOBAL DEFAULT 15 _IO_stdin_used 65: 00000000004011d0 93 FUNC GLOBAL DEFAULT 13 __libc_csu_init 66: 0000000000404008 0 NOTYPE GLOBAL DEFAULT 23 _end 67: 0000000000401080 43 FUNC GLOBAL DEFAULT 13 _start 68: 0000000000404004 0 NOTYPE GLOBAL DEFAULT 23 __bss_start 69: 0000000000401060 25 FUNC GLOBAL DEFAULT 13 main 70: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@@GLIBC_2.3.4 71: 0000000000404008 0 OBJECT GLOBAL HIDDEN 22 __TMC_END__ 72: 0000000000401000 0 FUNC GLOBAL DEFAULT 11 _init # Run twice to show off PIE, if available in kernel ../build-tree/wrapper-test-linked ../build-tree/wrapper-test-linked: ok (0x401160) ../build-tree/wrapper-test-linked ../build-tree/wrapper-test-linked: ok (0x401160) # Check state of hardening features via check script perl ../build-tree/hardening-check -p ../build-tree/wrapper-test-linked ../build-tree/wrapper-test-linked: Position Independent Executable: no, normal executable! (ignored) Stack protected: yes Fortify Source functions: yes (some protected functions found) Read-only relocations: yes Immediate binding: yes # Manually check state of hardening features # Skipped PIE test # Test Stack Protector nm ../build-tree/wrapper-test-linked | egrep '__stack_chk_fail($|@@GLIBC)' U __stack_chk_fail@@GLIBC_2.4 # Test Fortify nm ../build-tree/wrapper-test-linked | egrep '__(sn)?printf_chk($|@@GLIBC)' U __printf_chk@@GLIBC_2.3.4 # Test Format (no-op currently) # Test for RELRO readelf -lW ../build-tree/wrapper-test-linked | grep GNU_RELRO GNU_RELRO 0x002dc0 0x0000000000403dc0 0x0000000000403dc0 0x000240 0x000240 R 0x1 # Test for BIND_NOW readelf -dW ../build-tree/wrapper-test-linked | grep BIND_NOW 0x0000000000000018 (BIND_NOW) # Build directly with -fPIC already defined ../build-tree/hardened-cc -B ../build-tree/ -fPIC -O2 -o ../build-tree/wrapper-test-fPIC-direct hello.c /usr/bin/gcc_wrapper -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -B ../build-tree/ -fPIC -O2 -o ../build-tree/wrapper-test-fPIC-direct hello.c /usr/bin/ld -z relro -z now -plugin /usr/libexec/gcc/x86_64-alt-linux/8/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-alt-linux/8/lto-wrapper -plugin-opt=-fresolution=/usr/src/tmp/ccL5fQBT.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu --as-needed -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o ../build-tree/wrapper-test-fPIC-direct /usr/lib64/gcc/x86_64-alt-linux/8/../../../../lib64/crt1.o /usr/lib64/gcc/x86_64-alt-linux/8/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-alt-linux/8/crtbegin.o -L../build-tree -L/usr/lib64/gcc/x86_64-alt-linux/8 -L/usr/lib64/gcc/x86_64-alt-linux/8/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-alt-linux/8/../../.. /usr/src/tmp/ccvrj2wK.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib64/gcc/x86_64-alt-linux/8/crtend.o /usr/lib64/gcc/x86_64-alt-linux/8/../../../../lib64/crtn.o ../build-tree/wrapper-test-fPIC-direct ../build-tree/wrapper-test-fPIC-direct: ok (0x401160) # Build .o with -fPIC already defined ../build-tree/hardened-cc -B ../build-tree/ -fPIC -O2 -o ../build-tree/wrapper-test-fPIC.o -c hello.c /usr/bin/gcc_wrapper -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -B ../build-tree/ -fPIC -O2 -o ../build-tree/wrapper-test-fPIC.o -c hello.c # Link .o with -fPIC already defined ../build-tree/hardened-cc -B ../build-tree/ -fPIC -O2 -o ../build-tree/wrapper-test-fPIC ../build-tree/wrapper-test-fPIC.o /usr/bin/gcc_wrapper -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -B ../build-tree/ -fPIC -O2 -o ../build-tree/wrapper-test-fPIC ../build-tree/wrapper-test-fPIC.o /usr/bin/ld -z relro -z now -plugin /usr/libexec/gcc/x86_64-alt-linux/8/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-alt-linux/8/lto-wrapper -plugin-opt=-fresolution=/usr/src/tmp/cc0MgTOK.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu --as-needed -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o ../build-tree/wrapper-test-fPIC /usr/lib64/gcc/x86_64-alt-linux/8/../../../../lib64/crt1.o /usr/lib64/gcc/x86_64-alt-linux/8/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-alt-linux/8/crtbegin.o -L../build-tree -L/usr/lib64/gcc/x86_64-alt-linux/8 -L/usr/lib64/gcc/x86_64-alt-linux/8/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-alt-linux/8/../../.. ../build-tree/wrapper-test-fPIC.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib64/gcc/x86_64-alt-linux/8/crtend.o /usr/lib64/gcc/x86_64-alt-linux/8/../../../../lib64/crtn.o ../build-tree/wrapper-test-fPIC ../build-tree/wrapper-test-fPIC: ok (0x401160) # Make sure build fails due to -Werror=format-security ! ../build-tree/hardened-cc -B ../build-tree/ -O2 -o ../build-tree/wrapper-test-format-security format.c /usr/bin/gcc_wrapper -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -B ../build-tree/ -O2 -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] return fprintf(stderr, argv[0]); ^~~~~~ cc1: some warnings being treated as errors # Make sure build succeeds with -Wno-format-security ../build-tree/hardened-cc -B ../build-tree/ -O2 -Wno-format-security -o ../build-tree/wrapper-test-format-security format.c /usr/bin/gcc_wrapper -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -B ../build-tree/ -O2 -Wno-format-security -o ../build-tree/wrapper-test-format-security format.c /usr/bin/ld -z relro -z now -plugin /usr/libexec/gcc/x86_64-alt-linux/8/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-alt-linux/8/lto-wrapper -plugin-opt=-fresolution=/usr/src/tmp/ccJmL5S7.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu --as-needed -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o ../build-tree/wrapper-test-format-security /usr/lib64/gcc/x86_64-alt-linux/8/../../../../lib64/crt1.o /usr/lib64/gcc/x86_64-alt-linux/8/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-alt-linux/8/crtbegin.o -L../build-tree -L/usr/lib64/gcc/x86_64-alt-linux/8 -L/usr/lib64/gcc/x86_64-alt-linux/8/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-alt-linux/8/../../.. /usr/src/tmp/cch6F8hY.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib64/gcc/x86_64-alt-linux/8/crtend.o /usr/lib64/gcc/x86_64-alt-linux/8/../../../../lib64/crtn.o # Make sure build stack-protects a small ssp buffer ../build-tree/hardened-cc -B ../build-tree/ -O2 -o ../build-tree/wrapper-test-ssp-buffer-size-protect ssp-buffer-size-protect.c /usr/bin/gcc_wrapper -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -B ../build-tree/ -O2 -o ../build-tree/wrapper-test-ssp-buffer-size-protect ssp-buffer-size-protect.c /usr/bin/ld -z relro -z now -plugin /usr/libexec/gcc/x86_64-alt-linux/8/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-alt-linux/8/lto-wrapper -plugin-opt=-fresolution=/usr/src/tmp/ccMu68bi.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu --as-needed -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o ../build-tree/wrapper-test-ssp-buffer-size-protect /usr/lib64/gcc/x86_64-alt-linux/8/../../../../lib64/crt1.o /usr/lib64/gcc/x86_64-alt-linux/8/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-alt-linux/8/crtbegin.o -L../build-tree -L/usr/lib64/gcc/x86_64-alt-linux/8 -L/usr/lib64/gcc/x86_64-alt-linux/8/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-alt-linux/8/../../.. /usr/src/tmp/ccFHXwf8.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib64/gcc/x86_64-alt-linux/8/crtend.o /usr/lib64/gcc/x86_64-alt-linux/8/../../../../lib64/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 stack-protects a non-char array ../build-tree/hardened-cc -B ../build-tree/ -O2 -o ../build-tree/wrapper-test-ssp-buffer-type-protect ssp-buffer-type-protect.c /usr/bin/gcc_wrapper -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -B ../build-tree/ -O2 -o ../build-tree/wrapper-test-ssp-buffer-type-protect ssp-buffer-type-protect.c /usr/bin/ld -z relro -z now -plugin /usr/libexec/gcc/x86_64-alt-linux/8/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-alt-linux/8/lto-wrapper -plugin-opt=-fresolution=/usr/src/tmp/ccU7wbNn.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu --as-needed -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o ../build-tree/wrapper-test-ssp-buffer-type-protect /usr/lib64/gcc/x86_64-alt-linux/8/../../../../lib64/crt1.o /usr/lib64/gcc/x86_64-alt-linux/8/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-alt-linux/8/crtbegin.o -L../build-tree -L/usr/lib64/gcc/x86_64-alt-linux/8 -L/usr/lib64/gcc/x86_64-alt-linux/8/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-alt-linux/8/../../.. /usr/src/tmp/cc3tJTDd.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib64/gcc/x86_64-alt-linux/8/crtend.o /usr/lib64/gcc/x86_64-alt-linux/8/../../../../lib64/crtn.o # Test Stack Protector nm ../build-tree/wrapper-test-ssp-buffer-type-protect | egrep '__stack_chk_fail($|@@GLIBC)' U __stack_chk_fail@@GLIBC_2.4 ../build-tree/hardened-cc -B ../build-tree/ -O2 -c -o ../build-tree/wrapper-test-all.o hello.c /usr/bin/gcc_wrapper -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -B ../build-tree/ -O2 -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. There is no dynamic section in this file. Relocation section '.rela.text' at offset 0x310 contains 6 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 000000000000000b 000000050000000a R_X86_64_32 0000000000000000 .rodata.str1.1 + 0 000000000000002b 0000000b00000004 R_X86_64_PLT32 0000000000000000 snprintf - 4 0000000000000035 0000000a0000000a R_X86_64_32 0000000000000000 announcement + 0 000000000000003a 000000050000000a R_X86_64_32 0000000000000000 .rodata.str1.1 + 3 0000000000000044 0000000c00000004 R_X86_64_PLT32 0000000000000000 __printf_chk - 4 0000000000000064 0000000d00000004 R_X86_64_PLT32 0000000000000000 __stack_chk_fail - 4 Relocation section '.rela.text.startup' at offset 0x3a0 contains 1 entry: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000000008 0000000a00000004 R_X86_64_PLT32 0000000000000000 announcement - 4 Relocation section '.rela.eh_frame' at offset 0x3b8 contains 2 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000000020 0000000200000002 R_X86_64_PC32 0000000000000000 .text + 0 000000000000003c 0000000600000002 R_X86_64_PC32 0000000000000000 .text.startup + 0 Symbol table '.symtab' contains 15 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000000 0 FILE LOCAL DEFAULT ABS hello.c 2: 0000000000000000 0 SECTION LOCAL DEFAULT 1 3: 0000000000000000 0 SECTION LOCAL DEFAULT 3 4: 0000000000000000 0 SECTION LOCAL DEFAULT 4 5: 0000000000000000 0 SECTION LOCAL DEFAULT 5 6: 0000000000000000 0 SECTION LOCAL DEFAULT 6 7: 0000000000000000 0 SECTION LOCAL DEFAULT 9 8: 0000000000000000 0 SECTION LOCAL DEFAULT 10 9: 0000000000000000 0 SECTION LOCAL DEFAULT 8 10: 0000000000000000 104 FUNC GLOBAL DEFAULT 1 announcement 11: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND snprintf 12: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __printf_chk 13: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __stack_chk_fail 14: 0000000000000000 25 FUNC GLOBAL DEFAULT 6 main perl ../build-tree/hardening-check -p ../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_wrapper -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. There is no dynamic section in this file. Relocation section '.rela.text' at offset 0x310 contains 7 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000000033 000000050000000a R_X86_64_32 0000000000000000 .rodata + 0 0000000000000045 0000000a00000004 R_X86_64_PLT32 0000000000000000 snprintf - 4 0000000000000051 000000090000000a R_X86_64_32 0000000000000000 announcement + 0 0000000000000059 000000050000000a R_X86_64_32 0000000000000000 .rodata + 3 0000000000000063 0000000b00000004 R_X86_64_PLT32 0000000000000000 printf - 4 0000000000000077 0000000c00000004 R_X86_64_PLT32 0000000000000000 __stack_chk_fail - 4 0000000000000097 0000000900000004 R_X86_64_PLT32 0000000000000000 announcement - 4 Relocation section '.rela.eh_frame' at offset 0x3b8 contains 2 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000000020 0000000200000002 R_X86_64_PC32 0000000000000000 .text + 0 0000000000000040 0000000200000002 R_X86_64_PC32 0000000000000000 .text + 7d Symbol table '.symtab' contains 14 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000000 0 FILE LOCAL DEFAULT ABS hello.c 2: 0000000000000000 0 SECTION LOCAL DEFAULT 1 3: 0000000000000000 0 SECTION LOCAL DEFAULT 3 4: 0000000000000000 0 SECTION LOCAL DEFAULT 4 5: 0000000000000000 0 SECTION LOCAL DEFAULT 5 6: 0000000000000000 0 SECTION LOCAL DEFAULT 7 7: 0000000000000000 0 SECTION LOCAL DEFAULT 8 8: 0000000000000000 0 SECTION LOCAL DEFAULT 6 9: 0000000000000000 125 FUNC GLOBAL DEFAULT 1 announcement 10: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND snprintf 11: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND printf 12: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __stack_chk_fail 13: 000000000000007d 40 FUNC GLOBAL DEFAULT 1 main if perl ../build-tree/hardening-check -p ../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: yes Fortify Source functions: no, only unprotected functions found! Read-only relocations: no, non-ELF (ignored) Immediate binding: no, non-ELF (ignored) make[2]: Leaving directory '/usr/src/RPM/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make -f Makefile.includes check make[2]: Entering directory '/usr/src/RPM/BUILD/hardening-wrapper-2.6/hardening-wrapper/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 0x401060 There are 11 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000040 0x0000000000400040 0x0000000000400040 0x000268 0x000268 R 0x8 INTERP 0x0002a8 0x00000000004002a8 0x00000000004002a8 0x00001c 0x00001c R 0x1 [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2] LOAD 0x000000 0x0000000000400000 0x0000000000400000 0x0004c8 0x0004c8 R 0x1000 LOAD 0x001000 0x0000000000401000 0x0000000000401000 0x00024d 0x00024d R E 0x1000 LOAD 0x002000 0x0000000000402000 0x0000000000402000 0x000170 0x000170 R 0x1000 LOAD 0x002e10 0x0000000000403e10 0x0000000000403e10 0x000224 0x000228 RW 0x1000 DYNAMIC 0x002e20 0x0000000000403e20 0x0000000000403e20 0x0001d0 0x0001d0 RW 0x8 NOTE 0x0002c4 0x00000000004002c4 0x00000000004002c4 0x000044 0x000044 R 0x4 GNU_EH_FRAME 0x002020 0x0000000000402020 0x0000000000402020 0x00003c 0x00003c R 0x4 GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW 0x10 GNU_RELRO 0x002e10 0x0000000000403e10 0x0000000000403e10 0x0001f0 0x0001f0 R 0x1 Section to Segment mapping: Segment Sections... 00 01 .interp 02 .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rela.dyn .rela.plt 03 .init .plt .text .fini 04 .rodata .eh_frame_hdr .eh_frame 05 .init_array .fini_array .dynamic .got .got.plt .data .bss 06 .dynamic 07 .note.ABI-tag .note.gnu.build-id 08 .eh_frame_hdr 09 10 .init_array .fini_array .dynamic .got Dynamic section at offset 0x2e20 contains 24 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x000000000000000c (INIT) 0x401000 0x000000000000000d (FINI) 0x401244 0x0000000000000019 (INIT_ARRAY) 0x403e10 0x000000000000001b (INIT_ARRAYSZ) 8 (bytes) 0x000000000000001a (FINI_ARRAY) 0x403e18 0x000000000000001c (FINI_ARRAYSZ) 8 (bytes) 0x000000006ffffef5 (GNU_HASH) 0x400308 0x0000000000000005 (STRTAB) 0x4003b8 0x0000000000000006 (SYMTAB) 0x400328 0x000000000000000a (STRSZ) 92 (bytes) 0x000000000000000b (SYMENT) 24 (bytes) 0x0000000000000015 (DEBUG) 0x0 0x0000000000000003 (PLTGOT) 0x404000 0x0000000000000002 (PLTRELSZ) 72 (bytes) 0x0000000000000014 (PLTREL) RELA 0x0000000000000017 (JMPREL) 0x400480 0x0000000000000007 (RELA) 0x400450 0x0000000000000008 (RELASZ) 48 (bytes) 0x0000000000000009 (RELAENT) 24 (bytes) 0x000000006ffffffe (VERNEED) 0x400420 0x000000006fffffff (VERNEEDNUM) 1 0x000000006ffffff0 (VERSYM) 0x400414 0x0000000000000000 (NULL) 0x0 Relocation section '.rela.dyn' at offset 0x450 contains 2 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000403ff0 0000000400000006 R_X86_64_GLOB_DAT 0000000000000000 __libc_start_main@GLIBC_2.2.5 + 0 0000000000403ff8 0000000500000006 R_X86_64_GLOB_DAT 0000000000000000 __gmon_start__ + 0 Relocation section '.rela.plt' at offset 0x480 contains 3 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000404018 0000000100000007 R_X86_64_JUMP_SLOT 0000000000000000 __stack_chk_fail@GLIBC_2.4 + 0 0000000000404020 0000000200000007 R_X86_64_JUMP_SLOT 0000000000000000 printf@GLIBC_2.2.5 + 0 0000000000404028 0000000300000007 R_X86_64_JUMP_SLOT 0000000000000000 snprintf@GLIBC_2.2.5 + 0 Symbol table '.dynsym' contains 6 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@GLIBC_2.4 (2) 2: 0000000000000000 0 FUNC GLOBAL DEFAULT UND printf@GLIBC_2.2.5 (3) 3: 0000000000000000 0 FUNC GLOBAL DEFAULT UND snprintf@GLIBC_2.2.5 (3) 4: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.2.5 (3) 5: 0000000000000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ Symbol table '.symtab' contains 74 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000004002a8 0 SECTION LOCAL DEFAULT 1 2: 00000000004002c4 0 SECTION LOCAL DEFAULT 2 3: 00000000004002e4 0 SECTION LOCAL DEFAULT 3 4: 0000000000400308 0 SECTION LOCAL DEFAULT 4 5: 0000000000400328 0 SECTION LOCAL DEFAULT 5 6: 00000000004003b8 0 SECTION LOCAL DEFAULT 6 7: 0000000000400414 0 SECTION LOCAL DEFAULT 7 8: 0000000000400420 0 SECTION LOCAL DEFAULT 8 9: 0000000000400450 0 SECTION LOCAL DEFAULT 9 10: 0000000000400480 0 SECTION LOCAL DEFAULT 10 11: 0000000000401000 0 SECTION LOCAL DEFAULT 11 12: 0000000000401020 0 SECTION LOCAL DEFAULT 12 13: 0000000000401060 0 SECTION LOCAL DEFAULT 13 14: 0000000000401244 0 SECTION LOCAL DEFAULT 14 15: 0000000000402000 0 SECTION LOCAL DEFAULT 15 16: 0000000000402020 0 SECTION LOCAL DEFAULT 16 17: 0000000000402060 0 SECTION LOCAL DEFAULT 17 18: 0000000000403e10 0 SECTION LOCAL DEFAULT 18 19: 0000000000403e18 0 SECTION LOCAL DEFAULT 19 20: 0000000000403e20 0 SECTION LOCAL DEFAULT 20 21: 0000000000403ff0 0 SECTION LOCAL DEFAULT 21 22: 0000000000404000 0 SECTION LOCAL DEFAULT 22 23: 0000000000404030 0 SECTION LOCAL DEFAULT 23 24: 0000000000404034 0 SECTION LOCAL DEFAULT 24 25: 0000000000000000 0 SECTION LOCAL DEFAULT 25 26: 0000000000000000 0 SECTION LOCAL DEFAULT 26 27: 0000000000000000 0 SECTION LOCAL DEFAULT 27 28: 0000000000000000 0 SECTION LOCAL DEFAULT 28 29: 0000000000000000 0 SECTION LOCAL DEFAULT 29 30: 0000000000000000 0 SECTION LOCAL DEFAULT 30 31: 0000000000000000 0 SECTION LOCAL DEFAULT 31 32: 0000000000000000 0 SECTION LOCAL DEFAULT 32 33: 0000000000000000 0 SECTION LOCAL DEFAULT 33 34: 0000000000000000 0 FILE LOCAL DEFAULT ABS init.c 35: 0000000000000000 0 FILE LOCAL DEFAULT ABS static-reloc.c 36: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 37: 0000000000401090 0 FUNC LOCAL DEFAULT 13 deregister_tm_clones 38: 00000000004010c0 0 FUNC LOCAL DEFAULT 13 register_tm_clones 39: 0000000000401100 0 FUNC LOCAL DEFAULT 13 __do_global_dtors_aux 40: 0000000000404034 1 OBJECT LOCAL DEFAULT 24 completed.7991 41: 0000000000403e18 0 OBJECT LOCAL DEFAULT 19 __do_global_dtors_aux_fini_array_entry 42: 0000000000401130 0 FUNC LOCAL DEFAULT 13 frame_dummy 43: 0000000000403e10 0 OBJECT LOCAL DEFAULT 18 __frame_dummy_init_array_entry 44: 0000000000000000 0 FILE LOCAL DEFAULT ABS hello.c 45: 0000000000000000 0 FILE LOCAL DEFAULT ABS elf-init.c 46: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 47: 000000000040216c 0 OBJECT LOCAL DEFAULT 17 __FRAME_END__ 48: 0000000000000000 0 FILE LOCAL DEFAULT ABS 49: 0000000000403e18 0 NOTYPE LOCAL DEFAULT 18 __init_array_end 50: 0000000000403e20 0 OBJECT LOCAL DEFAULT 20 _DYNAMIC 51: 0000000000403e10 0 NOTYPE LOCAL DEFAULT 18 __init_array_start 52: 0000000000402020 0 NOTYPE LOCAL DEFAULT 16 __GNU_EH_FRAME_HDR 53: 0000000000404000 0 OBJECT LOCAL DEFAULT 22 _GLOBAL_OFFSET_TABLE_ 54: 0000000000401240 1 FUNC GLOBAL DEFAULT 13 __libc_csu_fini 55: 0000000000404030 0 NOTYPE WEAK DEFAULT 23 data_start 56: 0000000000404034 0 NOTYPE GLOBAL DEFAULT 23 _edata 57: 0000000000401244 0 FUNC GLOBAL DEFAULT 14 _fini 58: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@@GLIBC_2.4 59: 0000000000000000 0 FUNC GLOBAL DEFAULT UND printf@@GLIBC_2.2.5 60: 0000000000000000 0 FUNC GLOBAL DEFAULT UND snprintf@@GLIBC_2.2.5 61: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_2.2.5 62: 0000000000404030 0 NOTYPE GLOBAL DEFAULT 23 __data_start 63: 0000000000000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 64: 0000000000402008 0 OBJECT GLOBAL HIDDEN 15 __dso_handle 65: 0000000000401132 125 FUNC GLOBAL DEFAULT 13 announcement 66: 0000000000402000 4 OBJECT GLOBAL DEFAULT 15 _IO_stdin_used 67: 00000000004011e0 93 FUNC GLOBAL DEFAULT 13 __libc_csu_init 68: 0000000000404038 0 NOTYPE GLOBAL DEFAULT 24 _end 69: 0000000000401060 43 FUNC GLOBAL DEFAULT 13 _start 70: 0000000000404034 0 NOTYPE GLOBAL DEFAULT 24 __bss_start 71: 00000000004011af 40 FUNC GLOBAL DEFAULT 13 main 72: 0000000000404038 0 OBJECT GLOBAL HIDDEN 23 __TMC_END__ 73: 0000000000401000 0 FUNC GLOBAL DEFAULT 11 _init ../build-tree/includes-test-stock ../build-tree/includes-test-stock: ok (0x401132) # Compiler options enabled. (linker is not wrapper) cc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -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 EXEC (Executable file) Entry point 0x401080 There are 11 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000040 0x0000000000400040 0x0000000000400040 0x000268 0x000268 R 0x8 INTERP 0x0002a8 0x00000000004002a8 0x00000000004002a8 0x00001c 0x00001c R 0x1 [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2] LOAD 0x000000 0x0000000000400000 0x0000000000400000 0x0004f8 0x0004f8 R 0x1000 LOAD 0x001000 0x0000000000401000 0x0000000000401000 0x00023d 0x00023d R E 0x1000 LOAD 0x002000 0x0000000000402000 0x0000000000402000 0x000168 0x000168 R 0x1000 LOAD 0x002dc0 0x0000000000403dc0 0x0000000000403dc0 0x000244 0x000248 RW 0x1000 DYNAMIC 0x002dd0 0x0000000000403dd0 0x0000000000403dd0 0x0001f0 0x0001f0 RW 0x8 NOTE 0x0002c4 0x00000000004002c4 0x00000000004002c4 0x000044 0x000044 R 0x4 GNU_EH_FRAME 0x002020 0x0000000000402020 0x0000000000402020 0x00003c 0x00003c R 0x4 GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW 0x10 GNU_RELRO 0x002dc0 0x0000000000403dc0 0x0000000000403dc0 0x000240 0x000240 R 0x1 Section to Segment mapping: Segment Sections... 00 01 .interp 02 .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rela.dyn .rela.plt 03 .init .plt .text .fini 04 .rodata .eh_frame_hdr .eh_frame 05 .init_array .fini_array .dynamic .got .data .bss 06 .dynamic 07 .note.ABI-tag .note.gnu.build-id 08 .eh_frame_hdr 09 10 .init_array .fini_array .dynamic .got Dynamic section at offset 0x2dd0 contains 26 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x000000000000000c (INIT) 0x401000 0x000000000000000d (FINI) 0x401234 0x0000000000000019 (INIT_ARRAY) 0x403dc0 0x000000000000001b (INIT_ARRAYSZ) 8 (bytes) 0x000000000000001a (FINI_ARRAY) 0x403dc8 0x000000000000001c (FINI_ARRAYSZ) 8 (bytes) 0x000000006ffffef5 (GNU_HASH) 0x400308 0x0000000000000005 (STRTAB) 0x4003b8 0x0000000000000006 (SYMTAB) 0x400328 0x000000000000000a (STRSZ) 117 (bytes) 0x000000000000000b (SYMENT) 24 (bytes) 0x0000000000000015 (DEBUG) 0x0 0x0000000000000003 (PLTGOT) 0x403fc0 0x0000000000000002 (PLTRELSZ) 72 (bytes) 0x0000000000000014 (PLTREL) RELA 0x0000000000000017 (JMPREL) 0x4004b0 0x0000000000000007 (RELA) 0x400480 0x0000000000000008 (RELASZ) 48 (bytes) 0x0000000000000009 (RELAENT) 24 (bytes) 0x0000000000000018 (BIND_NOW) 0x000000006ffffffb (FLAGS_1) Flags: NOW 0x000000006ffffffe (VERNEED) 0x400440 0x000000006fffffff (VERNEEDNUM) 1 0x000000006ffffff0 (VERSYM) 0x40042e 0x0000000000000000 (NULL) 0x0 Relocation section '.rela.dyn' at offset 0x480 contains 2 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000403ff0 0000000300000006 R_X86_64_GLOB_DAT 0000000000000000 __libc_start_main@GLIBC_2.2.5 + 0 0000000000403ff8 0000000400000006 R_X86_64_GLOB_DAT 0000000000000000 __gmon_start__ + 0 Relocation section '.rela.plt' at offset 0x4b0 contains 3 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000403fd8 0000000100000007 R_X86_64_JUMP_SLOT 0000000000000000 __stack_chk_fail@GLIBC_2.4 + 0 0000000000403fe0 0000000200000007 R_X86_64_JUMP_SLOT 0000000000000000 snprintf@GLIBC_2.2.5 + 0 0000000000403fe8 0000000500000007 R_X86_64_JUMP_SLOT 0000000000000000 __printf_chk@GLIBC_2.3.4 + 0 Symbol table '.dynsym' contains 6 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@GLIBC_2.4 (2) 2: 0000000000000000 0 FUNC GLOBAL DEFAULT UND snprintf@GLIBC_2.2.5 (3) 3: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.2.5 (3) 4: 0000000000000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 5: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@GLIBC_2.3.4 (4) Symbol table '.symtab' contains 73 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000004002a8 0 SECTION LOCAL DEFAULT 1 2: 00000000004002c4 0 SECTION LOCAL DEFAULT 2 3: 00000000004002e4 0 SECTION LOCAL DEFAULT 3 4: 0000000000400308 0 SECTION LOCAL DEFAULT 4 5: 0000000000400328 0 SECTION LOCAL DEFAULT 5 6: 00000000004003b8 0 SECTION LOCAL DEFAULT 6 7: 000000000040042e 0 SECTION LOCAL DEFAULT 7 8: 0000000000400440 0 SECTION LOCAL DEFAULT 8 9: 0000000000400480 0 SECTION LOCAL DEFAULT 9 10: 00000000004004b0 0 SECTION LOCAL DEFAULT 10 11: 0000000000401000 0 SECTION LOCAL DEFAULT 11 12: 0000000000401020 0 SECTION LOCAL DEFAULT 12 13: 0000000000401060 0 SECTION LOCAL DEFAULT 13 14: 0000000000401234 0 SECTION LOCAL DEFAULT 14 15: 0000000000402000 0 SECTION LOCAL DEFAULT 15 16: 0000000000402020 0 SECTION LOCAL DEFAULT 16 17: 0000000000402060 0 SECTION LOCAL DEFAULT 17 18: 0000000000403dc0 0 SECTION LOCAL DEFAULT 18 19: 0000000000403dc8 0 SECTION LOCAL DEFAULT 19 20: 0000000000403dd0 0 SECTION LOCAL DEFAULT 20 21: 0000000000403fc0 0 SECTION LOCAL DEFAULT 21 22: 0000000000404000 0 SECTION LOCAL DEFAULT 22 23: 0000000000404004 0 SECTION LOCAL DEFAULT 23 24: 0000000000000000 0 SECTION LOCAL DEFAULT 24 25: 0000000000000000 0 SECTION LOCAL DEFAULT 25 26: 0000000000000000 0 SECTION LOCAL DEFAULT 26 27: 0000000000000000 0 SECTION LOCAL DEFAULT 27 28: 0000000000000000 0 SECTION LOCAL DEFAULT 28 29: 0000000000000000 0 SECTION LOCAL DEFAULT 29 30: 0000000000000000 0 SECTION LOCAL DEFAULT 30 31: 0000000000000000 0 SECTION LOCAL DEFAULT 31 32: 0000000000000000 0 SECTION LOCAL DEFAULT 32 33: 0000000000000000 0 FILE LOCAL DEFAULT ABS init.c 34: 0000000000000000 0 FILE LOCAL DEFAULT ABS static-reloc.c 35: 0000000000000000 0 FILE LOCAL DEFAULT ABS hello.c 36: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 37: 00000000004010b0 0 FUNC LOCAL DEFAULT 13 deregister_tm_clones 38: 00000000004010e0 0 FUNC LOCAL DEFAULT 13 register_tm_clones 39: 0000000000401120 0 FUNC LOCAL DEFAULT 13 __do_global_dtors_aux 40: 0000000000404004 1 OBJECT LOCAL DEFAULT 23 completed.7991 41: 0000000000403dc8 0 OBJECT LOCAL DEFAULT 19 __do_global_dtors_aux_fini_array_entry 42: 0000000000401150 0 FUNC LOCAL DEFAULT 13 frame_dummy 43: 0000000000403dc0 0 OBJECT LOCAL DEFAULT 18 __frame_dummy_init_array_entry 44: 0000000000000000 0 FILE LOCAL DEFAULT ABS elf-init.c 45: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 46: 0000000000402164 0 OBJECT LOCAL DEFAULT 17 __FRAME_END__ 47: 0000000000000000 0 FILE LOCAL DEFAULT ABS 48: 0000000000403dc8 0 NOTYPE LOCAL DEFAULT 18 __init_array_end 49: 0000000000403dd0 0 OBJECT LOCAL DEFAULT 20 _DYNAMIC 50: 0000000000403dc0 0 NOTYPE LOCAL DEFAULT 18 __init_array_start 51: 0000000000402020 0 NOTYPE LOCAL DEFAULT 16 __GNU_EH_FRAME_HDR 52: 0000000000403fc0 0 OBJECT LOCAL DEFAULT 21 _GLOBAL_OFFSET_TABLE_ 53: 0000000000401230 1 FUNC GLOBAL DEFAULT 13 __libc_csu_fini 54: 0000000000404000 0 NOTYPE WEAK DEFAULT 22 data_start 55: 0000000000404004 0 NOTYPE GLOBAL DEFAULT 22 _edata 56: 0000000000401234 0 FUNC GLOBAL DEFAULT 14 _fini 57: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@@GLIBC_2.4 58: 0000000000000000 0 FUNC GLOBAL DEFAULT UND snprintf@@GLIBC_2.2.5 59: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_2.2.5 60: 0000000000404000 0 NOTYPE GLOBAL DEFAULT 22 __data_start 61: 0000000000000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 62: 0000000000402008 0 OBJECT GLOBAL HIDDEN 15 __dso_handle 63: 0000000000401160 104 FUNC GLOBAL DEFAULT 13 announcement 64: 0000000000402000 4 OBJECT GLOBAL DEFAULT 15 _IO_stdin_used 65: 00000000004011d0 93 FUNC GLOBAL DEFAULT 13 __libc_csu_init 66: 0000000000404008 0 NOTYPE GLOBAL DEFAULT 23 _end 67: 0000000000401080 43 FUNC GLOBAL DEFAULT 13 _start 68: 0000000000404004 0 NOTYPE GLOBAL DEFAULT 23 __bss_start 69: 0000000000401060 25 FUNC GLOBAL DEFAULT 13 main 70: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@@GLIBC_2.3.4 71: 0000000000404008 0 OBJECT GLOBAL HIDDEN 22 __TMC_END__ 72: 0000000000401000 0 FUNC GLOBAL DEFAULT 11 _init # Run twice to show off PIE, if available in kernel ../build-tree/includes-test-compiled ../build-tree/includes-test-compiled: ok (0x401160) ../build-tree/includes-test-compiled ../build-tree/includes-test-compiled: ok (0x401160) # Compiler and linker options enabled. cc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -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 EXEC (Executable file) Entry point 0x401080 There are 11 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000040 0x0000000000400040 0x0000000000400040 0x000268 0x000268 R 0x8 INTERP 0x0002a8 0x00000000004002a8 0x00000000004002a8 0x00001c 0x00001c R 0x1 [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2] LOAD 0x000000 0x0000000000400000 0x0000000000400000 0x0004f8 0x0004f8 R 0x1000 LOAD 0x001000 0x0000000000401000 0x0000000000401000 0x00023d 0x00023d R E 0x1000 LOAD 0x002000 0x0000000000402000 0x0000000000402000 0x000168 0x000168 R 0x1000 LOAD 0x002dc0 0x0000000000403dc0 0x0000000000403dc0 0x000244 0x000248 RW 0x1000 DYNAMIC 0x002dd0 0x0000000000403dd0 0x0000000000403dd0 0x0001f0 0x0001f0 RW 0x8 NOTE 0x0002c4 0x00000000004002c4 0x00000000004002c4 0x000044 0x000044 R 0x4 GNU_EH_FRAME 0x002020 0x0000000000402020 0x0000000000402020 0x00003c 0x00003c R 0x4 GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW 0x10 GNU_RELRO 0x002dc0 0x0000000000403dc0 0x0000000000403dc0 0x000240 0x000240 R 0x1 Section to Segment mapping: Segment Sections... 00 01 .interp 02 .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rela.dyn .rela.plt 03 .init .plt .text .fini 04 .rodata .eh_frame_hdr .eh_frame 05 .init_array .fini_array .dynamic .got .data .bss 06 .dynamic 07 .note.ABI-tag .note.gnu.build-id 08 .eh_frame_hdr 09 10 .init_array .fini_array .dynamic .got Dynamic section at offset 0x2dd0 contains 26 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x000000000000000c (INIT) 0x401000 0x000000000000000d (FINI) 0x401234 0x0000000000000019 (INIT_ARRAY) 0x403dc0 0x000000000000001b (INIT_ARRAYSZ) 8 (bytes) 0x000000000000001a (FINI_ARRAY) 0x403dc8 0x000000000000001c (FINI_ARRAYSZ) 8 (bytes) 0x000000006ffffef5 (GNU_HASH) 0x400308 0x0000000000000005 (STRTAB) 0x4003b8 0x0000000000000006 (SYMTAB) 0x400328 0x000000000000000a (STRSZ) 117 (bytes) 0x000000000000000b (SYMENT) 24 (bytes) 0x0000000000000015 (DEBUG) 0x0 0x0000000000000003 (PLTGOT) 0x403fc0 0x0000000000000002 (PLTRELSZ) 72 (bytes) 0x0000000000000014 (PLTREL) RELA 0x0000000000000017 (JMPREL) 0x4004b0 0x0000000000000007 (RELA) 0x400480 0x0000000000000008 (RELASZ) 48 (bytes) 0x0000000000000009 (RELAENT) 24 (bytes) 0x0000000000000018 (BIND_NOW) 0x000000006ffffffb (FLAGS_1) Flags: NOW 0x000000006ffffffe (VERNEED) 0x400440 0x000000006fffffff (VERNEEDNUM) 1 0x000000006ffffff0 (VERSYM) 0x40042e 0x0000000000000000 (NULL) 0x0 Relocation section '.rela.dyn' at offset 0x480 contains 2 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000403ff0 0000000300000006 R_X86_64_GLOB_DAT 0000000000000000 __libc_start_main@GLIBC_2.2.5 + 0 0000000000403ff8 0000000400000006 R_X86_64_GLOB_DAT 0000000000000000 __gmon_start__ + 0 Relocation section '.rela.plt' at offset 0x4b0 contains 3 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000403fd8 0000000100000007 R_X86_64_JUMP_SLOT 0000000000000000 __stack_chk_fail@GLIBC_2.4 + 0 0000000000403fe0 0000000200000007 R_X86_64_JUMP_SLOT 0000000000000000 snprintf@GLIBC_2.2.5 + 0 0000000000403fe8 0000000500000007 R_X86_64_JUMP_SLOT 0000000000000000 __printf_chk@GLIBC_2.3.4 + 0 Symbol table '.dynsym' contains 6 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@GLIBC_2.4 (2) 2: 0000000000000000 0 FUNC GLOBAL DEFAULT UND snprintf@GLIBC_2.2.5 (3) 3: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.2.5 (3) 4: 0000000000000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 5: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@GLIBC_2.3.4 (4) Symbol table '.symtab' contains 73 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000004002a8 0 SECTION LOCAL DEFAULT 1 2: 00000000004002c4 0 SECTION LOCAL DEFAULT 2 3: 00000000004002e4 0 SECTION LOCAL DEFAULT 3 4: 0000000000400308 0 SECTION LOCAL DEFAULT 4 5: 0000000000400328 0 SECTION LOCAL DEFAULT 5 6: 00000000004003b8 0 SECTION LOCAL DEFAULT 6 7: 000000000040042e 0 SECTION LOCAL DEFAULT 7 8: 0000000000400440 0 SECTION LOCAL DEFAULT 8 9: 0000000000400480 0 SECTION LOCAL DEFAULT 9 10: 00000000004004b0 0 SECTION LOCAL DEFAULT 10 11: 0000000000401000 0 SECTION LOCAL DEFAULT 11 12: 0000000000401020 0 SECTION LOCAL DEFAULT 12 13: 0000000000401060 0 SECTION LOCAL DEFAULT 13 14: 0000000000401234 0 SECTION LOCAL DEFAULT 14 15: 0000000000402000 0 SECTION LOCAL DEFAULT 15 16: 0000000000402020 0 SECTION LOCAL DEFAULT 16 17: 0000000000402060 0 SECTION LOCAL DEFAULT 17 18: 0000000000403dc0 0 SECTION LOCAL DEFAULT 18 19: 0000000000403dc8 0 SECTION LOCAL DEFAULT 19 20: 0000000000403dd0 0 SECTION LOCAL DEFAULT 20 21: 0000000000403fc0 0 SECTION LOCAL DEFAULT 21 22: 0000000000404000 0 SECTION LOCAL DEFAULT 22 23: 0000000000404004 0 SECTION LOCAL DEFAULT 23 24: 0000000000000000 0 SECTION LOCAL DEFAULT 24 25: 0000000000000000 0 SECTION LOCAL DEFAULT 25 26: 0000000000000000 0 SECTION LOCAL DEFAULT 26 27: 0000000000000000 0 SECTION LOCAL DEFAULT 27 28: 0000000000000000 0 SECTION LOCAL DEFAULT 28 29: 0000000000000000 0 SECTION LOCAL DEFAULT 29 30: 0000000000000000 0 SECTION LOCAL DEFAULT 30 31: 0000000000000000 0 SECTION LOCAL DEFAULT 31 32: 0000000000000000 0 SECTION LOCAL DEFAULT 32 33: 0000000000000000 0 FILE LOCAL DEFAULT ABS init.c 34: 0000000000000000 0 FILE LOCAL DEFAULT ABS static-reloc.c 35: 0000000000000000 0 FILE LOCAL DEFAULT ABS hello.c 36: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 37: 00000000004010b0 0 FUNC LOCAL DEFAULT 13 deregister_tm_clones 38: 00000000004010e0 0 FUNC LOCAL DEFAULT 13 register_tm_clones 39: 0000000000401120 0 FUNC LOCAL DEFAULT 13 __do_global_dtors_aux 40: 0000000000404004 1 OBJECT LOCAL DEFAULT 23 completed.7991 41: 0000000000403dc8 0 OBJECT LOCAL DEFAULT 19 __do_global_dtors_aux_fini_array_entry 42: 0000000000401150 0 FUNC LOCAL DEFAULT 13 frame_dummy 43: 0000000000403dc0 0 OBJECT LOCAL DEFAULT 18 __frame_dummy_init_array_entry 44: 0000000000000000 0 FILE LOCAL DEFAULT ABS elf-init.c 45: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 46: 0000000000402164 0 OBJECT LOCAL DEFAULT 17 __FRAME_END__ 47: 0000000000000000 0 FILE LOCAL DEFAULT ABS 48: 0000000000403dc8 0 NOTYPE LOCAL DEFAULT 18 __init_array_end 49: 0000000000403dd0 0 OBJECT LOCAL DEFAULT 20 _DYNAMIC 50: 0000000000403dc0 0 NOTYPE LOCAL DEFAULT 18 __init_array_start 51: 0000000000402020 0 NOTYPE LOCAL DEFAULT 16 __GNU_EH_FRAME_HDR 52: 0000000000403fc0 0 OBJECT LOCAL DEFAULT 21 _GLOBAL_OFFSET_TABLE_ 53: 0000000000401230 1 FUNC GLOBAL DEFAULT 13 __libc_csu_fini 54: 0000000000404000 0 NOTYPE WEAK DEFAULT 22 data_start 55: 0000000000404004 0 NOTYPE GLOBAL DEFAULT 22 _edata 56: 0000000000401234 0 FUNC GLOBAL DEFAULT 14 _fini 57: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@@GLIBC_2.4 58: 0000000000000000 0 FUNC GLOBAL DEFAULT UND snprintf@@GLIBC_2.2.5 59: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_2.2.5 60: 0000000000404000 0 NOTYPE GLOBAL DEFAULT 22 __data_start 61: 0000000000000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 62: 0000000000402008 0 OBJECT GLOBAL HIDDEN 15 __dso_handle 63: 0000000000401160 104 FUNC GLOBAL DEFAULT 13 announcement 64: 0000000000402000 4 OBJECT GLOBAL DEFAULT 15 _IO_stdin_used 65: 00000000004011d0 93 FUNC GLOBAL DEFAULT 13 __libc_csu_init 66: 0000000000404008 0 NOTYPE GLOBAL DEFAULT 23 _end 67: 0000000000401080 43 FUNC GLOBAL DEFAULT 13 _start 68: 0000000000404004 0 NOTYPE GLOBAL DEFAULT 23 __bss_start 69: 0000000000401060 25 FUNC GLOBAL DEFAULT 13 main 70: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@@GLIBC_2.3.4 71: 0000000000404008 0 OBJECT GLOBAL HIDDEN 22 __TMC_END__ 72: 0000000000401000 0 FUNC GLOBAL DEFAULT 11 _init # Run twice to show off PIE, if available in kernel ../build-tree/includes-test-linked ../build-tree/includes-test-linked: ok (0x401160) ../build-tree/includes-test-linked ../build-tree/includes-test-linked: ok (0x401160) # Check state of hardening features via check script perl ../build-tree/hardening-check -p ../build-tree/includes-test-linked ../build-tree/includes-test-linked: Position Independent Executable: no, normal executable! (ignored) Stack protected: yes Fortify Source functions: yes (some protected functions found) Read-only relocations: yes Immediate binding: yes # Manually check state of hardening features # Skipped PIE test # 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.3.4 # Test Format (no-op currently) # Test for RELRO readelf -lW ../build-tree/includes-test-linked | grep GNU_RELRO GNU_RELRO 0x002dc0 0x0000000000403dc0 0x0000000000403dc0 0x000240 0x000240 R 0x1 # Test for BIND_NOW readelf -dW ../build-tree/includes-test-linked | grep BIND_NOW 0x0000000000000018 (BIND_NOW) # Build directly with -fPIC already defined cc -fPIC -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -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 (0x401160) # Build .o with -fPIC already defined cc -fPIC -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -Wl,-z,now -o ../build-tree/includes-test-fPIC.o -c hello.c # Link .o with -fPIC already defined cc -fPIC -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -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 (0x401160) # Make sure build fails due to -Werror=format-security ! cc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -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] return fprintf(stderr, argv[0]); ^~~~~~ cc1: some warnings being treated as errors # Make sure build succeeds with -Wno-format-security cc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wno-format-security -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 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -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 stack-protects a non-char array cc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -Wl,-z,now -o ../build-tree/includes-test-ssp-buffer-type-protect ssp-buffer-type-protect.c # Test Stack Protector nm ../build-tree/includes-test-ssp-buffer-type-protect | egrep '__stack_chk_fail($|@@GLIBC)' U __stack_chk_fail@@GLIBC_2.4 cc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -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. There is no dynamic section in this file. Relocation section '.rela.text' at offset 0x310 contains 6 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 000000000000000b 000000050000000a R_X86_64_32 0000000000000000 .rodata.str1.1 + 0 000000000000002b 0000000b00000004 R_X86_64_PLT32 0000000000000000 snprintf - 4 0000000000000035 0000000a0000000a R_X86_64_32 0000000000000000 announcement + 0 000000000000003a 000000050000000a R_X86_64_32 0000000000000000 .rodata.str1.1 + 3 0000000000000044 0000000c00000004 R_X86_64_PLT32 0000000000000000 __printf_chk - 4 0000000000000064 0000000d00000004 R_X86_64_PLT32 0000000000000000 __stack_chk_fail - 4 Relocation section '.rela.text.startup' at offset 0x3a0 contains 1 entry: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000000008 0000000a00000004 R_X86_64_PLT32 0000000000000000 announcement - 4 Relocation section '.rela.eh_frame' at offset 0x3b8 contains 2 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000000020 0000000200000002 R_X86_64_PC32 0000000000000000 .text + 0 000000000000003c 0000000600000002 R_X86_64_PC32 0000000000000000 .text.startup + 0 Symbol table '.symtab' contains 15 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000000 0 FILE LOCAL DEFAULT ABS hello.c 2: 0000000000000000 0 SECTION LOCAL DEFAULT 1 3: 0000000000000000 0 SECTION LOCAL DEFAULT 3 4: 0000000000000000 0 SECTION LOCAL DEFAULT 4 5: 0000000000000000 0 SECTION LOCAL DEFAULT 5 6: 0000000000000000 0 SECTION LOCAL DEFAULT 6 7: 0000000000000000 0 SECTION LOCAL DEFAULT 9 8: 0000000000000000 0 SECTION LOCAL DEFAULT 10 9: 0000000000000000 0 SECTION LOCAL DEFAULT 8 10: 0000000000000000 104 FUNC GLOBAL DEFAULT 1 announcement 11: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND snprintf 12: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __printf_chk 13: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __stack_chk_fail 14: 0000000000000000 25 FUNC GLOBAL DEFAULT 6 main perl ../build-tree/hardening-check -p ../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. There is no dynamic section in this file. Relocation section '.rela.text' at offset 0x310 contains 7 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000000033 000000050000000a R_X86_64_32 0000000000000000 .rodata + 0 0000000000000045 0000000a00000004 R_X86_64_PLT32 0000000000000000 snprintf - 4 0000000000000051 000000090000000a R_X86_64_32 0000000000000000 announcement + 0 0000000000000059 000000050000000a R_X86_64_32 0000000000000000 .rodata + 3 0000000000000063 0000000b00000004 R_X86_64_PLT32 0000000000000000 printf - 4 0000000000000077 0000000c00000004 R_X86_64_PLT32 0000000000000000 __stack_chk_fail - 4 0000000000000097 0000000900000004 R_X86_64_PLT32 0000000000000000 announcement - 4 Relocation section '.rela.eh_frame' at offset 0x3b8 contains 2 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000000020 0000000200000002 R_X86_64_PC32 0000000000000000 .text + 0 0000000000000040 0000000200000002 R_X86_64_PC32 0000000000000000 .text + 7d Symbol table '.symtab' contains 14 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000000 0 FILE LOCAL DEFAULT ABS hello.c 2: 0000000000000000 0 SECTION LOCAL DEFAULT 1 3: 0000000000000000 0 SECTION LOCAL DEFAULT 3 4: 0000000000000000 0 SECTION LOCAL DEFAULT 4 5: 0000000000000000 0 SECTION LOCAL DEFAULT 5 6: 0000000000000000 0 SECTION LOCAL DEFAULT 7 7: 0000000000000000 0 SECTION LOCAL DEFAULT 8 8: 0000000000000000 0 SECTION LOCAL DEFAULT 6 9: 0000000000000000 125 FUNC GLOBAL DEFAULT 1 announcement 10: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND snprintf 11: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND printf 12: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __stack_chk_fail 13: 000000000000007d 40 FUNC GLOBAL DEFAULT 1 main if perl ../build-tree/hardening-check -p ../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: yes Fortify Source functions: no, only unprotected functions found! Read-only relocations: no, non-ELF (ignored) Immediate binding: no, non-ELF (ignored) # Disable stack protector cc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -Wl,-z,now -fno-stack-protector -o ../build-tree/includes-disabled hello.c if perl ../build-tree/hardening-check -p ../build-tree/includes-disabled; then exit 1; fi ../build-tree/includes-disabled: Position Independent Executable: no, normal executable! (ignored) Stack protected: no, not found! Fortify Source functions: yes (some protected functions found) Read-only relocations: yes Immediate binding: yes # Disable fortify cc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -Wl,-z,now -U_FORTIFY_SOURCE -o ../build-tree/includes-disabled hello.c if perl ../build-tree/hardening-check -p ../build-tree/includes-disabled; then exit 1; fi ../build-tree/includes-disabled: Position Independent Executable: no, normal executable! (ignored) Stack protected: yes Fortify Source functions: no, only unprotected functions found! Read-only relocations: yes Immediate binding: yes # Disable relro cc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -Wl,-z,now -Wl,-z,norelro -o ../build-tree/includes-disabled hello.c if perl ../build-tree/hardening-check -p ../build-tree/includes-disabled; then exit 1; fi ../build-tree/includes-disabled: Position Independent Executable: no, normal executable! (ignored) Stack protected: yes Fortify Source functions: yes (some protected functions found) Read-only relocations: no, not found! Immediate binding: yes # Disable bindnow cc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -Wl,-z,now -Wl,-z,lazy -o ../build-tree/includes-disabled hello.c if perl ../build-tree/hardening-check -p ../build-tree/includes-disabled; then exit 1; fi ../build-tree/includes-disabled: Position Independent Executable: no, normal executable! (ignored) Stack protected: yes Fortify Source functions: yes (some protected functions found) Read-only relocations: yes Immediate binding: no, not found! # Disable everything cc \ -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 \ -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 -p ../build-tree/includes-disabled; then exit 1; fi ../build-tree/includes-disabled: Position Independent Executable: no, normal executable! (ignored) 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 0x401070 There are 10 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000040 0x0000000000400040 0x0000000000400040 0x000230 0x000230 R 0x8 INTERP 0x000270 0x0000000000400270 0x0000000000400270 0x00001c 0x00001c R 0x1 [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2] LOAD 0x000000 0x0000000000400000 0x0000000000400000 0x000438 0x000438 R 0x1000 LOAD 0x001000 0x0000000000401000 0x0000000000401000 0x0001fd 0x0001fd R E 0x1000 LOAD 0x002000 0x0000000000402000 0x0000000000402000 0x000160 0x000160 R 0x1000 LOAD 0x002160 0x0000000000403160 0x0000000000403160 0x00021c 0x000220 RW 0x1000 DYNAMIC 0x002170 0x0000000000403170 0x0000000000403170 0x0001d0 0x0001d0 RW 0x8 NOTE 0x00028c 0x000000000040028c 0x000000000040028c 0x000044 0x000044 R 0x4 GNU_EH_FRAME 0x002020 0x0000000000402020 0x0000000000402020 0x00003c 0x00003c R 0x4 GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW 0x10 Section to Segment mapping: Segment Sections... 00 01 .interp 02 .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rela.dyn .rela.plt 03 .init .plt .text .fini 04 .rodata .eh_frame_hdr .eh_frame 05 .init_array .fini_array .dynamic .got .got.plt .data .bss 06 .dynamic 07 .note.ABI-tag .note.gnu.build-id 08 .eh_frame_hdr 09 Dynamic section at offset 0x2170 contains 24 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x000000000000000c (INIT) 0x401000 0x000000000000000d (FINI) 0x4011f4 0x0000000000000019 (INIT_ARRAY) 0x403160 0x000000000000001b (INIT_ARRAYSZ) 8 (bytes) 0x000000000000001a (FINI_ARRAY) 0x403168 0x000000000000001c (FINI_ARRAYSZ) 8 (bytes) 0x000000006ffffef5 (GNU_HASH) 0x4002d0 0x0000000000000005 (STRTAB) 0x400368 0x0000000000000006 (SYMTAB) 0x4002f0 0x000000000000000a (STRSZ) 65 (bytes) 0x000000000000000b (SYMENT) 24 (bytes) 0x0000000000000015 (DEBUG) 0x0 0x0000000000000003 (PLTGOT) 0x403350 0x0000000000000002 (PLTRELSZ) 48 (bytes) 0x0000000000000014 (PLTREL) RELA 0x0000000000000017 (JMPREL) 0x400408 0x0000000000000007 (RELA) 0x4003d8 0x0000000000000008 (RELASZ) 48 (bytes) 0x0000000000000009 (RELAENT) 24 (bytes) 0x000000006ffffffe (VERNEED) 0x4003b8 0x000000006fffffff (VERNEEDNUM) 1 0x000000006ffffff0 (VERSYM) 0x4003aa 0x0000000000000000 (NULL) 0x0 make[2]: Leaving directory '/usr/src/RPM/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[1]: Leaving directory '/usr/src/RPM/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make: Leaving directory '/usr/src/RPM/BUILD/hardening-wrapper-2.6/hardening-wrapper' + exit 0 Processing files: hardening-check-2.6-alt1 Executing(%doc): /bin/sh -e /usr/src/tmp/rpm-tmp.76318 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd hardening-wrapper-2.6 + DOCDIR=/usr/src/tmp/hardening-wrapper-buildroot/usr/share/doc/hardening-check-2.6 + export DOCDIR + rm -rf /usr/src/tmp/hardening-wrapper-buildroot/usr/share/doc/hardening-check-2.6 + /bin/mkdir -p /usr/src/tmp/hardening-wrapper-buildroot/usr/share/doc/hardening-check-2.6 + cp -prL hardening-wrapper/TODO /usr/src/tmp/hardening-wrapper-buildroot/usr/share/doc/hardening-check-2.6 + chmod -R go-w /usr/src/tmp/hardening-wrapper-buildroot/usr/share/doc/hardening-check-2.6 + chmod -R a+rX /usr/src/tmp/hardening-wrapper-buildroot/usr/share/doc/hardening-check-2.6 + cp -prL hardening-wrapper/debian/README.Debian /usr/src/tmp/hardening-wrapper-buildroot/usr/share/doc/hardening-check-2.6 + chmod -R go-w /usr/src/tmp/hardening-wrapper-buildroot/usr/share/doc/hardening-check-2.6 + chmod -R a+rX /usr/src/tmp/hardening-wrapper-buildroot/usr/share/doc/hardening-check-2.6 + cp -prL hardening-wrapper/debian/changelog /usr/src/tmp/hardening-wrapper-buildroot/usr/share/doc/hardening-check-2.6 + chmod -R go-w /usr/src/tmp/hardening-wrapper-buildroot/usr/share/doc/hardening-check-2.6 + chmod -R a+rX /usr/src/tmp/hardening-wrapper-buildroot/usr/share/doc/hardening-check-2.6 + cp -prL hardening-wrapper/AUTHORS /usr/src/tmp/hardening-wrapper-buildroot/usr/share/doc/hardening-check-2.6 + chmod -R go-w /usr/src/tmp/hardening-wrapper-buildroot/usr/share/doc/hardening-check-2.6 + chmod -R a+rX /usr/src/tmp/hardening-wrapper-buildroot/usr/share/doc/hardening-check-2.6 + cp -prL hardening-wrapper/debian/copyright /usr/src/tmp/hardening-wrapper-buildroot/usr/share/doc/hardening-check-2.6 + chmod -R go-w /usr/src/tmp/hardening-wrapper-buildroot/usr/share/doc/hardening-check-2.6 + chmod -R a+rX /usr/src/tmp/hardening-wrapper-buildroot/usr/share/doc/hardening-check-2.6 + exit 0 Finding Provides (using /usr/lib/rpm/find-provides) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.89esqn find-provides: running scripts (debuginfo,lib,pam,perl,pkgconfig,python,shell) Finding Requires (using /usr/lib/rpm/find-requires) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.sUZH9I find-requires: running scripts (cpp,debuginfo,files,lib,pam,perl,pkgconfig,pkgconfiglib,python,rpmlib,shebang,shell,static,symlinks) /usr/src/tmp/hardening-wrapper-buildroot/usr/bin/hardening-check syntax OK Requires: binutils, /usr/bin/perl, perl(Getopt/Long.pm), perl(IPC/Open3.pm), perl(Pod/Usage.pm), perl(Symbol.pm), perl(Term/ANSIColor.pm) Wrote: /usr/src/RPM/RPMS/noarch/hardening-check-2.6-alt1.noarch.rpm 3.90user 0.81system 0:08.50elapsed 55%CPU (0avgtext+0avgdata 23700maxresident)k 0inputs+0outputs (0major+332242minor)pagefaults 0swaps 7.33user 2.94system 0:16.03elapsed 64%CPU (0avgtext+0avgdata 115568maxresident)k 0inputs+0outputs (0major+610817minor)pagefaults 0swaps