Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp991733ybm; Fri, 29 May 2020 17:54:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyj4h5fGIv+wXV4KxBtFzFeVzcCcOPX/LpQpIILqQH8P/l3RD7q9WqtU4Ng1oOcvq7+4dgu X-Received: by 2002:a17:906:b24f:: with SMTP id ce15mr10060458ejb.59.1590800090552; Fri, 29 May 2020 17:54:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590800090; cv=none; d=google.com; s=arc-20160816; b=BwZfN3IuwU8I1DsQ5nIhHHGQfkS9MV/ZBzBpH3XH7pYCPYMT5zEeqgTLDFjJuXRB42 e3/uZfMwKWtQ6VxXAdXw8H29QUiomCmg7Z5C2Eudf44BO2yMFctUxv1h22l5WdPfhLxD SIEBvflK0cbkrDK6vFAIKt7sfLVw2LoOX3GvTQcXCkdbeFLk1YpqoUI8I1317KTY1KWH 5xVvrNBE1E26iAwjyMqUcx/NBibSVqkTjWbjPI9oXr1UHB+mlLJwj8n9TVK9Ex1WOmfD ZKIjP0DmRC60eRwZBUApDcOuzj3+jtz9WIttm3+ZG0HtZr6YHknf0Zch7nxq38YTTTxw WF2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date; bh=/CtkSyJW1jCkYSgaP1ctVTYiafSZiXe9AGFrY9N5JQ4=; b=NVqYkd9T1DNwEURPfW2RFDa533KkC8EcvW9oqmBlRzqRhh4vGn60yy8a0PRItTu5FG Gu3HriVufxW4lsk0XXg8qoc5vmzN7ORlf/LQDWtJf09YeywgA36puP0JqkAiAMJ+hYhS jyTnR/6ukszGlHlT/AtzGH7vE7BivFKqvBThT+zUMZ7IcYz8RWVccxMJch0iAl2TDfUx MJ3H4J0OQIVef9D/sfdbnie+ePLTIDDexCN2ITeAWQmJVl7E8bZYBeogh5GpR34+d5bi VdM11590thrBFDXORbe3mP4pwR825+LVSbUwkZn5mMJzcRJrORZ3d5+O6YrpUtuGXURS DiWw== 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 cm22si1798384edb.370.2020.05.29.17.54.27; Fri, 29 May 2020 17:54:50 -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 S1728542AbgE3Awp (ORCPT + 99 others); Fri, 29 May 2020 20:52:45 -0400 Received: from ex13-edg-ou-001.vmware.com ([208.91.0.189]:35537 "EHLO EX13-EDG-OU-001.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728297AbgE3Awp (ORCPT ); Fri, 29 May 2020 20:52:45 -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, 29 May 2020 17:52:40 -0700 Received: from localhost (unknown [10.200.192.41]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id EF45440996; Fri, 29 May 2020 17:52:44 -0700 (PDT) Date: Fri, 29 May 2020 17:52:44 -0700 From: Matt Helsley To: Josh Poimboeuf CC: , Peter Zijlstra , Steven Rostedt , Julien Thierry Subject: Re: [PATCH 1/2] objtool: Rename rela to reloc Message-ID: <20200530005244.GZ9040@rlwimi.vmware.com> Mail-Followup-To: Matt Helsley , Josh Poimboeuf , linux-kernel@vger.kernel.org, Peter Zijlstra , Steven Rostedt , Julien Thierry References: <39f183f3acec8a758939dcbede7908a7455be8b8.1590785960.git.mhelsley@vmware.com> <20200529232200.xhjaemclbg2uqrih@treble> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200529232200.xhjaemclbg2uqrih@treble> 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 On Fri, May 29, 2020 at 06:22:00PM -0500, Josh Poimboeuf wrote: > On Fri, May 29, 2020 at 02:01:13PM -0700, Matt Helsley wrote: > > Before supporting additional relocation types rename the relevant > > types and functions from "rela" to "reloc". This work be done with > > the following regex: > > > > sed -i -e 's/struct rela/struct reloc/g' \ > > -e 's/\([_\*]\)rela\(s\{0,1\}\)/\1reloc\2/g' \ > > -e 's/tmprela\(s\{0,1\}\)/tmpreloc\1/g' \ > > -e 's/relasec/relocsec/g' \ > > -e 's/rela_list/reloc_list/g' \ > > -e 's/rela_hash/reloc_hash/g' \ > > -e 's/add_rela/add_reloc/g' \ > > -e 's/rela->/reloc->/g' \ > > -e '/rela[,\.]/{ s/\([^\.>]\)rela\([\.,]\)/\1reloc\2/g ; }' \ > > -e 's/rela =/reloc =/g' \ > > -e 's/relas =/relocs =/g' \ > > -e 's/relas\[/relocs[/g' \ > > -e 's/relaname =/relocname =/g' \ > > -e 's/= rela\;/= reloc\;/g' \ > > -e 's/= relas\;/= relocs\;/g' \ > > -e 's/= relaname\;/= relocname\;/g' \ > > -e 's/, rela)/, reloc)/g' \ > > -e 's/, relaname/, relocname/g' \ > > -e 's/sec->rela/sec->reloc/g' \ > > -e 's/(\(!\{0,1\}\)rela/(\1reloc/g' \ > > arch.h \ > > arch/x86/decode.c \ > > check.c \ > > check.h \ > > elf.c \ > > elf.h \ > > orc_gen.c \ > > special.c \ > > Holy regex! Thanks for doing that :-) So I was rebasing my future patches and I found a few spots where objtool warning strings and code comments weren't fixed-up to consistent. Here's the new, complete regex -- it includes the original changes and the missed bits (e.g. note the new substitution for @rela comments): sed -i -e 's/struct rela/struct reloc/g' \ -e 's/\([_\*]\)rela\(s\{0,1\}\)/\1reloc\2/g' \ -e 's/tmprela\(s\{0,1\}\)/tmpreloc\1/g' \ -e 's/relasec/relocsec/g' \ -e 's/rela_list/reloc_list/g' \ -e 's/rela_hash/reloc_hash/g' \ -e 's/add_rela/add_reloc/g' \ -e 's/rela->/reloc->/g' \ -e '/rela[,\.]/{ s/\([^\.>]\)rela\([\.,]\)/\1reloc\2/g ; }' \ -e 's/rela =/reloc =/g' \ -e 's/relas =/relocs =/g' \ -e 's/relas\[/relocs[/g' \ -e 's/relaname =/relocname =/g' \ -e 's/= rela\;/= reloc\;/g' \ -e 's/= relas\;/= relocs\;/g' \ -e 's/= relaname\;/= relocname\;/g' \ -e 's/, rela)/, reloc)/g' \ -e 's/\([ @]\)rela\([ "]\)/\1reloc\2/g' \ -e 's/ rela$/ reloc/g' \ -e 's/, relaname/, relocname/g' \ -e 's/sec->rela/sec->reloc/g' \ -e 's/(\(!\{0,1\}\)rela/(\1reloc/g' \ arch.h \ arch/x86/decode.c \ check.c \ check.h \ elf.c \ elf.h \ orc_gen.c \ special.c If you want to fixup this commit you could just re-run the regex after applying it but before applying the next commit. Cheers, -Matt Helsley