From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Matt Helsley <mhelsley@vmware.com>
Cc: linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Steven Rostedt <rostedt@goodmis.org>,
Julien Thierry <jthierry@redhat.com>
Subject: Re: [PATCH 1/2] objtool: Rename rela to reloc
Date: Fri, 29 May 2020 18:22:00 -0500 [thread overview]
Message-ID: <20200529232200.xhjaemclbg2uqrih@treble> (raw)
In-Reply-To: <39f183f3acec8a758939dcbede7908a7455be8b8.1590785960.git.mhelsley@vmware.com>
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 :-)
I'll run these through testing and merge.
--
Josh
next prev parent reply other threads:[~2020-05-29 23:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-29 21:01 [PATCH 0/2] objtool: Support implicit addend relocations Matt Helsley
2020-05-29 21:01 ` [PATCH 1/2] objtool: Rename rela to reloc Matt Helsley
2020-05-29 23:22 ` Josh Poimboeuf [this message]
2020-05-30 0:52 ` Matt Helsley
2020-06-01 15:09 ` Josh Poimboeuf
2020-05-29 21:01 ` [PATCH 2/2] objtool: Add support for relocations without addends Matt Helsley
2020-06-02 7:36 ` Julien Thierry
2020-06-02 16:12 ` Kamalesh Babulal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200529232200.xhjaemclbg2uqrih@treble \
--to=jpoimboe@redhat.com \
--cc=jthierry@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhelsley@vmware.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®