2012年3月24日星期六

UGG Boots[Disclaimer: copyright

[Disclaimer: copyright,Louboutin Shoes, welcome to reprint, please do not used for commercial purposes.Contact address: feixiaoxing @ 163.com CPU] x86 is the same, but may use different forms of assembly language to express.
On top of the window we use more intel& # 26684; type of assembly language, while in the Linux system used on more often # AT& T& 26684; type of assembly language.What is the AT& T& # 26684; type of assembly code?We can write a have a try.
Datamessage: string " Hello! n" length =. - message.text.global _ start_start: movl $length,UGGs Clearance, $%ecxmovl $1%edxmovl message,%ebxmovl%eaxint,UGG Boots, $4, $0x80movl $0,%ebxmovl%eaxint $0x80 $1, this is a simple compilation of documents, we can be divided into two steps compiler.
First, the input of as - gstabs - O hello.o hello.s, LD o hellohello.o can then enter.In order to verify executable file is correct, can enter. / Hello check.In the as command, because we use the - gstabs option, in the Hello executable file is to include debugging information.
So, if you want to step through a friend can enter the GDB Hello debugging.Then, the Hello executable file compiled code is what kind of?We can enter objdump - S - D Hello check.08048074 < start>: text.
global; _; _ start_start: movl $length,%edx 8048074: BA 08000000 mov $0x8,UGG Boots, $message%edx movl,%ecx 8048079: B9 9C 900408 mov $0x804909c, $1%ecx movl,%ebx 804807e: BB 01000000 mov $0x1 $4,%ebx movl,Vibram Five Fingers,%eax
8048083: B8 04000000 mov $0x4, $%eax int 0x80 8048088: CD 80 int $0x80 movl $0,%ebx 804808a: BB 00000000 mov $0x0, $1%ebx movl,%eax 804808f: B8 01000000 mov $0x1, $%eax int 0x80 8048094: CD 80 int $0x80
Related articles:

没有评论:

发表评论