Commit Graph

77 Commits

Author SHA1 Message Date
Blue Swirl 72cf2d4f0e Fix sys-queue.h conflict for good
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 15cc923584,
f40d753718,
96555a96d7 and
3990d09adf 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-09-12 07:36:22 +00:00
Laurent Desnogues ec822001a2 Fix symfind.
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-10 13:05:25 -05:00
Blue Swirl 7cba04f6de More NULL pointer fixes
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-01 10:13:20 +00:00
malc 9fdca5aa5d 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.

Signed-off-by: malc <av1474@comtv.ru>
2009-07-18 13:17:01 +04:00
malc 3efa9a672e Avoid name clashes with symbols that leak from system headers
Signed-off-by: malc <av1474@comtv.ru>
2009-07-18 13:16:51 +04:00
Laurent Desnogues a2547a1378 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>
2009-07-17 13:33:41 +01:00
Paul Brook 379f6698d7 Userspace guest address offsetting
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-07-17 13:12:41 +01:00
Mika Westerberg 9edc5d7966 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>
2009-06-16 16:56:28 +03:00
Mika Westerberg edf8e2af14 linux-user: implemented ELF coredump support for ARM target
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-06-16 16:56:28 +03:00
Edgar E. Iglesias b779e29ed8 microblaze: linux-user support.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-26 21:10:28 +02:00
Nathan Froyd df84e4f345 support ELF_HWCAP for PPPC
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: malc <av1474@comtv.ru>
2009-05-16 01:36:16 +04:00
aliguori 93fcfe39a0 Convert references to logfile/loglevel to use qemu_log*() macros
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-15 22:34:14 +00:00
malc e58ffeb322 Remove all traces of __powerpc__
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
2009-01-14 18:39:49 +00:00
pbrook 49918a752b * Use function pointers for symbol lookup (currently for elf32 and elf64,
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-22 15:11:31 +00:00
blueswir1 440c7e85cc Export x86_stack_size in qemu.h
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5427 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-05 11:05:14 +00:00
blueswir1 98448f58c1 Silence some warnings about uninitialized variables
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5362 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-30 18:16:09 +00:00
blueswir1 b55266b5a2 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
2008-09-20 08:07:15 +00:00
malc a6cc84f49c Kludge to support linux-user on a PPC64
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-08-20 22:39:28 +00:00
pbrook d597536303 Multithreaded locking fixes.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4692 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-07 20:50:51 +00:00
pbrook a07c67dfcc Implement AT_CLKTCK.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4113 c046a42c-6fe2-441c-8c8c-71466251a162
2008-03-26 23:31:55 +00:00
bellard 2f6196984b 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
2007-11-16 10:46:05 +00:00
bellard 579a97f7ff 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
2007-11-11 14:26:47 +00:00
ths 623a930ec3 Implement missing MIPS supervisor mode bits.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3472 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-28 19:45:05 +00:00
j_mayer a32ff1ad95 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
2007-10-27 17:29:35 +00:00
j_mayer e85e7c6ea4 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
2007-10-18 19:59:49 +00:00
blueswir1 992f48a036 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
2007-10-14 16:27:31 +00:00
blueswir1 cb33da57aa 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
2007-10-09 16:34:29 +00:00
ths 48733d195b 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
2007-10-08 13:36:46 +00:00
j_mayer 863cf0b72c 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
2007-10-07 15:59:45 +00:00
j_mayer 4118a97030 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
2007-09-27 04:10:43 +00:00
j_mayer 92a343da3f 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
2007-09-27 01:14:15 +00:00
ths 3b46e62427 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
2007-09-17 08:09:54 +00:00
ths 5fafdf24ef 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
2007-09-16 21:08:06 +00:00
blueswir1 0774bed180 Fix 64 bit ELF file symbol lookup
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3046 c046a42c-6fe2-441c-8c8c-71466251a162
2007-07-05 13:23:29 +00:00
ths 072ae847f9 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
2007-06-22 10:13:51 +00:00
ths e91c8a7783 Spelling fixes, by Stefan Weil.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2927 c046a42c-6fe2-441c-8c8c-71466251a162
2007-06-03 13:35:16 +00:00
ths 388bb21af6 MIPS linux-user update.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2810 c046a42c-6fe2-441c-8c8c-71466251a162
2007-05-13 13:58:00 +00:00
j_mayer 84409ddbda 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
2007-04-06 08:56:50 +00:00
j_mayer 7a3148a955 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
2007-04-05 07:13:51 +00:00
ths 768a4a36a4 Fix userland ELF loader for zero sized BSS.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2244 c046a42c-6fe2-441c-8c8c-71466251a162
2006-12-14 13:32:11 +00:00
pbrook e6e5906b6e ColdFire target.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2196 c046a42c-6fe2-441c-8c8c-71466251a162
2006-10-22 00:18:54 +00:00
bellard 5ef54116ea Sparc64 user emulator fixes (Blue Swirl)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2063 c046a42c-6fe2-441c-8c8c-71466251a162
2006-07-18 21:14:09 +00:00
pbrook e5fe0c5230 bFLT loader (for uClinux binaries).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1951 c046a42c-6fe2-441c-8c8c-71466251a162
2006-06-11 13:32:59 +00:00
bellard fdf9b3e831 sh4 target (Samuel Tardieu)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1861 c046a42c-6fe2-441c-8c8c-71466251a162
2006-04-27 21:07:38 +00:00
pbrook 53a5960aad Avoid accessing guest memory directly in usermode emulation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1790 c046a42c-6fe2-441c-8c8c-71466251a162
2006-03-25 19:31:22 +00:00
pbrook e89f07d384 Make target_mmap always return -1 on failure.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1741 c046a42c-6fe2-441c-8c8c-71466251a162
2006-02-04 20:46:24 +00:00
pbrook 0240ded8bb Correctly initialize Arm CPU for Thumb entry points.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1739 c046a42c-6fe2-441c-8c8c-71466251a162
2006-02-04 19:30:51 +00:00
bellard 048f6b4df7 mips user emulation
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1668 c046a42c-6fe2-441c-8c8c-71466251a162
2005-11-26 18:47:20 +00:00
bellard 15338fd765 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
2005-11-26 11:41:16 +00:00
bellard afce2927aa Arm AT_HWCAP AUXV entry (Paul Brook)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1590 c046a42c-6fe2-441c-8c8c-71466251a162
2005-10-30 20:58:30 +00:00