assembly000-2019-04-03

vim exit.s

#       以#開(kāi)始的行為注釋行,匯編程序不會(huì)對(duì)注釋做任何處理
#       %eax保存系統(tǒng)調(diào)用號(hào)
#       %ebx保存返回狀態(tài)
.section .data           #.section為匯編指令或偽操作,由匯編程序處理,它將程序分為幾個(gè)部分
                         #.data指令是數(shù)據(jù)段的開(kāi)始欠痴,數(shù)據(jù)段中要列出程序所需的所有內(nèi)存存儲(chǔ)空間
.section .text           #.text是程序文本段的開(kāi)始谈火,即存放程序指令的部分
.globl _start            #.globl表示匯編程序不應(yīng)在匯編之后廢棄此符號(hào),因?yàn)殒溄悠饕玫剿?                         #_start 很重要妻献,_start 是一個(gè)符號(hào),這就說(shuō)在它將在匯編和鏈接過(guò)程中被其它內(nèi)容替換掉
                         #符合一般用來(lái)標(biāo)記程序或數(shù)據(jù)的內(nèi)存位置
                         #_start 是一個(gè)特殊符號(hào)团赁,標(biāo)記了程序的開(kāi)始位置
_start:
                         #_start:定義一個(gè)標(biāo)簽育拨,標(biāo)簽是一個(gè)符合,后面跟一個(gè)冒號(hào)欢摄,定義一個(gè)符合的值
movl $1, %eax #這是用于退出程序的Linux內(nèi)核系統(tǒng)調(diào)用號(hào)
movl $0, %ebx #這是程序?qū)⒎祷亟oos的狀態(tài)碼
                #改變這個(gè)數(shù)字熬丧,則返回到echo $?的值不同
int $0x80    #這將喚醒內(nèi)核,以運(yùn)行退出命令

運(yùn)行匯編程序,exit.o稱為目標(biāo)文件怀挠,每個(gè)源文件轉(zhuǎn)換為一個(gè)目標(biāo)文件析蝴。
as exit.s -o exit.o

有一類稱為反匯編器(disassembler)的程序,將根據(jù)機(jī)器代碼產(chǎn)生匯編代碼绿淋,Linux中帶-d命令的objdump(object dump)可以充當(dāng)這個(gè)角色闷畸。

Usage: objdump <option(s)> <file(s)>
 Display information from object <file(s)>.
 At least one of the following switches must be given:
  -a, --archive-headers    Display archive header information
  -f, --file-headers       Display the contents of the overall file header
  -p, --private-headers    Display object format specific file header contents
  -P, --private=OPT,OPT... Display object format specific contents
  -h, --[section-]headers  Display the contents of the section headers
  -x, --all-headers        Display the contents of all headers
  -d, --disassemble        Display assembler contents of executable sections
  -D, --disassemble-all    Display assembler contents of all sections
  -S, --source             Intermix source code with disassembly
  -s, --full-contents      Display the full contents of all sections requested
  -g, --debugging          Display debug information in object file
  -e, --debugging-tags     Display debug information using ctags style
  -G, --stabs              Display (in raw form) any STABS info in the file
  -W[lLiaprmfFsoRt] or
  --dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,
          =frames-interp,=str,=loc,=Ranges,=pubtypes,
          =gdb_index,=trace_info,=trace_abbrev,=trace_aranges,
          =addr,=cu_index]
                           Display DWARF info in the file
  -t, --syms               Display the contents of the symbol table(s)
  -T, --dynamic-syms       Display the contents of the dynamic symbol table
  -r, --reloc              Display the relocation entries in the file
  -R, --dynamic-reloc      Display the dynamic relocation entries in the file
  @<file>                  Read options from <file>
  -v, --version            Display this program's version number
  -i, --info               List object formats and architectures supported
  -H, --help               Display this information

 The following switches are optional:
  -b, --target=BFDNAME           Specify the target object format as BFDNAME
  -m, --architecture=MACHINE     Specify the target architecture as MACHINE
  -j, --section=NAME             Only display information for section NAME
  -M, --disassembler-options=OPT Pass text OPT on to the disassembler
  -EB --endian=big               Assume big endian format when disassembling
  -EL --endian=little            Assume little endian format when disassembling
      --file-start-context       Include context from start of file (with -S)
  -I, --include=DIR              Add DIR to search list for source files
  -l, --line-numbers             Include line numbers and filenames in output
  -F, --file-offsets             Include file offsets when displaying information
  -C, --demangle[=STYLE]         Decode mangled/processed symbol names
                                  The STYLE, if specified, can be `auto', `gnu',
                                  `lucid', `arm', `hp', `edg', `gnu-v3', `java'
                                  or `gnat'
  -w, --wide                     Format output for more than 80 columns
  -z, --disassemble-zeroes       Do not skip blocks of zeroes when disassembling
      --start-address=ADDR       Only process data whose address is >= ADDR
      --stop-address=ADDR        Only process data whose address is <= ADDR
      --prefix-addresses         Print complete address alongside disassembly
      --[no-]show-raw-insn       Display hex alongside symbolic disassembly
      --insn-width=WIDTH         Display WIDTH bytes on a single line for -d
      --adjust-vma=OFFSET        Add OFFSET to all displayed section addresses
      --special-syms             Include special symbols in symbol dumps
      --prefix=PREFIX            Add PREFIX to absolute paths for -S
      --prefix-strip=LEVEL       Strip initial directory names for -S
      --dwarf-depth=N        Do not display DIEs at depth N or greater
      --dwarf-start=N        Display DIEs starting with N, at the same depth
                             or deeper
      --dwarf-check          Make additional dwarf internal consistency checks.      

objdump: supported targets: elf64-x86-64 elf32-i386 elf32-iamcu elf32-x86-64 a.out-i386-linux pei-i386 pei-x86-64 elf64-l1om elf64-k1om elf64-little elf64-big elf32-little elf32-big pe-x86-64 pe-bigobj-x86-64 pe-i386 plugin srec symbolsrec verilog tekhex binary ihex
objdump: supported architectures: i386 i386:x86-64 i386:x64-32 i8086 i386:intel i386:x86-64:intel i386:x64-32:intel i386:nacl i386:x86-64:nacl i386:x64-32:nacl iamcu iamcu:intel l1om l1om:intel k1om k1om:intel plugin

The following i386/x86-64 specific disassembler options are supported for use
with the -M switch (multiple options should be separated by commas):
  x86-64      Disassemble in 64bit mode
  i386        Disassemble in 32bit mode
  i8086       Disassemble in 16bit mode
  att         Display instruction in AT&T syntax
  intel       Display instruction in Intel syntax
  att-mnemonic
              Display instruction in AT&T mnemonic
  intel-mnemonic
              Display instruction in Intel mnemonic
  addr64      Assume 64bit address size
  addr32      Assume 32bit address size
  addr16      Assume 16bit address size
  data32      Assume 32bit data size
  data16      Assume 16bit data size
  suffix      Always display instruction suffix in AT&T syntax
  amd64       Display instruction in AMD64 ISA
  intel64     Display instruction in Intel64 ISA

objdump -d exit.o

exit.o:     file format elf64-x86-64
Disassembly of section .text:

0000000000000000 <_start>:
   0:   b8 01 00 00 00          mov    $0x1,%eax
   5:   bb 00 00 00 00          mov    $0x0,%ebx
   a:   cd 80                   int    $0x80

接下來(lái),使用鏈接器將多個(gè)目標(biāo)文件合二為一吞滞,并添加必要的信息佑菩,使內(nèi)核能夠加載和運(yùn)行該程序。
ld exit.o -o exit
ll

-rwxrwxr-x  1 sun sun  664 4月   3 22:28 exit*
-rw-rw-r--  1 sun sun  704 4月   3 22:24 exit.o
-rw-rw-r--  1 sun sun  143 4月   3 22:23 exit.s

最后裁赠,運(yùn)行exit殿漠,
./exit

sun@sun-virtual-machine:~/assembly0x$ ./exit
sun@sun-virtual-machine:~/assembly0x$ echo $?
0

gcc的使用和編譯過(guò)程

gcc (GNU C Compiler -> GNU Compiler Collection)

gcc -v

root@vultr:~/clang# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.11' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.11) 
root@vultr:~/clang# 

gcc -o 輸出文件名 輸入文件名

root@vultr:~/clang# vi 001.c 
root@vultr:~/clang# gcc -o 001 001.c
root@vultr:~/clang# ls
001  001.c
root@vultr:~/clang# ./001
Hello World!
root@vultr:~/clang# 
#include<stdio.h>
int main(){
        printf("Hello World!\n");
        return 0;
}

gcc -v -o 輸出文件名 輸入文件名

root@vultr:~/clang# gcc -v -o 001 001.c 
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.11' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.11) 
COLLECT_GCC_OPTIONS='-v' '-o' '001' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/5/cc1 -quiet -v -imultiarch x86_64-linux-gnu 001.c -quiet -dumpbase 001.c -mtune=generic -march=x86-64 -auxbase 001 -version -fstack-protector-strong -Wformat -Wformat-security -o /tmp/ccRDp47M.s
GNU C11 (Ubuntu 5.4.0-6ubuntu1~16.04.11) version 5.4.0 20160609 (x86_64-linux-gnu)
    compiled by GNU C version 5.4.0 20160609, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=97 --param ggc-min-heapsize=126976
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/5/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-linux-gnu/5/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
GNU C11 (Ubuntu 5.4.0-6ubuntu1~16.04.11) version 5.4.0 20160609 (x86_64-linux-gnu)
    compiled by GNU C version 5.4.0 20160609, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=97 --param ggc-min-heapsize=126976
Compiler executable checksum: 5f69ca549f086e2c3748f9d1423a4dee
COLLECT_GCC_OPTIONS='-v' '-o' '001' '-mtune=generic' '-march=x86-64'
 as -v --64 -o /tmp/ccNWBljL.o /tmp/ccRDp47M.s
GNU assembler version 2.26.1 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.26.1
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-o' '001' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/cczNUkwJ.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 --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o 001 /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. /tmp/ccNWBljL.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o
root@vultr:~/clang# 
gcc編譯過(guò)程
  • 預(yù)處理
    cpp -o xxx.i xxx.c (cpp,生成預(yù)處理文件的命令)
    等價(jià)于 gcc -E
    主要是:替換组贺,處理那些源代碼文件中以#開(kāi)頭的預(yù)編譯指令凸舵,比如#define#include。處理所有條件編譯指令#if失尖、#elif啊奄、#else、#ifdef掀潮、#ifndef菇夸、#endif
    所以defineinclude到了編譯階段就沒(méi)有了,因此也不是關(guān)鍵字
  • 編譯
    /usr/lib/gcc/x86_64-linux-gnu/5/cc1(cc1包含了預(yù)處理和編譯)
    /usr/lib/gcc/x86_64-linux-gnu/5/cc1 001.c -o /tmp/ccRDp47M.s
    上述命令等價(jià)于 gcc -S output input
  • 匯編
    as -v --64 -o /tmp/ccNWBljL.o /tmp/ccRDp47M.s
    編譯到此步驟的命令 gcc -c
  • 鏈接
    /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -o 001 /tmp/ccNWBljL.o+....
    編譯到此步驟的命令 gcc -o

例證:

1仪吧、生成匯編代碼

root@vultr:~/clang# ls
001.c
root@vultr:~/clang# gcc -S -o 001.s 001.c 
root@vultr:~/clang# ll
total 16
drwxr-xr-x 2 root root 4096 Apr 18 10:09 ./
drwx------ 5 root root 4096 Apr 18 09:19 ../
-rw-r--r-- 1 root root   70 Apr 18 09:12 001.c
-rw-r--r-- 1 root root  455 Apr 18 10:09 001.s
root@vultr:~/clang# vi 001.s
        .file   "001.c"
        .section        .rodata
.LC0:
        .string "Hello World!"
        .text
        .globl  main
        .type   main, @function
main:
.LFB0:
        .cfi_startproc
        pushq   %rbp
        .cfi_def_cfa_offset 16
        .cfi_offset 6, -16 
        movq    %rsp, %rbp
        .cfi_def_cfa_register 6
        movl    $.LC0, %edi
        call    puts
        movl    $0, %eax
        popq    %rbp
        .cfi_def_cfa 7, 8
        ret 
        .cfi_endproc
.LFE0:
        .size   main, .-main
        .ident  "GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609"
        .section        .note.GNU-stack,"",@progbits

2庄新、生成目標(biāo)文件

root@vultr:~/clang# ls 
001.c  001.s
root@vultr:~/clang# gcc -c -o 001.o 001.s
root@vultr:~/clang# ll
total 20
drwxr-xr-x 2 root root 4096 Apr 18 10:21 ./
drwx------ 5 root root 4096 Apr 18 10:15 ../
-rw-r--r-- 1 root root   70 Apr 18 09:12 001.c
-rw-r--r-- 1 root root 1504 Apr 18 10:21 001.o
-rw-r--r-- 1 root root  455 Apr 18 10:09 001.s
root@vultr:~/clang# vi 001.o

目標(biāo)文件,一堆亂碼!

root@vultr:~/clang# rm 001.o
root@vultr:~/clang# ls
001.c  001.s
root@vultr:~/clang# gcc -c -o 001.o 001.c
root@vultr:~/clang# ls
001.c  001.o  001.s
root@vultr:~/clang# ll
total 20
drwxr-xr-x 2 root root 4096 Apr 18 10:23 ./
drwx------ 5 root root 4096 Apr 18 10:22 ../
-rw-r--r-- 1 root root   70 Apr 18 09:12 001.c
-rw-r--r-- 1 root root 1504 Apr 18 10:23 001.o
-rw-r--r-- 1 root root  455 Apr 18 10:09 001.s
root@vultr:~/clang# 

下面來(lái)下反編譯:

root@vultr:~/clang# ls
001.c  001.o  001.s
root@vultr:~/clang# objdump -d 001.o

001.o:     file format elf64-x86-64


Disassembly of section .text:

0000000000000000 <main>:
   0:   55                      push   %rbp
   1:   48 89 e5                mov    %rsp,%rbp
   4:   bf 00 00 00 00          mov    $0x0,%edi
   9:   e8 00 00 00 00          callq  e <main+0xe>
   e:   b8 00 00 00 00          mov    $0x0,%eax
  13:   5d                      pop    %rbp
  14:   c3                      retq   
root@vultr:~/clang# 

3择诈、再看下.O目標(biāo)文件鏈接生成可執(zhí)行文件

root@vultr:~/clang# ls
001.c  001.o  001.s
root@vultr:~/clang# gcc -o 001 001.o
root@vultr:~/clang# ls
001  001.c  001.o  001.s
root@vultr:~/clang# ./001
Hello World!
root@vultr:~/clang# 

4械蹋、關(guān)于預(yù)處理命令的例證

#include<stdio.h>
#define NUM 10
int main(){
        int a=NUM;
        printf("Hello World!\n");
        return 0;
}
root@vultr:~/clang# vim 001.c
root@vultr:~/clang# gcc -E -o 001.i 001.c 
root@vultr:~/clang# ll
total 32
drwxr-xr-x 2 root root  4096 Apr 18 10:49 ./
drwx------ 5 root root  4096 Apr 18 10:49 ../
-rw-r--r-- 1 root root    97 Apr 18 10:48 001.c
-rw-r--r-- 1 root root 17105 Apr 18 10:49 001.i
root@vultr:~/clang# vim 001.i
# 1 "001.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "<command-line>" 2
# 1 "001.c"
# 1 "/usr/include/stdio.h" 1 3 4
# 27 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/features.h" 1 3 4
# 367 "/usr/include/features.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 1 3 4
# 410 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
# 411 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4
# 368 "/usr/include/features.h" 2 3 4
# 391 "/usr/include/features.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 1 3 4
# 10 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/gnu/stubs-64.h" 1 3 4
# 11 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 2 3 4
# 392 "/usr/include/features.h" 2 3 4
# 28 "/usr/include/stdio.h" 2 3 4



# 1 "/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h" 1 3 4
# 216 "/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h" 3 4

# 216 "/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h" 3 4
typedef long unsigned int size_t;
# 34 "/usr/include/stdio.h" 2 3 4

# 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4
# 27 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
# 28 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4


typedef unsigned char __u_char;
typedef unsigned short int __u_short;
typedef unsigned int __u_int;
typedef unsigned long int __u_long;



typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;

typedef signed long int __int64_t;
typedef unsigned long int __uint64_t;


typedef long int __quad_t;
typedef unsigned long int __u_quad_t;
# 121 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4
# 1 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 1 3 4
# 122 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4


typedef unsigned long int __dev_t;
typedef unsigned int __uid_t;
typedef unsigned int __gid_t;
typedef unsigned long int __ino_t;
typedef unsigned long int __ino64_t;
typedef unsigned int __mode_t;
typedef unsigned long int __nlink_t;
typedef long int __off_t;
typedef long int __off64_t;
typedef int __pid_t;
typedef struct { int __val[2]; } __fsid_t;
typedef long int __clock_t;
typedef unsigned long int __rlim_t;
typedef unsigned long int __rlim64_t;
typedef unsigned int __id_t;

#中間省略

# 942 "/usr/include/stdio.h" 3 4

# 2 "001.c" 2


# 3 "001.c"
int main(){
 int a=10;
 printf("Hello World!\n");
 return 0;
}

[END]

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市羞芍,隨后出現(xiàn)的幾起案子哗戈,更是在濱河造成了極大的恐慌,老刑警劉巖荷科,帶你破解...
    沈念sama閱讀 206,968評(píng)論 6 482
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件唯咬,死亡現(xiàn)場(chǎng)離奇詭異,居然都是意外死亡畏浆,警方通過(guò)查閱死者的電腦和手機(jī)胆胰,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 88,601評(píng)論 2 382
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái)刻获,“玉大人蜀涨,你說(shuō)我怎么就攤上這事⌒保” “怎么了勉盅?”我有些...
    開(kāi)封第一講書(shū)人閱讀 153,220評(píng)論 0 344
  • 文/不壞的土叔 我叫張陵,是天一觀的道長(zhǎng)顶掉。 經(jīng)常有香客問(wèn)我,道長(zhǎng)挑胸,這世上最難降的妖魔是什么痒筒? 我笑而不...
    開(kāi)封第一講書(shū)人閱讀 55,416評(píng)論 1 279
  • 正文 為了忘掉前任,我火速辦了婚禮茬贵,結(jié)果婚禮上簿透,老公的妹妹穿的比我還像新娘。我一直安慰自己解藻,他們只是感情好老充,可當(dāng)我...
    茶點(diǎn)故事閱讀 64,425評(píng)論 5 374
  • 文/花漫 我一把揭開(kāi)白布。 她就那樣靜靜地躺著螟左,像睡著了一般啡浊。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上胶背,一...
    開(kāi)封第一講書(shū)人閱讀 49,144評(píng)論 1 285
  • 那天巷嚣,我揣著相機(jī)與錄音,去河邊找鬼钳吟。 笑死廷粒,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播坝茎,決...
    沈念sama閱讀 38,432評(píng)論 3 401
  • 文/蒼蘭香墨 我猛地睜開(kāi)眼涤姊,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼!你這毒婦竟也來(lái)了嗤放?” 一聲冷哼從身側(cè)響起思喊,我...
    開(kāi)封第一講書(shū)人閱讀 37,088評(píng)論 0 261
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤,失蹤者是張志新(化名)和其女友劉穎斤吐,沒(méi)想到半個(gè)月后搔涝,有當(dāng)?shù)厝嗽跇?shù)林里發(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 43,586評(píng)論 1 300
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡和措,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 36,028評(píng)論 2 325
  • 正文 我和宋清朗相戀三年庄呈,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片派阱。...
    茶點(diǎn)故事閱讀 38,137評(píng)論 1 334
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡诬留,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出贫母,到底是詐尸還是另有隱情文兑,我是刑警寧澤,帶...
    沈念sama閱讀 33,783評(píng)論 4 324
  • 正文 年R本政府宣布腺劣,位于F島的核電站绿贞,受9級(jí)特大地震影響,放射性物質(zhì)發(fā)生泄漏橘原。R本人自食惡果不足惜籍铁,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 39,343評(píng)論 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望趾断。 院中可真熱鬧拒名,春花似錦、人聲如沸芋酌。這莊子的主人今日做“春日...
    開(kāi)封第一講書(shū)人閱讀 30,333評(píng)論 0 19
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)脐帝。三九已至同云,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間腮恩,已是汗流浹背梢杭。 一陣腳步聲響...
    開(kāi)封第一講書(shū)人閱讀 31,559評(píng)論 1 262
  • 我被黑心中介騙來(lái)泰國(guó)打工, 沒(méi)想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留秸滴,地道東北人武契。 一個(gè)月前我還...
    沈念sama閱讀 45,595評(píng)論 2 355
  • 正文 我出身青樓,卻偏偏與公主長(zhǎng)得像,于是被迫代替她去往敵國(guó)和親咒唆。 傳聞我的和親對(duì)象是個(gè)殘疾皇子届垫,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 42,901評(píng)論 2 345

推薦閱讀更多精彩內(nèi)容

  • 一、溫故而知新 1. 內(nèi)存不夠怎么辦 內(nèi)存簡(jiǎn)單分配策略的問(wèn)題地址空間不隔離內(nèi)存使用效率低程序運(yùn)行的地址不確定 關(guān)于...
    SeanCST閱讀 7,779評(píng)論 0 27
  • 一全释、Python簡(jiǎn)介和環(huán)境搭建以及pip的安裝 4課時(shí)實(shí)驗(yàn)課主要內(nèi)容 【Python簡(jiǎn)介】: Python 是一個(gè)...
    _小老虎_閱讀 5,723評(píng)論 0 10
  • 對(duì)業(yè)務(wù)工作來(lái)說(shuō)装处,如何能拿到更多的訂單,更高的成功率? 如何爭(zhēng)取更多的客戶浸船?無(wú)疑使每個(gè)業(yè)務(wù)員最關(guān)心的問(wèn)題妄迁。即使客戶工...
    東山茶客閱讀 2,418評(píng)論 0 0
  • 早上好!#幸福實(shí)修#~每天進(jìn)步1%#幸福實(shí)修10班-夏惠芳--富陽(yáng)# 201708011(04/30) 【幸福三朵...
    夏惠芳閱讀 126評(píng)論 1 1
  • 首先黔州,你一定要找到自己的目標(biāo),找到你的人生方向阔籽,找到你自己的興趣點(diǎn)流妻,找到這些東西,你要給自己一個(gè)期望值笆制,不能太高也...
    貝貝丟了殼閱讀 6,515評(píng)論 0 1