zoukankan      html  css  js  c++  java
  • GNU风格 ARM汇编语法3

    3、 GNU汇编程序中的分段
      <1>.section伪操作
        .section <section_name> {,”<flags>”}
        Starts a new code or data section. Sections in GNU are called .text, a code section, .data, an initialized data section, 
        and .bss, an uninitialized data section.
        These sections have default flags, and the linker understands 
        the default names(similar directive to the armasm directive AREA).
        The following are allowable .section flags for ELF format files:
        <Flag>     Meaning
        a          allowable section
        w          writable section
        x          executable section
     
    
        中文解释:
         用户可以通过.section伪操作来自定义一个段,格式如下:
        .section section_name [, "flags"[, %type[,flag_specific_arguments]]]
        每一个段以段名为开始, 以下一个段名或者文件结尾为结束。这些段都有缺省的标志(flags),连接器可以识别这些标志。
        (与arm asm中的AREA相同)。下面是ELF格式允许的段标志flags:
        <标志>     含义
        a          允许段
        w          可写段
        x          执行段
    
        例:定义一个“段”
        .section .mysection    @自定义数据段,段名为 “.mysection”
        .align  2
        strtemp:
          .ascii  "Temp string 
    " 
           @ 对这一句的理解,我觉得应该是:将"Temp string 
    "这个字符串存储在以标号strtemp:
           @为起始地址的一段内存空间里
      
    <2>汇编系统预定义的段名 .text @代码段 .data @初始化数据段 .data Read-write initialized long data. .bss @未初始化数据段 .sdata @ .sdata Read-write initialized short data. .sbss @     注意:源程序中.bss段应该在.text段之前。
  • 相关阅读:
    js-页面滚动
    js-document操作
    selenium-断言
    selenium-三类等待(强制等待、隐式等待、显示等待)
    selenium中的鼠标悬停操作
    selenium中的切换句柄及切换iframe操作
    selenium-网易云音乐登录的自动操作
    HTML/HTML5那些事
    开车新手笔记
    PHP函数辨析
  • 原文地址:https://www.cnblogs.com/liulipeng/p/3314911.html
Copyright © 2011-2022 走看看