qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/14] Implement VDSO for x86_64-linux-user
@ 2010-04-05 16:47 Richard Henderson
  2010-03-31 22:12 ` [Qemu-devel] [PATCH 01/14] linux-user: Handle filesz < memsz for any PT_LOAD segment Richard Henderson
                   ` (27 more replies)
  0 siblings, 28 replies; 46+ messages in thread
From: Richard Henderson @ 2010-04-05 16:47 UTC (permalink / raw)
  To: qemu-devel

To do this in any clean sort of way, I rewrote a substantial
portion of elfload.c.  Doing otherwise would have wound up
with 3 entirely separate bits of code to load an elf image.

The first patch seems out of order, since I did this work on
a branch that already contained some previously submitted
fixes for Alpha.

The third patch is *only* white-space changes.  There were
too many functions that I was touching that were improperly
indented for qemu's style.  Fixing this once at the beginning
minimizes the irrelevant whitespace changes that emacs autoindent
would have introduced when moving code around later.

The patch sequence has been tested at each point with all of
the targets in linux-user-test-0.3.

Since that doesn't actually test gettimeofday, I also tested the
final result against a small program that simply reads and prints
the timeval with the system glibc, and examining the logs to verify
that we do in fact call the __vdso_getttimeofday in the loaded vdso.
I didn't test with the linux-user-test-0.3 image because I have no
way of properly linking with that library, and programs linked
against my system glibc crash when run vs the uClibc library.

I'll admit that the Makefiles aren't quite right for building the VDSO.
I couldn't quite figure out what needed to be done.  The binary image
included in patch 13 is exactly what you'd get with the link command
included in the pc-bios/Makefile, provided that you can get that link
command executed.  I'd appreciate some help with this point.

Finally, do be aware that I was not able to use qemu_find_file to 
load the vdso image, since that function is only built for system
builds, and I'd rather this patch sequence be independent of cleanups
involving vl.c.  ;-)  As a short-term hack, I always load the vdso image
from the install directory.  Which does mean that x86-64 emulation will
not currently work from the build directory alone.



r~



Richard Henderson (14):
  linux-user: Handle filesz < memsz for any PT_LOAD segment.
  Add more DT_* and AT_* constants to qemu's copy of elf.h.
  linux-user: Reindent elfload.c.
  linux-user: Reduce lseek+reads while loading elf files.
  linux-user: Fix ELF_DATA for Alpha.
  linux-user: Clean up byte-swapping in elfload.c.
  linux-user: Load symbols from the interpreter.
  linux-user: Improve consistency checking in elf headers.
  linux-user: Put the stack guard page at the top.
  linux-user: Remove partial support for a.out interpreters.
  linux-user: Extract load_elf_image from load_elf_interp.
  linux-user: Re-use load_elf_image for the main binary.
  linux-user: Build vdso for x64.
  linux-user: Load a VDSO for x86-64.

 Makefile                  |    3 +-
 elf.h                     |   44 ++
 linux-user/elfload.c      | 1683 +++++++++++++++++++++------------------------
 linux-user/linuxload.c    |   17 +-
 linux-user/qemu.h         |    7 +-
 pc-bios/Makefile          |    5 +
 pc-bios/vdso-linux-x64.S  |  102 +++
 pc-bios/vdso-linux-x64.ld |   81 +++
 pc-bios/vdso-linux-x64.so |  Bin 0 -> 7515 bytes
 9 files changed, 1037 insertions(+), 905 deletions(-)
 create mode 100644 pc-bios/vdso-linux-x64.S
 create mode 100644 pc-bios/vdso-linux-x64.ld
 create mode 100755 pc-bios/vdso-linux-x64.so

^ permalink raw reply	[flat|nested] 46+ messages in thread
* [Qemu-devel] [PATCH 00/12 v4] Clean up linux-user/elfload.c
@ 2010-07-27 17:25 Richard Henderson
  2010-07-27 17:25 ` [Qemu-devel] [PATCH 03/12] linux-user: Reindent elfload.c Richard Henderson
  0 siblings, 1 reply; 46+ messages in thread
From: Richard Henderson @ 2010-07-27 17:25 UTC (permalink / raw)
  To: qemu-devel

A re-based and re-tested version of a patch series I
posted back in April and May.  These cleanups prepare
elfload.c for loading the VDSO for x86_64.


r~


Richard Henderson (12):
  linux-user: Handle filesz < memsz for any PT_LOAD segment.
  Add more DT_* and AT_* constants to qemu's copy of elf.h.
  linux-user: Reindent elfload.c.
  linux-user: Reduce lseek+reads while loading elf files.
  linux-user: Define ELF_DATA generically.
  linux-user: Clean up byte-swapping in elfload.c.
  linux-user: Load symbols from the interpreter.
  linux-user: Improve consistency checking in elf headers.
  linux-user: Put the stack guard page at the top.
  linux-user: Remove partial support for a.out interpreters.
  linux-user: Extract load_elf_image from load_elf_interp.
  linux-user: Re-use load_elf_image for the main binary.

 elf.h                  |   44 ++
 linux-user/elfload.c   | 1791 ++++++++++++++++++++----------------------------
 linux-user/linuxload.c |   17 +-
 linux-user/qemu.h      |    7 +-
 4 files changed, 794 insertions(+), 1065 deletions(-)

^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2010-07-27 18:19 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-05 16:47 [Qemu-devel] [PATCH 00/14] Implement VDSO for x86_64-linux-user Richard Henderson
2010-03-31 22:12 ` [Qemu-devel] [PATCH 01/14] linux-user: Handle filesz < memsz for any PT_LOAD segment Richard Henderson
2010-04-04 18:38 ` [Qemu-devel] [PATCH 13/14] linux-user: Build vdso for x64 Richard Henderson
2010-04-04 19:07 ` [Qemu-devel] [PATCH 03/14] linux-user: Reindent elfload.c Richard Henderson
2010-04-04 19:34 ` [Qemu-devel] [PATCH 04/14] linux-user: Reduce lseek+reads while loading elf files Richard Henderson
2010-04-04 19:35 ` [Qemu-devel] [PATCH 05/14] linux-user: Fix ELF_DATA for Alpha Richard Henderson
2010-04-04 19:54 ` [Qemu-devel] [PATCH 06/14] linux-user: Clean up byte-swapping in elfload.c Richard Henderson
2010-04-04 21:16 ` [Qemu-devel] [PATCH 07/14] linux-user: Load symbols from the interpreter Richard Henderson
2010-04-04 22:04 ` [Qemu-devel] [PATCH 08/14] linux-user: Improve consistency checking in elf headers Richard Henderson
2010-04-04 22:14 ` [Qemu-devel] [PATCH 09/14] linux-user: Put the stack guard page at the top Richard Henderson
2010-04-04 22:31 ` [Qemu-devel] [PATCH 10/14] linux-user: Remove partial support for a.out interpreters Richard Henderson
2010-04-05  0:46 ` [Qemu-devel] [PATCH 11/14] linux-user: Extract load_elf_image from load_elf_interp Richard Henderson
2010-04-05  2:13 ` [Qemu-devel] [PATCH 14/14] linux-user: Load a VDSO for x86-64 Richard Henderson
2010-04-05 16:26 ` [Qemu-devel] [PATCH 02/14] Add more DT_* and AT_* constants to qemu's copy of elf.h Richard Henderson
2010-04-05 16:37 ` [Qemu-devel] [PATCH 12/14] linux-user: Re-use load_elf_image for the main binary Richard Henderson
2010-04-05 18:14   ` malc
2010-04-05 18:38     ` Richard Henderson
2010-04-28 19:36 ` [Qemu-devel] [PATCH 00/14] Implement VDSO for x86-64-linux-user, v2 Richard Henderson
2010-04-28 19:39   ` [Qemu-devel] [PATCH 04/14] linux-user: Reduce lseek+reads while loading elf files Richard Henderson
2010-04-28 19:39   ` [Qemu-devel] [PATCH 01/14] linux-user: Handle filesz < memsz for any PT_LOAD segment Richard Henderson
2010-04-28 19:39   ` [Qemu-devel] [PATCH 02/14] Add more DT_* and AT_* constants to qemu's copy of elf.h Richard Henderson
2010-04-28 19:39   ` [Qemu-devel] [PATCH 09/14] linux-user: Put the stack guard page at the top Richard Henderson
2010-04-28 19:39   ` [Qemu-devel] [PATCH 06/14] linux-user: Clean up byte-swapping in elfload.c Richard Henderson
2010-04-28 19:39   ` [Qemu-devel] [PATCH 05/14] linux-user: Fix ELF_DATA for Alpha Richard Henderson
2010-04-28 19:39   ` [Qemu-devel] [PATCH 10/14] linux-user: Remove partial support for a.out interpreters Richard Henderson
2010-04-28 19:39   ` [Qemu-devel] [PATCH 08/14] linux-user: Improve consistency checking in elf headers Richard Henderson
2010-04-28 19:39   ` [Qemu-devel] [PATCH 11/14] linux-user: Extract load_elf_image from load_elf_interp Richard Henderson
2010-04-28 19:39   ` [Qemu-devel] [PATCH 13/14] linux-user: Build vdso for x64 Richard Henderson
2010-04-28 19:39   ` [Qemu-devel] [PATCH 14/14] linux-user: Load a VDSO for x86-64 Richard Henderson
2010-04-28 19:39   ` [Qemu-devel] [PATCH 03/14] linux-user: Reindent elfload.c Richard Henderson
2010-04-28 19:39   ` [Qemu-devel] [PATCH 07/14] linux-user: Load symbols from the interpreter Richard Henderson
2010-04-28 19:39   ` [Qemu-devel] [PATCH 12/14] linux-user: Re-use load_elf_image for the main binary Richard Henderson
2010-05-05 18:07 ` [Qemu-devel] [PATCH 00/12] Cleanup linux-user/elfload.c, v2 Richard Henderson
2010-05-05 18:07 ` [Qemu-devel] [PATCH 01/12] linux-user: Handle filesz < memsz for any PT_LOAD segment Richard Henderson
2010-05-05 18:07 ` [Qemu-devel] [PATCH 02/12] Add more DT_* and AT_* constants to qemu's copy of elf.h Richard Henderson
2010-05-05 18:07 ` [Qemu-devel] [PATCH 03/12] linux-user: Reindent elfload.c Richard Henderson
2010-05-05 18:07 ` [Qemu-devel] [PATCH 04/12] linux-user: Reduce lseek+reads while loading elf files Richard Henderson
2010-05-05 18:07 ` [Qemu-devel] [PATCH 05/12] linux-user: Define ELF_DATA generically Richard Henderson
2010-05-05 18:07 ` [Qemu-devel] [PATCH 06/12] linux-user: Clean up byte-swapping in elfload.c Richard Henderson
2010-05-05 18:07 ` [Qemu-devel] [PATCH 07/12] linux-user: Load symbols from the interpreter Richard Henderson
2010-05-05 18:07 ` [Qemu-devel] [PATCH 08/12] linux-user: Improve consistency checking in elf headers Richard Henderson
2010-05-05 18:07 ` [Qemu-devel] [PATCH 09/12] linux-user: Put the stack guard page at the top Richard Henderson
2010-05-05 18:07 ` [Qemu-devel] [PATCH 10/12] linux-user: Remove partial support for a.out interpreters Richard Henderson
2010-05-05 18:07 ` [Qemu-devel] [PATCH 11/12] linux-user: Extract load_elf_image from load_elf_interp Richard Henderson
2010-05-05 18:07 ` [Qemu-devel] [PATCH 12/12] linux-user: Re-use load_elf_image for the main binary Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
2010-07-27 17:25 [Qemu-devel] [PATCH 00/12 v4] Clean up linux-user/elfload.c Richard Henderson
2010-07-27 17:25 ` [Qemu-devel] [PATCH 03/12] linux-user: Reindent elfload.c Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).