aboutsummaryrefslogtreecommitdiff
path: root/linux-user/elfload.c
AgeCommit message (Collapse)Author
2009-12-19linux-user: add core dump support for M68KNathan Froyd
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-19linux-user: add core dump support for MIPSNathan Froyd
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-19linux-user: add core dump support for PPCNathan Froyd
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-19linux-user: fix ARM core dumps on opposite-endian hostsNathan Froyd
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-19linux-user: commonify definitions of target typedefsNathan Froyd
There's no sense in separately declaring target_{elf_greg,uid,gid,pid}_t for every architecture. Just declare them once with appropriate USE_UID16 handling. Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-19linux-user: fix ELF_USE_CORE_DUMP/USE_ELF_CORE_DUMP confusionNathan Froyd
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-19linux-user: use TARGET_ABI_FMT_lx to print abi_ulong typesAurelien Jarno
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-13target-alpha: Drop bogus UNIQ initial value on Linux.Richard Henderson
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-10-16linux-user: Update ARM hwcapsRiku Voipio
Update ARM hwcaps to match Linux kernel 2.6.31 state Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
2009-10-04linux-user: fix "#if 0"'d printf()Paul Bolle
Make an "#if 0"'d printf() in load_elf_binary(), probably left to aid in debugging, reflect what the actual code does. The current printf() will only confuse those who "#if 1" it (it certainly confused me enough to write this trivial patch). Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-10-01Revert "Get rid of _t suffix"Anthony Liguori
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. Something like this _must_ be presented on the list first so people can provide input and cope with it. This reverts commit 99a0949b720a0936da2052cb9a46db04ffc6db29. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-01Get rid of _t suffixmalc
Some not so obvious bits, slirp and Xen were left alone for the time being. Signed-off-by: malc <av1474@comtv.ru>
2009-09-30elfload: fix coding style nitMichael S. Tsirkin
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>
2009-09-20Compile loader only onceBlue Swirl
Callers must pass ELF machine, byte swapping and symbol LSB clearing information to ELF loader. A.out loader needs page size information, pass that too as a parameter. Extract prototypes to a separate file. Move loader.[ch] and elf_ops.h under hw. Adjust callers. Also use target_phys_addr_t instead of target_ulong for addresses: loader addresses aren't virtual. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-12Fix sys-queue.h conflict for goodBlue Swirl
Problem: Our file sys-queue.h is a copy of the BSD file, but there are some additions and it's not entirely compatible. Because of that, there have been conflicts with system headers on BSD systems. Some hacks have been introduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896, f40d753718c72693c5f520f0d9899f6e50395e94, 96555a96d724016e13190b28cffa3bc929ac60dc and 3990d09adf4463eca200ad964cc55643c33feb50 but the fixes were fragile. Solution: Avoid the conflict entirely by renaming the functions and the file. Revert the previous hacks. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-10Fix symfind.Laurent Desnogues
this patch fixes an issue in symfind. Assume you have the following symbols: Address Size 0045bca0 00000080 T s0 0045bd20 00000112 T s1 You'll notice that s1 is s0 + size. So the current symfind will find that address 0045bd20 belongs to s0 instead of s1. Laurent Signed-off-by: Laurent Desnogues <laurent.desnogues@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
2009-08-01More NULL pointer fixesBlue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-18Use correct byteswap routine for elf_notemalc
All elf64_note structure members are Elf64_Word (which is 32bit value) hence using bswaptls to byteswap it on 64bit platforms is incorrect. Signed-off-by: malc <av1474@comtv.ru>
2009-07-18Avoid name clashes with symbols that leak from system headersmalc
Signed-off-by: malc <av1474@comtv.ru>
2009-07-17ELF codedump build failuresLaurent Desnogues
Rename ELF coredump types to avoid conflict with the corresponding host types. Signed-off-by: Laurent Desnogues <laurent.desnogues@gmail.com>
2009-07-17Userspace guest address offsettingPaul Brook
Re-implement GUEST_BASE support. Offset guest ddress space by default if the guest binary contains regions below the host mmap_min_addr. Implement support for i386, x86-64 and arm hosts. Signed-off-by: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-06-16linux-user: added x86 and x86_64 support for ELF coredumpMika Westerberg
Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
2009-06-16linux-user: implemented ELF coredump support for ARM targetMika Westerberg
When target process is killed with signal (such signal that should dump core) a coredump file is created. This file is similar than coredump generated by Linux (there are few exceptions though). Riku Voipio: added support for rlimit Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
2009-05-26microblaze: linux-user support.Edgar E. Iglesias
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-16support ELF_HWCAP for PPPCNathan Froyd
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: malc <av1474@comtv.ru>
2009-01-15Convert references to logfile/loglevel to use qemu_log*() macrosaliguori
This is a large patch that changes all occurrences of logfile/loglevel global 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> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6338 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-14Remove all traces of __powerpc__malc
According to $GCC/gcc/config/rs6000/rs6000-c.c _ARCH_PPC is the ubiquitous define which should be used to test whether gcc targets PowerPC, 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
2008-10-22* Use function pointers for symbol lookup (currently for elf32 and elf64,pbrook
could be expanded). This also fixes the bug with mips elf64 symbols in current Qemu trunk. * Use quicksort and binary search for symbol lookup. * Remove unneeded entries from symbol table. This reduced a typical table size (linux mips kernel) from 1764487 to 11656 entries. Signed-off-by: Stefan Weil <weil@mail.berlios.de> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5510 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-05Export x86_stack_size in qemu.hblueswir1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5427 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-30Silence some warnings about uninitialized variablesblueswir1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5362 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-20Suppress gcc 4.x -Wpointer-sign (included in -Wall) warningsblueswir1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5275 c046a42c-6fe2-441c-8c8c-71466251a162
2008-08-20Kludge to support linux-user on a PPC64malc
Some headers (e.g. signal.h) include asm/elf.h and the chaos of macro redefinitions ensues, this kludge avoids it. Alternative way to fight that would be to change all ELF_XXX and some other definitions to QEMU_ELF_XXX or something to that effect. This patch concludes the quest for enabling linux-user on PPC64, however, since qemu_mallocz uses mmap and, at least on this system, mmap tends to return values that do not fit into 32bit, emulation for 32bit targets does not work without some hacks wich are to disgusting to commit (and as `man mmap' tells us MAP_32BIT is only implemented on X86_64) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5037 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-07Multithreaded locking fixes.pbrook
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4692 c046a42c-6fe2-441c-8c8c-71466251a162
2008-03-26Implement AT_CLKTCK.pbrook
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4113 c046a42c-6fe2-441c-8c8c-71466251a162
2007-11-16suppressed tgetx and tputx (initial patch by Thayne Harbaugh)bellard
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3653 c046a42c-6fe2-441c-8c8c-71466251a162
2007-11-11Linux user memory access API change (initial patch by Thayne Harbaugh)bellard
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3583 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-28Implement missing MIPS supervisor mode bits.ths
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3472 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-27PowerPC user-mode fix: MSR is now entirelly set-up in the cpu_reset routine.j_mayer
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3457 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-18Use the new TARGET_ABI32 feature to implement a ppc64abi32-linux-user targetj_mayer
(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
2007-10-14 Support for 32 bit ABI on 64 bit targets (only enabled Sparc64)blueswir1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3396 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-09 Support for executing 32 bit SPARC32PLUS files for Sparc64 user emulatorblueswir1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3378 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-08CRIS Linux userland emulation, part 2. By Edgar E. Iglesias.ths
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3367 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-07Fix confusions between host and target long types.j_mayer
Fix start_data computation. Fix auxiliary infos setup. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3344 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-27memset string pages to zero to avoid putting random data on the stackj_mayer
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
2007-09-27New ppc64-linux-user target.j_mayer
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
2007-09-17find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in ↵ths
the regex. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3177 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-16find -type f | xargs sed -i 's/[\t ]$//g' # on most filesths
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
2007-07-05 Fix 64 bit ELF file symbol lookupblueswir1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3046 c046a42c-6fe2-441c-8c8c-71466251a162
2007-06-22Setup stack properly, fixes wrong argc value problem, by Magnus Damm.ths
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3000 c046a42c-6fe2-441c-8c8c-71466251a162
2007-06-03Spelling fixes, by Stefan Weil.ths
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2927 c046a42c-6fe2-441c-8c8c-71466251a162