Giter Site home page Giter Site logo

Comments (2)

seamaner avatar seamaner commented on July 22, 2024

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.

yushoyamaguchi avatar yushoyamaguchi commented on July 22, 2024

Thank you for replying.
I will study more about executable file structure.

from kvm-hello-world.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.