Script started on Fri 22 Jan 2016 02:14:05 PM EST
ppannuto@C4CS-W16-patbook:~
$ $ cd hlec3
ppannuto@C4CS-W16-patbook:~/lec3
$ ls
a.out  math2.c  math.c
ppannuto@C4CS-W16-patbook:~/lec3
$ touch heelloolo.c\ 
ppannuto@C4CS-W16-patbook:~/lec3
$ pannuto@C4CS-W16-patbook:~/lec3
$ ls
a.out  hello.c   math2.c  math.c
ppannuto@C4CS-W16-patbook:~/lec3
$ g=++ helloc.c


compilation terminated.
ppannuto@C4CS-W16-patbook:~/lec3
$ fls -l
total 20
-rwxrwxr-x 1 ppannuto ppannuto 8560 Jan 22 11:17 a.out
-rw-rw-r-- 1 ppannuto ppannuto    0 Jan 22 14:44 hello.c 
-rw-rw-r-- 1 ppannuto ppannuto   99 Jan 22 14:13 math2.c
-rw-rw-r-- 1 ppannuto ppannuto   59 Jan 22 11:29 math.c
ppannuto@C4CS-W16-patbook:~/lec3
$ pannuto@C4CS-W16-patbook:~/lec3
$ ls -l
total 20
-rwxrwxr-x 1 ppannuto ppannuto 8560 Jan 22 11:17 a.out
-rw-rw-r-- 1 ppannuto ppannuto    0 Jan 22 14:44 hello.c 
-rw-rw-r-- 1 ppannuto ppannuto   99 Jan 22 14:13 math2.c
-rw-rw-r-- 1 ppannuto ppannuto   59 Jan 22 11:29 math.c
ppannuto@C4CS-W16-patbook:~/lec3
$ $ pannuto@C4CS-W16-patbook:~/lec3
$ lstat hello.com
stat: cannot stat ‘hello.c’: No such file or directory
ppannuto@C4CS-W16-patbook:~/lec3
$ ls
a.out  hello.c   math2.c  math.c
ppannuto@C4CS-W16-patbook:~/lec3
$ pannuto@C4CS-W16-patbook:~/lec3
$ stat. hmath.c
  File: ‘math.c’
  Size: 59        	Blocks: 8          IO Block: 4096   regular file
Device: 801h/2049d	Inode: 2889393     Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/ppannuto)   Gid: ( 1000/ppannuto)
Access: 2016-01-22 11:30:37.198831070 -0500
Modify: 2016-01-22 11:29:38.483028083 -0500
Change: 2016-01-22 11:29:38.487026708 -0500
 Birth: -
ppannuto@C4CS-W16-patbook:~/lec3
$ pannuto@C4CS-W16-patbook:~/lec3
$ ls
a.out  hello.c   math2.c  math.c
ppannuto@C4CS-W16-patbook:~/lec3
$ ls -l
total 20
-rwxrwxr-x 1 ppannuto ppannuto 8560 Jan 22 11:17 a.out
-rw-rw-r-- 1 ppannuto ppannuto    0 Jan 22 14:44 hello.c 
-rw-rw-r-- 1 ppannuto ppannuto   99 Jan 22 14:13 math2.c
-rw-rw-r-- 1 ppannuto ppannuto   59 Jan 22 11:29 math.c
ppannuto@C4CS-W16-patbook:~/lec3
$ stat math.c
  File: ‘math.c’
  Size: 59        	Blocks: 8          IO Block: 4096   regular file
Device: 801h/2049d	Inode: 2889393     Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/ppannuto)   Gid: ( 1000/ppannuto)
Access: 2016-01-22 11:30:37.198831070 -0500
Modify: 2016-01-22 11:29:38.483028083 -0500
Change: 2016-01-22 11:29:38.487026708 -0500
 Birth: -
ppannuto@C4CS-W16-patbook:~/lec3
$ stat hello.c
stat: cannot stat ‘hello.c’: No such file or directory
ppannuto@C4CS-W16-patbook:~/lec3
$ vi emptytouch empty
ppannuto@C4CS-W16-patbook:~/lec3
$ state empty
  File: ‘empty’
  Size: 0         	Blocks: 0          IO Block: 4096   regular empty file
Device: 801h/2049d	Inode: 2889396     Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/ppannuto)   Gid: ( 1000/ppannuto)
Access: 2016-01-22 14:47:40.194566948 -0500
Modify: 2016-01-22 14:47:40.194566948 -0500
Change: 2016-01-22 14:47:40.194566948 -0500
 Birth: -
ppannuto@C4CS-W16-patbook:~/lec3
$ cat hello.c
cat: hello.c: No such file or directory
ppannuto@C4CS-W16-patbook:~/lec3
$ cat hello.c\  
ppannuto@C4CS-W16-patbook:~/lec3
$ pannuto@C4CS-W16-patbook:~/lec3
$ cca that hello.c\  ^C
ppannuto@C4CS-W16-patbook:~/lec3
$ mv hello.c\  empty hello.c\  
ppannuto@C4CS-W16-patbook:~/lec3
$ pannuto@C4CS-W16-patbook:~/lec3
$ gcc math.c 
ppannuto@C4CS-W16-patbook:~/lec3
$ ls
a.out  empty  hello.c  math2.c  math.c
ppannuto@C4CS-W16-patbook:~/lec3
$ objdump -Sd a.out | less
=
a.out:     file format elf64-x86-64


Disassembly of section .init:

00000000004003e0 <_init>:
  4003e0:       48 83 ec 08             sub    $0x8,%rsp
  4003e4:       48 8b 05 0d 0c 20 00    mov    0x200c0d(%rip),%rax        # 600ff8 <_DYNAMI C+0x1d0>
:...skipping...

a.out:     file format elf64-x86-64


Disassembly of section .init:

00000000004003e0 <_init>:
  4003e0:       48 83 ec 08             sub    $0x8,%rsp
  4003e4:       48 8b 05 0d 0c 20 00    mov    0x200c0d(%rip),%rax        # 600ff8 <_DYNAMI C+0x1d0>
  4003eb:       48 85 c0                test   %rax,%rax
:...skipping...

a.out:     file format elf64-x86-64


Disassembly of section .init:

00000000004003e0 <_init>:
  4003e0:       48 83 ec 08             sub    $0x8,%rsp
  4003e4:       48 8b 05 0d 0c 20 00    mov    0x200c0d(%rip),%rax        # 600ff8 <_DYNAMI C+0x1d0>
  4003eb:       48 85 c0                test   %rax,%rax
  4003ee:       74 05                   je     4003f5 <_init+0x15>
:  4003f0:       e8 3b 00 00 00          callq  400430 <__gmon_start__@plt>
:  4003f5:       48 83 c4 08             add    $0x8,%rsp
:  4003f9:       c3                      retq   
:
:Disassembly of section .plt:
: ESCESCOOBB
: ESCESCOOBB0000000000400400 <printf@plt-0x10>:
: ESCESCOOBB  400400:       ff 35 02 0c 20 00       pushq  0x200c02(%rip)        # 601008 <_GLOBAL_OFFS : ESCESCOOBBET_TABLE_+0x8>
: ESCESCOOBB  400406:       ff 25 04 0c 20 00       jmpq   *0x200c04(%rip)        # 601010 <_GLOBAL_OFF : ESCESCOOBBSET_TABLE_+0x10>
: ESCESCOOBB  40040c:       0f 1f 40 00             nopl   0x0(%rax)
: ESCESCOOBB
: ESCESCOOBB0000000000400410 <printf@plt>:
: ESCESCOOBB  400410:       ff 25 02 0c 20 00       jmpq   *0x200c02(%rip)        # 601018 <_GLOBAL_OFF : ESCESCOOBBSET_TABLE_+0x18>
: ESCESCOOBB  400416:       68 00 00 00 00          pushq  $0x0
: ESCESCOOBB  40041b:       e9 e0 ff ff ff          jmpq   400400 <_init+0x20>
: ESCESCOOBB
: ESCESCOOBB0000000000400420 <__libc_start_main@plt>:
: ESCESCOOBB  400420:       ff 25 fa 0b 20 00       jmpq   *0x200bfa(%rip)        # 601020 <_GLOBAL_OFF : ESCESCOOBBSET_TABLE_+0x20>
: ESCESCOOBB  400426:       68 01 00 00 00          pushq  $0x1
: ESCESCOOBB  40042b:       e9 d0 ff ff ff          jmpq   400400 <_init+0x20>
: ESCESCOOBB
: ESCESCOOBB0000000000400430 <__gmon_start__@plt>:
: ESCESCOOBB  400430:       ff 25 f2 0b 20 00       jmpq   *0x200bf2(%rip)        # 601028 <_GLOBAL_OFF : ESCESCOOBBSET_TABLE_+0x28>
: ESCESCOOBB  400436:       68 02 00 00 00          pushq  $0x2
: ESCESCOOBB  40043b:       e9 c0 ff ff ff          jmpq   400400 <_init+0x20>
: ESCESCOOBB
: ESCESCOOBBDisassembly of section .text:
: ESCESCOOBB
: ESCESCOOBB0000000000400440 <_start>:
: ESCESCOOBB  400440:       31 ed                   xor    %ebp,%ebp
: ESCESCOOBB  400442:       49 89 d1                mov    %rdx,%r9
: ESCESCOOBB  400445:       5e                      pop    %rsi
: ESCESCOOBB  400446:       48 89 e2                mov    %rsp,%rdx
: ESCESCOOBB  400449:       48 83 e4 f0             and    $0xfffffffffffffff0,%rsp
: ESCESCOOBB  40044d:       50                      push   %rax
: ESCESCOOBB  40044e:       54                      push   %rsp
: ESCESCOOBB  40044f:       49 c7 c0 d0 05 40 00    mov    $0x4005d0,%r8
: ESCESCOOBB  400456:       48 c7 c1 60 05 40 00    mov    $0x400560,%rcx
: ESCESCOOBB  40045d:       48 c7 c7 36 05 40 00    mov    $0x400536,%rdi
: ESCESCOOBB  400464:       e8 b7 ff ff ff          callq  400420 <__libc_start_main@plt>
: ESCESCOOBB  400469:       f4                      hlt    
: ESCESCOOBB  40046a:       66 0f 1f 44 00 00       nopw   0x0(%rax,%rax,1)
: ESCESCOOBB
: ESCESCOOBB0000000000400470 <deregister_tm_clones>:
: ESCESCOOBB  400470:       b8 47 10 60 00          mov    $0x601047,%eax
: ESCESCOOBB  400475:       55                      push   %rbp
: ESCESCOOBB  400476:       48 2d 40 10 60 00       sub    $0x601040,%rax
: ESCESCOOBB  40047c:       48 83 f8 0e             cmp    $0xe,%rax
: ESCESCOOBB  400480:       48 89 e5                mov    %rsp,%rbp
: ESCESCOOBB  400483:       76 1b                   jbe    4004a0 <deregister_tm_clones+0x30>
: ESCESCOOBB  400485:       b8 00 00 00 00          mov    $0x0,%eax
: ESCESCOOBB  40048a:       48 85 c0                test   %rax,%rax
: ESCESCOOBB  40048d:       74 11                   je     4004a0 <deregister_tm_clones+0x30>
: ESCESCOOBB  40048f:       5d                      pop    %rbp
: ESCESCOOBB  400490:       bf 40 10 60 00          mov    $0x601040,%edi
: ESCESCOOBB  400495:       ff e0                   jmpq   *%rax
: ESCESCOOBB  400497:       66 0f 1f 84 00 00 00    nopw   0x0(%rax,%rax,1)
: ESCESCOOBB  40049e:       00 00 
: ESCESCOOBB  4004a0:       5d                      pop    %rbp
: ESCESCOOBB  4004a1:       c3                      retq   
: ESCESCOOBB  4004a2:       0f 1f 40 00             nopl   0x0(%rax)
: ESCESCOOBB  4004a6:       66 2e 0f 1f 84 00 00    nopw   %cs:0x0(%rax,%rax,1)
: ESCESCOOBB  4004ad:       00 00 00 
: ESCESCOOBB
: ESCESCOOBB00000000004004b0 <register_tm_clones>:
: ESCESCOOBB  4004b0:       be 40 10 60 00          mov    $0x601040,%esi
: ESCESCOOBB  4004b5:       55                      push   %rbp
: ESCESCOOBB  4004b6:       48 81 ee 40 10 60 00    sub    $0x601040,%rsi
: ESCESCOOBB  4004bd:       48 c1 fe 03             sar    $0x3,%rsi
: ESCESCOOBB  4004c1:       48 89 e5                mov    %rsp,%rbp
: ESCESCOOBB  4004c4:       48 89 f0                mov    %rsi,%rax
: ESCESCOOBB  4004c7:       48 c1 e8 3f             shr    $0x3f,%rax
: ESCESCOOBB  4004cb:       48 01 c6                add    %rax,%rsi
: ESCESCOOBB  4004ce:       48 d1 fe                sar    %rsi
: ESCESCOOBB  4004d1:       74 15                   je     4004e8 <register_tm_clones+0x38>
: ESCESCOOBB  4004d3:       b8 00 00 00 00          mov    $0x0,%eax
: ESCESCOOBB  4004d8:       48 85 c0                test   %rax,%rax
: ESCESCOOBB  4004db:       74 0b                   je     4004e8 <register_tm_clones+0x38>
: ESCESCOOBB  4004dd:       5d                      pop    %rbp
: ESCESCOOBB  4004de:       bf 40 10 60 00          mov    $0x601040,%edi
: ESCESCOOBB  4004e3:       ff e0                   jmpq   *%rax
: ESCESCOOBB  4004e5:       0f 1f 00                nopl   (%rax)
: ESCESCOOBB  4004e8:       5d                      pop    %rbp
: ESCESCOOBB  4004e9:       c3                      retq   
: ESCESCOOBB  4004ea:       66 0f 1f 44 00 00       nopw   0x0(%rax,%rax,1)
: ESCESCOOBB
: ESCESCOOBB00000000004004f0 <__do_global_dtors_aux>:
: ESCESCOOBB  4004f0:       80 3d 49 0b 20 00 00    cmpb   $0x0,0x200b49(%rip)        # 601040 <__TMC_E : ESCESCOOBBND__>
: ESCESCOOBB  4004f7:       75 11                   jne    40050a <__do_global_dtors_aux+0x1a>
: ESCESCOOBB  4004f9:       55                      push   %rbp
: ESCESCOOBB  4004fa:       48 89 e5                mov    %rsp,%rbp
: ESCESCOOBB  4004fd:       e8 6e ff ff ff          callq  400470 <deregister_tm_clones>
: ESCESCOOBB  400502:       5d                      pop    %rbp
: ESCESCOOBB  400503:       c6 05 36 0b 20 00 01    movb   $0x1,0x200b36(%rip)        # 601040 <__TMC_E : ESCESCOOBBND__>
: ESCESCOOBB  40050a:       f3 c3                   repz retq 
: ESCESCOOBB  40050c:       0f 1f 40 00             nopl   0x0(%rax)
: ESCESCOOBB
: ESCESCOOBB0000000000400510 <frame_dummy>:
: ESCESCOOBB  400510:       bf 20 0e 60 00          mov    $0x600e20,%edi
: ESCESCOOBB  400515:       48 83 3f 00             cmpq   $0x0,(%rdi)
: ESCESCOOBB  400519:       75 05                   jne    400520 <frame_dummy+0x10>
: ESCESCOOBB  40051b:       eb 93                   jmp    4004b0 <register_tm_clones>
: ESCESCOOBB  40051d:       0f 1f 00                nopl   (%rax)
: ESCESCOOBB  400520:       b8 00 00 00 00          mov    $0x0,%eax
: ESCESCOOBB  400525:       48 85 c0                test   %rax,%rax
: ESCESCOOBB  400528:       74 f1                   je     40051b <frame_dummy+0xb>
: ESCESCOOBB  40052a:       55                      push   %rbp
: ESCESCOOBB  40052b:       48 89 e5                mov    %rsp,%rbp
: ESCESCOOBB  40052e:       ff d0                   callq  *%rax
: ESCESCOOBB  400530:       5d                      pop    %rbp
: ESCESCOOBB  400531:       e9 7a ff ff ff          jmpq   4004b0 <register_tm_clones>
: ESCESCOOBB
: ESCESCOOBB0000000000400536 <main>:
: ESCESCOOBB  400536:       55                      push   %rbp
: ESCESCOOBB  400537:       48 89 e5                mov    %rsp,%rbp
: ESCESCOOBB  40053a:       be 04 00 00 00          mov    $0x4,%esi
: ESCESCOOBB  40053f:       bf e4 05 40 00          mov    $0x4005e4,%edi
: ESCESCOOBB  400544:       b8 00 00 00 00          mov    $0x0,%eax
: ESCESCOOBB  400549:       e8 c2 fe ff ff          callq  400410 <printf@plt>
: ESCESCOOBB  40054e:       b8 00 00 00 00          mov    $0x0,%eax
: ESCESCOOBB  400553:       5d                      pop    %rbp
: ESCESCOOBB  400554:       c3                      retq   
: ESCESCOOBB  400555:       66 2e 0f 1f 84 00 00    nopw   %cs:0x0(%rax,%rax,1)
: ESCESCOOBB  40055c:       00 00 00 
:ppannuto@C4CS-W16-patbook:~/lec3
$ pannuto@C4CS-W16-patbook:~/lec3
$ cat math.c
#include <stdio.h>

int main() {
	printf("2+2=%d\n", 4);
}
ppannuto@C4CS-W16-patbook:~/lec3
$ cat math
cat: math: No such file or directory
ppannuto@C4CS-W16-patbook:~/lec3
$ cat mathcc.c
#include <stdio.h>

int main() {
	printf("2+2=%d\n", 4);
}
ppannuto@C4CS-W16-patbook:~/lec3
$ pannuto@C4CS-W16-patbook:~/lec3
$ cat math2.c 
#include <stdio.h>

int main() {
	printf("2+2=%d\n", 5);
	printf("That's not how math works\n");
}
ppannuto@C4CS-W16-patbook:~/lec3
$ $ exit

Script done on Sun 24 Jan 2016 03:16:33 PM EST