0

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!

lllllllllllll
  • 8,519
  • 9
  • 45
  • 80

1 Answers1

1

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!

Gunner
  • 5,780
  • 2
  • 25
  • 40
  • Hi Gunner, Thank you for your answer... But I can not find getopt* in the [manual](http://www.nasm.us/xdoc/2.11/nasmdoc.pdf), which made me confused... – lllllllllllll Feb 04 '14 at 03:42