From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750985AbdBBHQG (ORCPT ); Thu, 2 Feb 2017 02:16:06 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35158 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750896AbdBBHQF (ORCPT ); Thu, 2 Feb 2017 02:16:05 -0500 Date: Thu, 2 Feb 2017 08:16:00 +0100 From: Ingo Molnar To: Nicolas Iooss Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/1] x86, relocs: add printf attribute to die() Message-ID: <20170202071600.GC2368@gmail.com> References: <20161218194752.32367-1-nicolas.iooss_linux@m4x.org> <20170201090455.GA23627@gmail.com> <53bd203b-c006-fb7c-0bd6-54a6a926fd1e@m4x.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <53bd203b-c006-fb7c-0bd6-54a6a926fd1e@m4x.org> 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 * 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