From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Pohlack Subject: Re: [PATCH v2 3/5] x86/mm: override stored file names for multiply built sources Date: Mon, 26 Oct 2015 15:34:36 +0100 Message-ID: <562E39FC.3000409@amazon.com> References: <562E12E802000078000AE785@prv-mh.provo.novell.com> <562E21E802000078000AE8A7@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Zqirt-0000kX-Bv for xen-devel@lists.xenproject.org; Mon, 26 Oct 2015 14:35:25 +0000 In-Reply-To: <562E21E802000078000AE8A7@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , xen-devel Cc: George Dunlap , Andrew Cooper , Keir Fraser , Tim Deegan List-Id: xen-devel@lists.xenproject.org On 26.10.2015 12:51, Jan Beulich wrote: > To make it possible to tell apart the static symbols therein, use their > object file names instead of their source ones. > > Signed-off-by: Jan Beulich > --- > v2: Introduce __OBJECT_FILE__. > > --- a/xen/Rules.mk > +++ b/xen/Rules.mk > @@ -42,10 +42,10 @@ ALL_OBJS-y += $(BASEDIR)/x > ALL_OBJS-y += $(BASEDIR)/arch/$(TARGET_ARCH)/built_in.o > ALL_OBJS-$(x86) += $(BASEDIR)/crypto/built_in.o > > -CFLAGS += -fno-builtin -fno-common > +CFLAGS += -nostdinc -fno-builtin -fno-common > CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith > CFLAGS += -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h > -CFLAGS += -nostdinc > +CFLAGS += '-D__OBJECT_FILE__="$@"' > > CFLAGS-$(XSM_ENABLE) += -DXSM_ENABLE > CFLAGS-$(FLASK_ENABLE) += -DFLASK_ENABLE > --- a/xen/arch/x86/mm/guest_walk.c > +++ b/xen/arch/x86/mm/guest_walk.c > @@ -21,6 +21,9 @@ > * along with this program; If not, see . > */ > > +/* Allow uniquely identifying static symbols in the 3 generated objects. */ > +asm(".file \"" __OBJECT_FILE__ "\""); > + I wonder if using symlinks to the C files and compiling those would be a more obvious way to set the file symbol to something unique. Martin Amazon Development Center Germany GmbH Krausenstr. 38 10117 Berlin Geschaeftsfuehrer: Dr. Ralf Herbrich, Christian Schlaeger Ust-ID: DE289237879 Eingetragen am Amtsgericht Charlottenburg HRB 149173 B