summaryrefslogtreecommitdiffstats
path: root/linux-user/linuxload.c
Commit message (Collapse)AuthorAgeFilesLines
* cpu: Move opaque field from CPU_COMMON to CPUStateAndreas Färber2014-03-131-2/+1
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* linux-user: Remove regs parameter of load_elf_binary and load_flt_binaryWill Newton2014-01-101-2/+2
| | | | | | | | | The regs parameter is not used anywhere, so remove it. Signed-off-by: Will Newton <will.newton@linaro.org> Reviewed-by: Erik de Castro Lopo <erikd@mega-nerd.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
* linux-user: add support of binfmt_misc 'O' flagLaurent Vivier2013-09-241-6/+2
| | | | | | | | | | | | | | | | | The binfmt_misc module can calculate the credentials and security token according to the binary instead of to the interpreter if the 'C' flag is enabled. To be able to execute non-readable binaries, this flag implies 'O' flag. When 'O' flag is enabled, bintfmt_misc opens the file for reading and pass the file descriptor to the interpreter. References: linux/Documentation/binfmt_misc.txt ['O' and 'C' description] linux/fs/binfmt_misc.c linux/fs/binfmt_elf.c [ AT_EXECFD usage ] Signed-off-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
* linux-user: Change thread_env to CPUStateAndreas Färber2013-07-091-1/+2
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* linux-user: If loading fails, print error as string, not numberPeter Maydell2012-10-121-4/+4
| | | | | | | | | | | | | | If the attempt to load the guest executable fails, print the error message as a string, not a number. This requires us to fix a couple of places in loader_exec() where we were returning -1 instead of a valid negative errno. The change allows us to drop the "Unknown binary format" message because the strerror-enhanced message is now a more self-explanatory "Error while loading $guest-binary: Exec format error". Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
* linux-user/elfload.c: Don't memset(NULL..) if malloc() failedPeter Maydell2011-11-111-1/+1
| | | | | | | | | | | If a malloc() in copy_elf_strings() failed we would call memset() before the "did malloc fail?" check. Fix this by moving to the glib alloc/free routines for this memory so we can use g_try_malloc0 rather than having a separate memset(). Spotted by Coverity (see bug 887883). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* linuxload: id_change was a write only variableJuan Quintela2011-06-211-24/+1
| | | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
* Remove dead code for ARM semihosting commandline handlingWolfgang Schildbach2011-01-071-2/+0
| | | | | | | | | There are some bits in the code which were used to store the commandline for the semihosting call. These bits are now write-only and can be removed. Signed-off-by: Wolfgang Schildbach <wschi@dolby.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
* linux-user: Reduce lseek+reads while loading elf files.Richard Henderson2010-07-291-10/+7
| | | | | | | | | Define BPRM_BUF_SIZE to 1k and read that amount initially. If the data we want from the binary is in this buffer, use it instead of reading from the file again. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* linux-user: Remove ELFLOAD32.Richard Henderson2010-04-251-5/+1
| | | | | | | | | | | The ABI-specific types used by linux_binprm and image_info are different after forcing TARGET_ABI32 on. Which means that the parameters that load_elf_binary_multi sees are not those that loader_exec passed. This is inherently broken and is more trouble than it's worth fixing. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* linux-user: don't zero a buffer twicePaul Bolle2009-10-161-1/+0
| | | | | | | | prepare_binprm() zeroes bprm->buf. That buffer is already zeroed in main() and hasn't been touched since so that is not necessary. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
* More NULL pointer fixesBlue Swirl2009-08-011-1/+1
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* linux-user: implemented ELF coredump support for ARM targetMika Westerberg2009-06-161-24/+26
| | | | | | | | | | | | 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>
* suppressed tgetx and tputx (initial patch by Thayne Harbaugh)bellard2007-11-161-7/+18
| | | | 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-3/+6
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3583 c046a42c-6fe2-441c-8c8c-71466251a162
* Support for 32 bit ABI on 64 bit targets (only enabled Sparc64)blueswir12007-10-141-6/+6
| | | | 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-0/+4
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3378 c046a42c-6fe2-441c-8c8c-71466251a162
* find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in ↵ths2007-09-171-1/+1
| | | | | | 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-2/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix typo in comment.ths2007-06-031-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2933 c046a42c-6fe2-441c-8c8c-71466251a162
* Arm semihosted commandline support (Wolfgang Schildbach).pbrook2006-11-191-0/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2216 c046a42c-6fe2-441c-8c8c-71466251a162
* bFLT loader (for uClinux binaries).pbrook2006-06-111-0/+195
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1951 c046a42c-6fe2-441c-8c8c-71466251a162
OpenPOWER on IntegriCloud