Re: [PATCH 1/5] objtool: Change REG_SP_INDIRECT

From: Peter Zijlstra
Date: Wed Feb 03 2021 - 09:50:02 EST


On Wed, Feb 03, 2021 at 08:42:15AM -0600, Josh Poimboeuf wrote:
> On Wed, Feb 03, 2021 at 01:02:23PM +0100, Peter Zijlstra wrote:
> > Currently REG_SP_INDIRECT is unused but means (%rsp + offset),
> > change it to mean (%rsp) + offset.
> >
> > This is somewhat unfortunate, since REG_BP_INDIRECT is used (by DRAP)
> > and thus needs to retain the current (%rbp + offset).
>
> Offset is going to be zero, should it not work either way?

For DRAP? I couldn't tell in a hurry. I'm ever quite clear on how DRAP
works. Some day, when I figure it out, i'll write a comment.

Anyway, if it's always 0 for DRAP, then yes, I'll change both.