• asm2


    .globl  全局对象

    .data 数据区

    .align 4 对齐 16字节对齐

    .type

    For ELF targets, the .type directive is used like this:

    .type name , type description
    

    This sets the type of symbol name to be either a function symbol or an object symbol. There are five different syntaxes supported for the type description field, in order to provide compatibility with various other assemblers.

    STT_FUNCfunction

    Mark the symbol as being a function name.

    STT_GNU_IFUNCgnu_indirect_function

    Mark the symbol as an indirect function when evaluated during reloc processing. (This is only supported on assemblers targeting GNU systems).

    STT_OBJECTobject

    Mark the symbol as being a data object.

    https://sourceware.org/binutils/docs/as/Type.html#index-ELF-symbol-type

     

    Here, the dot . means "current location".

    Then .-main would be the distance to the start of main. If placed at the end of main, it would also be the size of main.

    "-" means minus and this expression means "size of main" = "." (current address) minus "address of main

     movl    c(%rip), %eax    rip 相对寻指 x86 64

     

     https://www.ruanyifeng.com/blog/2010/06/ieee_floating-point_representation.html

    https://tooltt.com/floatconverter/

     leaq  获取地址 获取-12(%rbp) 指向的地址

  • 相关阅读:
    双链表
    单链表
    二叉树的遍历
    leetcode-9. 回文数
    leetcode-8. 字符串转换整数 (atoi)
    leetcode-7. 整数反转
    leetcode-6. Z 字形变换
    leetcode-5. 最长回文子串
    manacher-线性查找算法-(最长回文子串问题)
    bfprt-线性查找算法-(topK问题)
  • 原文地址:https://www.cnblogs.com/mysqlinternal/p/15071387.html
Copyright © 2020-2023  润新知