Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1544193ybg; Tue, 2 Jun 2020 12:55:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3TIxwOvScO/smssOM+R4xUj3SB6KB2YX/DNIZuqrRma7DmlEjr74sag7aLp+RtSJ/fqS9 X-Received: by 2002:a17:906:11d9:: with SMTP id o25mr9341821eja.377.1591127759386; Tue, 02 Jun 2020 12:55:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591127759; cv=none; d=google.com; s=arc-20160816; b=J/aMEDqQOLQbBtTmofNhL7SD8hjy1N0+gHWy4lCV93ryf6PwLsdHEfiAjKFeTqUVkz NNROOv5XIB6JUNAHX23XQryndKArKZuIQ4VG2Wiso08iabMzk97HTwG/l/wHpyVlszLs IlgIQ6Wbckxw1xZ3CWe95XO/FcHaKJu7pBMtA3qv4q2G6FhN/gCxoT1dlrasqln/F4GB rPZqhJ4/L3ZVG2xxkBmcYA8EDFGLVcOOvOq/CfW0R6PBeGB91nHdOm0vdTATtvpMi6TT 2H7x9brHKrr7jf8+7UX44My7FfcJtG49/4In5+5uclfnzCPhA9BBCQ1cjI9S1g3WVPLb 3/+g== 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=S91Ejqp9DG8sI+W7uz0fYTQO9gkSUYPLpGPWbGid3N4=; b=Ct0YKDrjChspbapr05frwOFKO6DMPmHMMNtZzhoBF/Whm4tEQ6Nmp+mo1rUkYWwDZc IptU38GM4mWPtbi7dGcN0dUEzuKq9qoERMk7QJdWlB/UHuM7ZKmGm/qJJwPNCudjt8Cx UBnmN8SBhAxilSsw5xYnTzLUqzpylPecRl9n2qiUf9ISSc/V0cXqrKGmzIyMVApxOxH2 VYRH/rf89qlfY9nKCA4fIvOZqs8kkXj2ofM+MlE9Keyqduw1RfNi7UJ1l2pXfZGq465D 1NBwMUGkupB4dcoQa08cVAFl8dFH4u/0WGTs0Bs3pQ97C7QcFWnAVKPDtnm89qC4wbIp lHMw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vmware.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g10si1912741ejk.392.2020.06.02.12.55.36; Tue, 02 Jun 2020 12:55:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vmware.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726842AbgFBTwc (ORCPT + 99 others); Tue, 2 Jun 2020 15:52:32 -0400 Received: from ex13-edg-ou-002.vmware.com ([208.91.0.190]:36862 "EHLO EX13-EDG-OU-002.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728322AbgFBTvA (ORCPT ); Tue, 2 Jun 2020 15:51:00 -0400 Received: from sc9-mailhost3.vmware.com (10.113.161.73) by EX13-EDG-OU-002.vmware.com (10.113.208.156) with Microsoft SMTP Server id 15.0.1156.6; Tue, 2 Jun 2020 12:50:55 -0700 Received: from sc9-mailhost3.vmware.com (unknown [10.200.192.49]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id E925E40BF1; Tue, 2 Jun 2020 12:50:55 -0700 (PDT) From: Matt Helsley To: CC: Josh Poimboeuf , Peter Zijlstra , Steven Rostedt , Sami Tolvanen , Julien Thierry , Kamalesh Babulal , Matt Helsley Subject: [RFC][PATCH v4 12/32] objtool: mcount: Replace MIPS offset types Date: Tue, 2 Jun 2020 12:50:05 -0700 Message-ID: <0d0d88eefe95c90a4fa0bb08cccb15303d2a089d.1591125127.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-002.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 a3fb62e88450..1a39f7acac11 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 reloc const *reloc) { - static Elf_Addr old_r_offset = ~(Elf_Addr)0; - Elf_Addr current_r_offset = reloc->offset; + static unsigned long old_r_offset = ~0UL; + unsigned long current_r_offset = reloc->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