NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: qemu-i386 segfault



Hi Martin,

I'm doing something wrong then. I compile hello world with:

clang -static -O2 -m32 -o hello32 hello.c

for static and for dynamic linking like

clang -O2 -m32 -o hello32 hello.c

ldd (when compiled with dynamic linking) and file give correct results for the output always.

Then I launch qemu as:

qemu-i386 -L /usr/lib/i386 -bsd NetBSD hello32

and I get a segfault. If I check the core dump file with gdb, then it says:

Program terminated with signal SIGSEGV, segmentation fault.
#0 0x<address> in strchr() from /usr/lib/libc.so.12

Shouldn't I see there /usr/lib/i386/libc?

Thanks & regards,
r0ller




-------- Eredeti levél --------

Feladó: Martin Husemann <
martin%duskware.de@localhost
>

Tárgy: Re: qemu-i386 segfault

Címzett: r0ller <
r0ller%freemail.hu@localhost
>


On Tue, Dec 20, 2016 at 03:52:52PM +0100, r0ller wrote:
> Hi Martin,
>
> That works of course:) The point is to get it done via qemu-i386 and
> that's what doesn't work. But as I mentioned it may require
> 32bit libc which I currently don't have at hand so I'll need to
> get it from an i386 NetBSD install.

Well, it works and uses a 32bit libc.

try:

ldd a.out

For me it says:

a.out:
-lc.12 => /usr/lib/i386/libc.so.12


If you just want to test qemu, why not link statically?

Martin

Home | Main Index | Thread Index | Old Index