Comments (2)
It is in the rodata.str
objdump -s -d guest64.o
guest64.o: file format elf64-x86-64
Contents of section .rodata.str1.1:
0000 48656c6c 6f2c2077 6f726c64 210a00 Hello, world!..
Contents of section .start:
0000 f30f1efa ba000000 00b84800 00006690 ..........H...f.
0010 e6e90fb6 42014883 c20184c0 75f248c7 ....B.H.....u.H.
0020 04250004 00002a00 0000b82a 00000090 .%....*....*....
0030 f4ebfd ...
Contents of section .comment:
0000 00474343 3a202855 62756e74 75203131 .GCC: (Ubuntu 11
0010 2e332e30 2d317562 756e7475 317e3232 .3.0-1ubuntu1~22
0020 2e30342e 31292031 312e332e 3000 .04.1) 11.3.0.
Contents of section .note.gnu.property:
0000 04000000 10000000 05000000 474e5500 ............GNU.
0010 020000c0 04000000 03000000 00000000 ................
Contents of section .eh_frame:
0000 14000000 00000000 017a5200 01781001 .........zR..x..
0010 1b0c0708 90010000 14000000 1c000000 ................
0020 00000000 33000000 00000000 00000000 ....3...........
Disassembly of section .start:
0000000000000000 <_start>:
0: f3 0f 1e fa endbr64
4: ba 00 00 00 00 mov $0x0,%edx
9: b8 48 00 00 00 mov $0x48,%eax
e: 66 90 xchg %ax,%ax
10: e6 e9 out %al,$0xe9
12: 0f b6 42 01 movzbl 0x1(%rdx),%eax
16: 48 83 c2 01 add $0x1,%rdx
1a: 84 c0 test %al,%al
1c: 75 f2 jne 10 <_start+0x10>
1e: 48 c7 04 25 00 04 00 movq $0x2a,0x400
25: 00 2a 00 00 00
2a: b8 2a 00 00 00 mov $0x2a,%eax
2f: 90 nop
30: f4 hlt
31: eb fd jmp 30 <_start+0x30>
I think rax,eax,al are all the same register, but different bits.
0x1122334455667788
================ rax (64 bits)
======== eax (32 bits)
==== ax (16 bits)
== ah (8 bits)
== al (8 bits)
from kvm-hello-world.
Thank you for replying.
I will study more about executable file structure.
from kvm-hello-world.
Related Issues (12)
- In fact, this is an issue, but a comment. HOT 2
- Question on KVM
- kvm-hello-world on AMD
- /usr/bin/ld: cannot use executable file 'payload.o' as input to a link HOT 3
- Question about -Werror in makefile
- hlt instruction qemu-kvm HOT 1
- Undefined Reference to "_GLOBAL_OFFSET_TABLE_" when linking guest32.o HOT 2
- 64 bit mode broken in Ubuntu 18.04 LTS (KVM_SET_SREGS: Invalid argument) HOT 3
- License file HOT 1
- How to run this proyect? HOT 2
- No real-mode output? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kvm-hello-world.