Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp910712ybb; Fri, 10 Apr 2020 12:39:08 -0700 (PDT) X-Google-Smtp-Source: APiQypJqA0j4ORlA0rUFWmk00ccly1Qpc5dtceB9C8Bjyp9ay5jvpGm9j4x4IEQ+vAlH+1HadA2O X-Received: by 2002:a37:4a88:: with SMTP id x130mr5631504qka.247.1586547548723; Fri, 10 Apr 2020 12:39:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586547548; cv=none; d=google.com; s=arc-20160816; b=r0jQxvxwXmQrCRpB5n4v3Rv6Wgx0wLVqesN8fgDS1ndjiS899NpcyiYL7ICOenrrMO MGMYVSa/Vg8n/USNVUABgrVswamq6kX5bF6wcuvlwhYgqfiF5AqHN3aDT+6NzZaFbce2 VibTA34jAlELRWlVwa4uET4bugy6QhuWg/TzCLBmFoiS4RENfeIOs4dbXey4iw6hJDxa ltnl5J5zZJILnSREZRh0FAEqu8jfGtoWYifY1dLM8BGXjRiqyjzo+gsPzZGk93C8zDWa NbsfaQq2FMQOObVNS/OrqtLeQFDKkn1cszE9gUx4uMJZ+C59yoNkuOB2Z0Hhk2K54Lz9 2BrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=IJunwLM3NX/OnUmPE96oB72+Y8TRgrWbgoGi7P+D/2o=; b=DbKiw9rL27EVnj7ZSH1i3rjiTV6LwgxSSW1l0Y9ZvgDfYyfvLg8oN9SUHhBqbAW+C+ pctlAcz11g6tZwebo488lXmkHFhYZ43tZrg9W8E1LNUlztPHH59VgrKZz0l1upsunQfn Hz8XnWd+93xR7YEgE97LP6toncwEClZKbIKHYwP2ICJNJf3Ve8//4KbOA7s8X3g/dmWp EglLyKVFIHRCiLOtTq9H2C3p+ghzYukLp2+LgMSg9K8SXNKsm9NfOyhdOp872vOw4VSA 0Oegoi4H6WCjIzHXKaeRWOnEIedr14xIBC6dW/79NB3tKq9uJHOCTlhXh9QtFz19RVte s/Vw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=vmware.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k6si1566646qvq.144.2020.04.10.12.38.54; Fri, 10 Apr 2020 12:39:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=vmware.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726729AbgDJTht (ORCPT + 99 others); Fri, 10 Apr 2020 15:37:49 -0400 Received: from ex13-edg-ou-001.vmware.com ([208.91.0.189]:28684 "EHLO EX13-EDG-OU-001.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726646AbgDJThs (ORCPT ); Fri, 10 Apr 2020 15:37:48 -0400 Received: from sc9-mailhost3.vmware.com (10.113.161.73) by EX13-EDG-OU-001.vmware.com (10.113.208.155) with Microsoft SMTP Server id 15.0.1156.6; Fri, 10 Apr 2020 12:37:43 -0700 Received: from sc9-mailhost3.vmware.com (unknown [10.166.69.226]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id D9E6F40BC0; Fri, 10 Apr 2020 12:37:47 -0700 (PDT) From: Matt Helsley To: CC: Josh Poimboeuf , Peter Zijlstra , Julien Thierry , Ingo Molnar , Steven Rostedt , Miroslav Benes , Matt Helsley Subject: [RFC][PATCH 17/36] objtool: mcount: Replace MIPS offset types Date: Fri, 10 Apr 2020 12:35:40 -0700 Message-ID: <0a1ccd4cc3fbf0dfb0b9b912d9af5d5ee759f028.1586468801.git.mhelsley@vmware.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII Received-SPF: None (EX13-EDG-OU-001.vmware.com: mhelsley@vmware.com does not designate permitted sender hosts) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace MIPS is_fake_mcount code using Elf_Addr with unsigned long for the offsets. This is consistent with the way that objtool more generally treats offsets and removes the last use of the Elf_Addr wrapper. Signed-off-by: Matt Helsley --- tools/objtool/recordmcount.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tools/objtool/recordmcount.h b/tools/objtool/recordmcount.h index 9bba41ee2db2..f99851034fa8 100644 --- a/tools/objtool/recordmcount.h +++ b/tools/objtool/recordmcount.h @@ -28,7 +28,6 @@ #undef has_rel_mcount #undef tot_relsize #undef do_func -#undef Elf_Addr #undef Elf_Ehdr #undef Elf_Shdr #undef Elf_Rel @@ -53,7 +52,6 @@ # define fn_is_fake_mcount fn_is_fake_mcount64 # define MIPS_is_fake_mcount MIPS64_is_fake_mcount # define mcount_adjust mcount_adjust_64 -# define Elf_Addr Elf64_Addr # define Elf_Ehdr Elf64_Ehdr # define Elf_Shdr Elf64_Shdr # define Elf_Rel Elf64_Rel @@ -77,7 +75,6 @@ # define fn_is_fake_mcount fn_is_fake_mcount32 # define MIPS_is_fake_mcount MIPS32_is_fake_mcount # define mcount_adjust mcount_adjust_32 -# define Elf_Addr Elf32_Addr # define Elf_Ehdr Elf32_Ehdr # define Elf_Shdr Elf32_Shdr # define Elf_Rel Elf32_Rel @@ -129,11 +126,11 @@ static int mcount_adjust = 0; static int MIPS_is_fake_mcount(struct rela const *rela) { - static Elf_Addr old_r_offset = ~(Elf_Addr)0; - Elf_Addr current_r_offset = rela->offset; + static unsigned long old_r_offset = ~0UL; + unsigned long current_r_offset = rela->offset; int is_fake; - is_fake = (old_r_offset != ~(Elf_Addr)0) && + is_fake = (old_r_offset != ~0UL) && (current_r_offset - old_r_offset == MIPS_FAKEMCOUNT_OFFSET); old_r_offset = current_r_offset; -- 2.20.1