Pregunta

Test platform is 32 bit Linux.

I use IDA Pro to disassembly the basename elf binary from coreutils.

In the data section I find this:

long_options    option <offset aHelp, 0, 0, 68h>

Could any one give some help on how to translate this into reassemble code?

Be more specific, nasm syntax reassemble code?

Thank you!

¿Fue útil?

Solución

What have you tried??? I am in a giving mood, this should get you started:

equates:

NULL                equ 0
no_argument         equ 0
required_argument   equ 1
optional_argument   equ 2

In the .data section:

long_options        dd  aHelp, no_argument, NULL, 68H, \
                        NULL, NULL, NULL, NULL

getopt* is documented, so is NASM. RTFM!

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top