summaryrefslogtreecommitdiffstats
path: root/linux-user/elfload.c
Commit message (Collapse)AuthorAgeFilesLines
...
* linux-user: commonify definitions of target typedefsNathan Froyd2009-12-191-22/+10
| | | | | | | | | 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>
* linux-user: fix ELF_USE_CORE_DUMP/USE_ELF_CORE_DUMP confusionNathan Froyd2009-12-191-1/+1
| | | | | Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* linux-user: use TARGET_ABI_FMT_lx to print abi_ulong typesAurelien Jarno2009-12-191-1/+1
| | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-alpha: Drop bogus UNIQ initial value on Linux.Richard Henderson2009-12-131-3/+0
| | | | | Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* linux-user: Update ARM hwcapsRiku Voipio2009-10-161-1/+8
| | | | | | 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()Paul Bolle2009-10-041-1/+1
| | | | | | | | | | 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>
* Revert "Get rid of _t suffix"Anthony Liguori2009-10-011-32/+32
| | | | | | | | | | | | 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>
* Get rid of _t suffixmalc2009-10-011-32/+32
| | | | | | | Some not so obvious bits, slirp and Xen were left alone for the time being. Signed-off-by: malc <av1474@comtv.ru>
* elfload: fix coding style nitMichael S. Tsirkin2009-09-301-1/+1
| | | | | | | | 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 onceBlue Swirl2009-09-201-2/+2
| | | | | | | | | | | | | 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>
* Fix sys-queue.h conflict for goodBlue Swirl2009-09-121-14/+14
| | | | | | | | | | | | | | | 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>
* Fix symfind.Laurent Desnogues2009-08-101-1/+1
| | | | | | | | | | | | | | | | | | | | | 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:
* More NULL pointer fixesBlue Swirl2009-08-011-1/+1
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Use correct byteswap routine for elf_notemalc2009-07-181-3/+3
| | | | | | | 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>
* Avoid name clashes with symbols that leak from system headersmalc2009-07-181-37/+37
| | | | Signed-off-by: malc <av1474@comtv.ru>
* ELF codedump build failuresLaurent Desnogues2009-07-171-29/+30
| | | | | | Rename ELF coredump types to avoid conflict with the corresponding host types. Signed-off-by: Laurent Desnogues <laurent.desnogues@gmail.com>
* Userspace guest address offsettingPaul Brook2009-07-171-0/+23
| | | | | | | | | | 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>
* linux-user: added x86 and x86_64 support for ELF coredumpMika Westerberg2009-06-161-0/+83
| | | | | Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
* linux-user: implemented ELF coredump support for ARM targetMika Westerberg2009-06-161-8/+920
| | | | | | | | | | | | 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>
* microblaze: linux-user support.Edgar E. Iglesias2009-05-261-0/+22
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* support ELF_HWCAP for PPPCNathan Froyd2009-05-161-0/+58
| | | | | Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: malc <av1474@comtv.ru>
* Convert references to logfile/loglevel to use qemu_log*() macrosaliguori2009-01-151-1/+1
| | | | | | | | | | | | 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
* Remove all traces of __powerpc__malc2009-01-141-1/+1
| | | | | | | | 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
* * Use function pointers for symbol lookup (currently for elf32 and elf64,pbrook2008-10-221-44/+98
| | | | | | | | | | | | | | | | 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
* Export x86_stack_size in qemu.hblueswir12008-10-051-2/+0
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5427 c046a42c-6fe2-441c-8c8c-71466251a162
* Silence some warnings about uninitialized variablesblueswir12008-09-301-0/+1
| | | | 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) warningsblueswir12008-09-201-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5275 c046a42c-6fe2-441c-8c8c-71466251a162
* Kludge to support linux-user on a PPC64malc2008-08-201-0/+9
| | | | | | | | | | | | | | | | | 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
* Multithreaded locking fixes.pbrook2008-06-071-2/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4692 c046a42c-6fe2-441c-8c8c-71466251a162
* Implement AT_CLKTCK.pbrook2008-03-261-0/+1
| | | | 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)bellard2007-11-161-14/+11
| | | | 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)bellard2007-11-111-1/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3583 c046a42c-6fe2-441c-8c8c-71466251a162
* Implement missing MIPS supervisor mode bits.ths2007-10-281-1/+1
| | | | 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.j_mayer2007-10-271-1/+0
| | | | 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 targetj_mayer2007-10-181-3/+3
| | | | | | | | | (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)blueswir12007-10-141-64/+74
| | | | 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 emulatorblueswir12007-10-091-23/+74
| | | | 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.ths2007-10-081-0/+20
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3367 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix confusions between host and target long types.j_mayer2007-10-071-47/+61
| | | | | | | | 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 stackj_mayer2007-09-271-1/+2
| | | | | | | | | 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.j_mayer2007-09-271-0/+1
| | | | | | | 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 ↵ths2007-09-171-6/+6
| | | | | | 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 filesths2007-09-161-27/+27
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix 64 bit ELF file symbol lookupblueswir12007-07-051-1/+24
| | | | 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.ths2007-06-221-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3000 c046a42c-6fe2-441c-8c8c-71466251a162
* Spelling fixes, by Stefan Weil.ths2007-06-031-2/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2927 c046a42c-6fe2-441c-8c8c-71466251a162
* MIPS linux-user update.ths2007-05-131-0/+7
| | | | 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.j_mayer2007-04-061-0/+41
| | | | 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.j_mayer2007-04-051-3/+28
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2600 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix userland ELF loader for zero sized BSS.ths2006-12-141-3/+6
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2244 c046a42c-6fe2-441c-8c8c-71466251a162
OpenPOWER on IntegriCloud