• 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) 指向的地址

  • 相关阅读:
    刷新
    自定义背景色
    会议通js
    Flex Layout Attribute
    spin.js
    jq size()与length的区别
    初识node.js
    [Swift]归并排序 | Merge sort
    [Swift]桶排序 | Bucket sort
    [Swift]计数排序 | Counting sort
  • 原文地址:https://www.cnblogs.com/mysqlinternal/p/15071387.html
Copyright © 2020-2023  润新知