小编Nic*_*k_h的帖子

.text 段大于可执行文件中的 .text 段。为什么?

我在 NASM 中有以下“uppercaser.asm”汇编程序,它将用户输入的所有小写字母转换为大写:

section .bss
    Buff resb 1

section .data

section .text
        global _start

_start:
        nop            ; This no-op keeps the debugger happy

Read:   mov eax,3      ; Specify sys_read call
        mov ebx,0      ; Specify File Descriptor 0: Standard Input
        mov ecx,Buff   ; Pass offset of the buffer to read to
        mov edx,1      ; Tell sys_read to read one char from stdin
        int 80h        ; Call sys_read

        cmp eax,0       ; Look at sys_read's return value in EAX
        je Exit         ; Jump …
Run Code Online (Sandbox Code Playgroud)

linux x86 assembly elf

2
推荐指数
1
解决办法
466
查看次数

标签 统计

assembly ×1

elf ×1

linux ×1

x86 ×1