23

When build qemu from source code, I find for every CPU architecture, there are 2 options for target list: xx-softmmu and xx-linux-user. For example:

x86_64-softmmu
x86_64-linux-user

I can't search the difference between two options. Could anyone introduce what is the difference and relationship between them?

Nan Xiao
  • 16,671
  • 18
  • 103
  • 164

1 Answers1

21

To put it simply, xxx-softmmu will compile qemu-system-xxx, which is an emulated machine for xxx architecture (System Emulation). When it resets, the starting point will be the reset vector of that architecture. While xxx-linux-user, compiles qemu-xxx, which allows you to run user application in xxx architecture (User-mode Emulation). Which will seek the user applications' main function, and start execution from there.

See https://en.wikipedia.org/wiki/QEMU#Operating_modes

Isa A
  • 1,342
  • 13
  • 31
  • 1
    To be precise, it would start from the *entry point* of the executable (usually `_start`) when using User-mode Emulation, but that's only a detail. – minmaxavg Jul 17 '17 at 07:47