【问题标题】:How do you define a struct in at&t assembly syntax如何在 at&t 汇编语法中定义结构
【发布时间】:2017-02-11 05:29:07
【问题描述】:

at&t 语法中 this 的等价物是什么?我似乎无法通过谷歌找到任何东西。

struc node
        info: resd  1
        next: resd  1
 endstruc

【问题讨论】:

    标签: assembly att


    【解决方案1】:

    GNU 汇编器不支持任何类似的东西。你可以做的最接近的事情是:

    .set note_info, 0
    .set note_next, 4
    .set note_size, 8
    

    您可以在如下语句中使用这些符号:

    head:
        .space note_size
    
        movl $0, head + note_info
        mov  head + note_next, %esi
        mov  note_next(%esi), %esi
    

    【讨论】:

    猜你喜欢
    • 2021-11-25
    • 1970-01-01
    • 2011-03-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-09-20
    • 2018-03-22
    相关资源
    最近更新 更多