From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751853AbdBBTaY (ORCPT ); Thu, 2 Feb 2017 14:30:24 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:36580 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751806AbdBBTaW (ORCPT ); Thu, 2 Feb 2017 14:30:22 -0500 Date: Thu, 2 Feb 2017 20:30:17 +0100 From: Ingo Molnar To: hpa@zytor.com Cc: Nicolas Iooss , Thomas Gleixner , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/1] x86, relocs: add printf attribute to die() Message-ID: <20170202193017.GA31326@gmail.com> References: <20161218194752.32367-1-nicolas.iooss_linux@m4x.org> <20170201090455.GA23627@gmail.com> <53bd203b-c006-fb7c-0bd6-54a6a926fd1e@m4x.org> <20170202071600.GC2368@gmail.com> <59A0972A-86C0-42E6-9303-0328F0027674@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <59A0972A-86C0-42E6-9303-0328F0027674@zytor.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * hpa@zytor.com wrote: > On February 1, 2017 11:16:00 PM PST, Ingo Molnar wrote: > > > >* Nicolas Iooss wrote: > > > >> With %Ld, my compiler (gcc 6.3.1 on x86_64) complains: > >> > >> arch/x86/tools/relocs.c:400:7: error: format ‘%Ld’ expects argument > >of > >> type ‘long long int’, but argument 2 has type ‘Elf64_Off {aka long > >> unsigned int}’ [-Werror=format=] > > > >How did it pick up that type as an 'unsigned long'? We have: > > > > include/uapi/linux/elf.h:typedef __u64 Elf64_Off; > > > >Even user-space has it as a pure 64-bit type: > > > > /usr/include/elf.h:typedef uint64_t Elf64_Off; > > > >Thanks, > > > > Ingo > > uint64_t is unsigned long on x86-64. Sight, which is a big, lame mistake, because it forces such crap like "PRIu64" uglies... Thanks, Ingo