Re: Injecting user defined opcode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As I looked to the assembly code generated by -S, I see

        .file   "test.c"
        .intel_syntax noprefix
        .text
        .globl  main
        .type   main, @function
main:
.LFB0:
        .cfi_startproc
        push    rbp
        .cfi_def_cfa_offset 16
        .cfi_offset 6, -16
        mov     rbp, rsp
        .cfi_def_cfa_register 6
#APP
# 3 "test.c" 1
        .byte 0x00
# 0 "" 2
#NO_APP
        pop     rbp
        .cfi_def_cfa 7, 8
        ret
        .cfi_endproc
.LFE0:
        .size   main, .-main
        .ident  "GCC: (GNU) 4.8.5 20150623 (Red Hat 4.8.5-16)"
        .section        .note.GNU-stack,"",@progbits



It seems that in the machine code generation, gcc combines 00 with the next instruction.
Any thought?


Regards,
Mahmood







[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux