zoukankan      html  css  js  c++  java
  • gcc 汇编

    bss段总是在text段之前

    _start 标签定义起点 ,连接器-e 参数可以定义新的起点

    .global为外部程序提供入口点

    .ascii 声明一个ASCII文本字符串

    int $0x80  从linux内核访问控制台显示

    gdb

    info registers

    print/d $ebx 十进制的值

    print/t 二进制的值

    print/x 十六进制值

    x/nyz
    where nis the number of fields to display, yis the format of the output, and can be
    ❑ cfor character
    ❑ dfor decimal
    ❑ xfor hexadecimal
    and zis the size of the field to be displayed:
    ❑ bfor byte
    ❑ hfor 16-bit word (half-word)
    ❑ wfor 32-bit word

    .asciz 在定义的字符串末尾加空字符

    .lcomm

    .data 数据段定义

    .rodata  只读数据段定义

    .ascii Text string
    .asciz Null-terminated text string
    .byte Byte value
    .double Double-precision floating-point number
    .float Single-precision floating-point number
    .int 32-bit integer number
    .long 32-bit integer number (same as .int)
    .octa 16-byte integer number
    .quad 8-byte integer number
    .short 16-bit integer number
    .single Single-precision floating-point number (same as .float)

    定义static symbols

    .equ factor, 3
    .equ LINUX_SYS_CALL, 0x80

    movl $LINUX_SYS_CALL, %eax  使用定义的symbos

    bss section  不用定义类型

    .comm Declares a common memory area for data that is not initialized
    .lcomm Declares a local common memory area for data that is not initialized

  • 相关阅读:
    搜狗输入法赏析
    第二次冲刺个人总结05
    程序员的自我修养阅读笔记01
    第十五周学习总结
    mysql 查询优化
    mysql explain 详解
    nginx基本配置与参数说明
    input输入框实现联想关键词功能
    JS图片懒加载
    mysql中timestamp,datetime,int类型的区别与优劣
  • 原文地址:https://www.cnblogs.com/anjsxz/p/3933632.html
Copyright © 2011-2022 走看看