[Top][All Lists]

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

Re: [Qemu-devel] [RFC PATCH 02/34] tcg+qom: QOMify core CPU defintions

From: Peter Maydell
Subject: Re: [Qemu-devel] [RFC PATCH 02/34] tcg+qom: QOMify core CPU defintions
Date: Mon, 11 May 2015 11:43:10 +0100

On 11 May 2015 at 07:29, Peter Crosthwaite <address@hidden> wrote:
> These definitions are defined per-target and globall linked/defined
> between core code and target-foo. QOMify them. Provide weakly linked
> conditional default implementations for the non-qomified global fns.
> This means converted architectures which install a QOM hook do not need
> to define a function for the old globals even the common code expects
> to link against something.
> +void __attribute__((weak)) gen_intermediate_code(CPUArchState *env,
> +                                                 struct TranslationBlock *tb)
> +{
> +    abort();
> +}

__attribute__((weak)) doesn't work on all the platforms we need
to support, I'm afraid. The approach we've settled on instead
is to provide stub functions in source files in the stubs/ directory
which get built into a libqemustub.a library; then the linker will
fish out the .o files from that as needed to satisfy otherwise
missing symbols.

-- PMM

reply via email to

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