From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YrlBP-0006Dy-93 for qemu-devel@nongnu.org; Mon, 11 May 2015 06:43:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YrlBL-0002Ol-Ju for qemu-devel@nongnu.org; Mon, 11 May 2015 06:43:35 -0400 Received: from mail-ie0-f171.google.com ([209.85.223.171]:32779) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YrlBL-0002Od-Fe for qemu-devel@nongnu.org; Mon, 11 May 2015 06:43:31 -0400 Received: by iepj10 with SMTP id j10so101075775iep.0 for ; Mon, 11 May 2015 03:43:31 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <6920fa40d097d15d0cfcaf63c26b6325ee5edc46.1431322749.git.crosthwaite.peter@gmail.com> References: <6920fa40d097d15d0cfcaf63c26b6325ee5edc46.1431322749.git.crosthwaite.peter@gmail.com> From: Peter Maydell Date: Mon, 11 May 2015 11:43:10 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [RFC PATCH 02/34] tcg+qom: QOMify core CPU defintions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: Edgar Iglesias , Soren Brinkmann , QEMU Developers , =?UTF-8?Q?Andreas_F=C3=A4rber?= , Richard Henderson On 11 May 2015 at 07:29, Peter Crosthwaite 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