qemu-devel
[Top][All Lists]
Advanced

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

Re: [Fwd] Issue 25164 in oss-fuzz: qemu: Fuzzing build failure


From: Paolo Bonzini
Subject: Re: [Fwd] Issue 25164 in oss-fuzz: qemu: Fuzzing build failure
Date: Fri, 28 Aug 2020 21:41:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0

On 28/08/20 20:33, Alexander Bulekov wrote:
>> Create a fuzz.cmd that includes the correct path to fuzz.ld in the
>> source tree (using configure_file) and pass this file to the linker
>> using @tests/libqtest/fuzz/fuzz.cmd in link_args (and also
>> link_depends). See libblock and block for an example.
> I'm not sure whether this solves the problem that the linker-script is
> placed in between --start-group and --end-group arguments.  It seems
> that no matter what I do to specify the linker script with -Wl,-T, and
> link_args, the flag ends up placed between --start-group and --end-group
> due to some parsing that meson does in
> mesonbuild/compilers/mixins/clike.py.

Looks like you need to ensure that the link_args for -T and -wrap come
before everything else.

For example:

-Wl,--whole-archive qom/libqom.fa io/libio.fa crypto/libcrypto.fa
authz/libauthz.fa hw/core/libhwcore.fa libblock.fa libqmp.fa
chardev/libchardev.fa -Wl,--no-whole-archive -Wl,--warn-common
-Wl,-z,relro -Wl,-z,now -m64 -fstack-protector-strong
migration/libmigration.fa -Wl,--start-group libqemuutil.a qom/libqom.fa
io/libio.fa crypto/libcrypto.fa authz/libauthz.fa hw/core/libhwcore.fa
libblock.fa libqmp.fa chardev/libchardev.fa @block.syms @qemu.syms

libqemuutil.a is what triggers --start-group.  So if you can add them
using add_project_link_arguments it should work.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]