History | View | Annotate | Download (80.5 kB)
s390x: s390x-linux-user support
This patch adds support for running s390x binaries in the linux-user emulationcode.
Signed-off-by: Ulrich Hecht <uli@suse.de>Signed-off-by: Alexander Graf <agraf@suse.de>
unicore32: necessary modifications for other files to support unicore32
Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
linux-user: correct core dump format
This patch allows to really use the core dumped by qemu with guestarchitecture tools.
- it adds a missing bswap_phdr() for the program headers of memory regions.
"objdump -x" sample:
BEFORE:
0x1000000 off 0x00200000 vaddr 0x00000400 paddr 0x00000000 align 2**21...
linux-user/elfload: add FDPIC support
Signed-off-by: Mike Frysinger <vapier@gentoo.org>Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
linux-user: Fix possible realloc memory leak
Extract from "man realloc":"If realloc() fails the original block is left untouched;it is not freed or moved."
Fix a possible memory leak (reported by cppcheck).
Cc: Riku Voipio <riku.voipio@iki.fi>Signed-off-by: Stefan Weil <weil@mail.berlios.de>...
linux-user: Protect against allocation failure in load_symbols.
Cc: malc <av1474@comtv.ru>Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: malc <av1474@comtv.ru>
linux-user: Reduce lseek+reads while loading elf files.
Define BPRM_BUF_SIZE to 1k and read that amount initially. If thedata we want from the binary is in this buffer, use it instead ofreading from the file again.
Signed-off-by: Richard Henderson <rth@twiddle.net>...
linux-user: Define ELF_DATA generically.
The only consideration on this value is the target endianness.The existing defines were incorrect for alpha and sh4eb.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
linux-user: Clean up byte-swapping in elfload.c.
Remove ifdefs from code by defining empty inline functionswhen byte swapping isn't needed. Push loops over swappingarrays of structures into the swapping functions.
linux-user: Load symbols from the interpreter.
First, adjust load_symbols to accept a load_bias parameter. At the sametime, read the entire section header table in one go, use pread insteadf lseek+read for the symbol and string tables, and properly free...
linux-user: Improve consistency checking in elf headers.
Validate more fields of the elf header. Extract those checksinto two common functions to be used in both load_elf_interpand load_elf_binary.
linux-user: Put the stack guard page at the top.
There are no supported stack-grows-up targets. We were puttingthe guard page at the highest address, i.e. the bottom of the stack.Use the maximum of host and guest page size for the guard size.
linux-user: Remove partial support for a.out interpreters.
At the bottom of the a.out support was the unimplemented load_aout_interpfunction. There were other portions of the support that didn't lookright; when I went to look in the Linux kernel for clarification, I found...
linux-user: Extract load_elf_image from load_elf_interp.
Moving toward a single copy of the elf binary loading code.Fill in the details of the loaded image into a struct image_info.
Adjust create_elf_tables to read from such structures insteadof from a collection of passed arguments. Don't return error...
linux-user: Re-use load_elf_image for the main binary.
This requires moving the PT_INTERP extraction and GUEST_BASEhandling into load_elf_image. Key this off a non-null pointerargument to receive the interpreter name.
linux-user: Handle filesz < memsz for any PT_LOAD segment.
I caught padzero not properly initializing the .bss segmenton a statically linked Alpha program. Rather than a minimalpatch, replace the gross code with a single mmap+memset.
Share more code between load_elf_interp and load_elf_binary....
Add more DT_* and AT_* constants to qemu's copy of elf.h.
Moving some PPC AT_* constants from elfload.c at the same time.
linux-user: Reindent elfload.c.
Usermode exec-stack fix
When loading a shared library that requires an executable stack,glibc uses the mprotext PROT_GROWSDOWN flag to achieve this.We don't support PROT_GROWSDOWN.Add a special case to handle changing the stack permissions in this way....
Pre-allocate guest address space
Allow pre-allocation of the guest virtual address space in usermode emulation.
Signed-off-by: Paul Brook <paul@codesourcery.com>
microblaze: Update elf machine nums.
189 was allocated in upstream binutils.
0xbaab was the old temporary value. Still used by some tools and thelinux kernel.
I've seen 115 in older gdb versions, but lets ignore that one.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
microblaze: Add linux-user core dumping support.
Remove PAGE_RESERVED
The usermode PAGE_RESERVED code is not required by the current mmapimplementation, and is already broken when guest_base != 0.Unfortunately the bsd emulation still uses the old mmap implementation,so we can't rip it out altogether....
Better default guest_base
Avoid loading linux-user applications in address space already used/reservedby the host.
linux-user/ppc: use the Linux register layout
The dynamic linker converts the Linux layout to the AIX layout and isreentrant so it won't do it a second time if it's already beenconverted. In short it work just fine with either register layout.
OTOH, statically linked binaries expect a Linux layout....
linux-user: Use RLIMIT_STACK for default stack size.
The current default stack limit of 512kB is far too small; a fairnumber of gcc testsuite failures (for all guests) are directlyattributable to this. Using the -s option in every invocation ofthe emulator is annoying to say the least....
Fix usermode virtual address type
Usermode virtual addresses are abi_ulong, not target_ulong.
Disassembler symbol lookup fix
Fix function signature for userspace disassembler symbol lookup.
fix linux-user microblaze ELF_ARCH definition
Signed-off-by: Mike Frysinger <vapier@gentoo.org>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
linux-user: use TARGET_ABI_FMT_lx to print abi_ulong types
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
linux-user: fix ELF_USE_CORE_DUMP/USE_ELF_CORE_DUMP confusion
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
linux-user: commonify definitions of target typedefs
There's no sense in separately declaring target_{elf_greg,uid,gid,pid}_tfor every architecture. Just declare them once with appropriateUSE_UID16 handling.
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>...
linux-user: fix ARM core dumps on opposite-endian hosts
linux-user: add core dump support for PPC
linux-user: add core dump support for MIPS
linux-user: add core dump support for M68K
linux-user: add core dump support for SH
target-alpha: Drop bogus UNIQ initial value on Linux.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
linux-user: Update ARM hwcaps
Update ARM hwcaps to match Linux kernel 2.6.31 state
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
linux-user: fix "#if 0"'d printf()
Make an "#if 0"'d printf() in load_elf_binary(), probably left to aid indebugging, reflect what the actual code does. The current printf() willonly confuse those who "#if 1" it (it certainly confused me enough towrite this trivial patch)....
Revert "Get rid of _t suffix"
In the very least, a change like this requires discussion on the list.
The naming convention is goofy and it causes a massive merge problem. Somethinglike this must be presented on the list first so people can provide input...
Get rid of _t suffix
Some not so obvious bits, slirp and Xen were left alone for the timebeing.
Signed-off-by: malc <av1474@comtv.ru>
elfload: fix coding style nit
Put space between = and * when dereferencing a pointer,to avoid confusion with old-style "*="
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Compile loader only once
Callers must pass ELF machine, byte swapping and symbol LSB clearinginformation to ELF loader. A.out loader needs page size information, passthat too as a parameter.
Extract prototypes to a separate file. Move loader.[ch] and elf_ops.h under hw....
Fix sys-queue.h conflict for good
Problem: Our file sys-queue.h is a copy of the BSD file, but there aresome additions and it's not entirely compatible. Because of that, there havebeen conflicts with system headers on BSD systems. Some hacks have beenintroduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...
Fix symfind.
this patch fixes an issue in symfind.
Assume you have the following symbols:
Address Size0045bca0 00000080 T s00045bd20 00000112 T s1
You'll notice that s1 is s0 + size.
So the current symfind will find that address 0045bd20 belongs to s0...
More NULL pointer fixes
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Use correct byteswap routine for elf_note
All elf64_note structure members are Elf64_Word (which is 32bit value)hence using bswaptls to byteswap it on 64bit platforms is incorrect.
Avoid name clashes with symbols that leak from system headers
ELF codedump build failures
Rename ELF coredump types to avoid conflict with the corresponding host types.
Signed-off-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Userspace guest address offsetting
Re-implement GUEST_BASE support.Offset guest ddress space by default if the guest binary containsregions below the host mmap_min_addr.Implement support for i386, x86-64 and arm hosts.
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>...
linux-user: implemented ELF coredump support for ARM target
When target process is killed with signal (such signal thatshould dump core) a coredump file is created. This file issimilar than coredump generated by Linux (there are few exceptionsthough)....
linux-user: added x86 and x86_64 support for ELF coredump
Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
microblaze: linux-user support.
support ELF_HWCAP for PPPC
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>Signed-off-by: malc <av1474@comtv.ru>
Convert references to logfile/loglevel to use qemu_log*() macros
This is a large patch that changes all occurrences of logfile/loglevelglobal variables to use the new qemu_log*() macros.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
Remove all traces of powerpc
According to $GCC/gcc/config/rs6000/rs6000-c.c _ARCH_PPC is theubiquitous define which should be used to test whether gcc targetsPowerPC, on 64bit platforms _ARCH_PPC64 will be also defined.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6301 c046a42c-6fe2-441c-8c8c-71466251a162
Export x86_stack_size in qemu.h
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5427 c046a42c-6fe2-441c-8c8c-71466251a162
Silence some warnings about uninitialized variables
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5362 c046a42c-6fe2-441c-8c8c-71466251a162
Suppress gcc 4.x -Wpointer-sign (included in -Wall) warnings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5275 c046a42c-6fe2-441c-8c8c-71466251a162
Kludge to support linux-user on a PPC64
Some headers (e.g. signal.h) include asm/elf.h and the chaos of macroredefinitions ensues, this kludge avoids it.
Alternative way to fight that would be to change all ELF_XXX and someother definitions to QEMU_ELF_XXX or something to that effect....
Multithreaded locking fixes.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4692 c046a42c-6fe2-441c-8c8c-71466251a162
Implement AT_CLKTCK.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4113 c046a42c-6fe2-441c-8c8c-71466251a162
suppressed tgetx and tputx (initial patch by Thayne Harbaugh)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3653 c046a42c-6fe2-441c-8c8c-71466251a162
Linux user memory access API change (initial patch by Thayne Harbaugh)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3583 c046a42c-6fe2-441c-8c8c-71466251a162
Implement missing MIPS supervisor mode bits.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3472 c046a42c-6fe2-441c-8c8c-71466251a162
PowerPC user-mode fix: MSR is now entirelly set-up in the cpu_reset routine.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3457 c046a42c-6fe2-441c-8c8c-71466251a162
Use the new TARGET_ABI32 feature to implement a ppc64abi32-linux-user target (PowerPC 64 running in 32 bits mode).Use the new TARGET_ABI_DIR feature to implement a ppcemb-linux-user target (PowerPC 32 with 64 bits GPRs and vector extensions).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3409 c046a42c-6fe2-441c-8c8c-71466251a162
Support for 32 bit ABI on 64 bit targets (only enabled Sparc64)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3396 c046a42c-6fe2-441c-8c8c-71466251a162
Support for executing 32 bit SPARC32PLUS files for Sparc64 user emulator
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3378 c046a42c-6fe2-441c-8c8c-71466251a162
CRIS Linux userland emulation, part 2. By Edgar E. Iglesias.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3367 c046a42c-6fe2-441c-8c8c-71466251a162
Fix confusions between host and target long types.Fix start_data computation.Fix auxiliary infos setup.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3344 c046a42c-6fe2-441c-8c8c-71466251a162
memset string pages to zero to avoid putting random data on the stack that may make some program crash at startup.Fix unsigned long / target_ulong confusion (more to do).Fix missing g2h macros.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3249 c046a42c-6fe2-441c-8c8c-71466251a162
New ppc64-linux-user target.Allow use of PowerPC 970 for debugging (softmmu would not run, for now).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3246 c046a42c-6fe2-441c-8c8c-71466251a162
find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in the regex.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3177 c046a42c-6fe2-441c-8c8c-71466251a162
find -type f | xargs sed -i 's/[\t ]$//g' # on most files
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
Fix 64 bit ELF file symbol lookup
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3046 c046a42c-6fe2-441c-8c8c-71466251a162
Setup stack properly, fixes wrong argc value problem, by Magnus Damm.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3000 c046a42c-6fe2-441c-8c8c-71466251a162
Spelling fixes, by Stefan Weil.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2927 c046a42c-6fe2-441c-8c8c-71466251a162
MIPS linux-user update.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2810 c046a42c-6fe2-441c-8c8c-71466251a162
Code provision for x86_64 and PowerPC 64 linux user mode support.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2619 c046a42c-6fe2-441c-8c8c-71466251a162
Preliminary patch for Alpha Linux user mode emulation support.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2600 c046a42c-6fe2-441c-8c8c-71466251a162
Fix userland ELF loader for zero sized BSS.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2244 c046a42c-6fe2-441c-8c8c-71466251a162
ColdFire target.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2196 c046a42c-6fe2-441c-8c8c-71466251a162
Sparc64 user emulator fixes (Blue Swirl)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2063 c046a42c-6fe2-441c-8c8c-71466251a162
bFLT loader (for uClinux binaries).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1951 c046a42c-6fe2-441c-8c8c-71466251a162
sh4 target (Samuel Tardieu)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1861 c046a42c-6fe2-441c-8c8c-71466251a162
Avoid accessing guest memory directly in usermode emulation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1790 c046a42c-6fe2-441c-8c8c-71466251a162
Make target_mmap always return -1 on failure.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1741 c046a42c-6fe2-441c-8c8c-71466251a162
Correctly initialize Arm CPU for Thumb entry points.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1739 c046a42c-6fe2-441c-8c8c-71466251a162
mips user emulation
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1668 c046a42c-6fe2-441c-8c8c-71466251a162
added AT_PLATFORM and AT_HWCAP for x86 (initial patch by Gwenole Beauchesne)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1665 c046a42c-6fe2-441c-8c8c-71466251a162
Arm AT_HWCAP AUXV entry (Paul Brook)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1590 c046a42c-6fe2-441c-8c8c-71466251a162
fix AUX vector entries (Paul Brook)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1554 c046a42c-6fe2-441c-8c8c-71466251a162
64 bit support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1282 c046a42c-6fe2-441c-8c8c-71466251a162
initial sparc64 support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1256 c046a42c-6fe2-441c-8c8c-71466251a162
SPARC merge
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1179 c046a42c-6fe2-441c-8c8c-71466251a162
Darwin patch (initial patch by Pierre d'Herbemont)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@980 c046a42c-6fe2-441c-8c8c-71466251a162
buffer overflow fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@932 c046a42c-6fe2-441c-8c8c-71466251a162