Re: [PATCH] powerpc/booke: Avoid link stack corruption in several places

2021-08-23 Thread Segher Boessenkool
On Mon, Aug 23, 2021 at 07:05:38PM +0200, Christophe Leroy wrote: > Le 23/08/2021 à 17:58, Segher Boessenkool a écrit : > >On Mon, Aug 23, 2021 at 07:53:01AM +, Christophe Leroy wrote: > >> /* Be careful, this will clobber the lr register. */ > >> #define LOAD_REG_ADDR_PIC(reg, name)

Re: [PATCH] powerpc/booke: Avoid link stack corruption in several places

2021-08-23 Thread Christophe Leroy
Le 23/08/2021 à 17:58, Segher Boessenkool a écrit : On Mon, Aug 23, 2021 at 07:53:01AM +, Christophe Leroy wrote: /* Be careful, this will clobber the lr register. */ #define LOAD_REG_ADDR_PIC(reg, name) \ - bl 0f; \ + bcl

Re: [PATCH] powerpc/booke: Avoid link stack corruption in several places

2021-08-23 Thread Segher Boessenkool
On Mon, Aug 23, 2021 at 07:53:01AM +, Christophe Leroy wrote: > /* Be careful, this will clobber the lr register. */ > #define LOAD_REG_ADDR_PIC(reg, name) \ > - bl 0f; \ > + bcl 20,31,0f\ > 0: mflrreg;