From: "G Portokalidis" <georgios.portokalidis@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Compiling qemu as position-independent code on an x86_64 linux host
Date: Fri, 15 Dec 2006 15:20:24 +0100 [thread overview]
Message-ID: <ef735050612150620s72fd7bc4h7ce26816a9ac0bca@mail.gmail.com> (raw)
In-Reply-To: <ef735050612140410o663a74a7n83b03cab7386290a@mail.gmail.com>
I managed to compile and use qemu as a shared library for the ii386
user space emulator.
I didn't use -fPIC to compile anything and simply generated the lib by
adding something like this in Makefile.target:
$(CC) -shared -Wl,-soname,libqemu.so.0 -o libqemu.so.0 $(LIBOBJS) -lc
I am not sure it should work under all circumstances. It also works
when USE_CODE_COPY is not defined.
On 14/12/06, G Portokalidis <georgios.portokalidis@gmail.com> wrote:
> Hello Paul,
> I also need to use qemu as a shared library, so i was wandering
> whether you had any luck with this?
>
> On 03/11/06, Paul Robinson <Paul.Robinson@scisys.co.uk> wrote:
> >
> >
> >
> > Hi guys,
> >
> > I'm trying to use parts of qemu in an application that must be compiled as a
> > shared library (i.e. a .so file).
> > The code must be compiled with the -fPIC option otherwise the linker refuses
> > to create a .so file
> > but doing this causes dyngen to stop with the error:
> > ../dyngen -o op.h op.o
> > dyngen: unsupported X86_64 relocation (9)
> >
> > In dyngen-exec.h, if I change
> > extern int __op_param1, __op_param2, __op_param3;
> > to
> > static int __op_param1, __op_param2, __op_param3;
> > then dyngen stops with
> > dyngen: unsupported X86_64 relocation (4)
> >
> > I suspect that I need to resort to assembly language (as has been done for
> > alpha hosts).
> >
> > My question is:
> > Has anyone already done this ? (so I don't have to re-invent the wheel).
> >
> > The nearest I've found so far is Johannes Schindelin's "Porting QEMU to [a]
> > new CPU" guide.
> >
> > Regards,
> > Paul R.
> > _______________________________________________
> > Qemu-devel mailing list
> > Qemu-devel@nongnu.org
> > http://lists.nongnu.org/mailman/listinfo/qemu-devel
> >
> >
> >
>
next prev parent reply other threads:[~2006-12-15 14:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Acb/dAolzRfkXTlURPONQ+3dZHSUZA==>
2006-11-03 18:15 ` [Qemu-devel] Compiling qemu as position-independent code on an x86_64 linux host Paul Robinson
2006-11-03 21:42 ` Paul Brook
2006-11-04 4:21 ` Daniel Jacobowitz
2006-12-14 12:10 ` G Portokalidis
2006-12-15 14:20 ` G Portokalidis [this message]
2006-12-14 12:44 Paul Robinson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ef735050612150620s72fd7bc4h7ce26816a9ac0bca@mail.gmail.com \
--to=georgios.portokalidis@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).