[Bug target/84908] retpoline weirdness: 7.3.0-1 and 4.8.5-16: with -fPIC: R_X86_64_PC32 against undefined symbol `__x86_indirect_thunk_rax'

hjl.tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Mar 16 22:13:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84908

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to H.J. Lu from comment #3)
> (In reply to Jason Vas Dias from comment #2)
> > Thanks H.J. -
> > 
> > RE:
> > > vDSO isn't compiled with -mindirect-branch=thunk-extern in kernel
> > > 4.16-rc5.  Why isn't it the case for you? 
> > 
> > All I know is ,  when submitting a patched vclock_gettime.c 
> > in which the switch in vdso_clock_gettime() had 6 clauses
> > instead of 5, I received in response a mail from 
> 
> 4.16-rc5 has
> 
> ifdef CONFIG_RETPOLINE
> ifneq ($(RETPOLINE_CFLAGS),)
>   KBUILD_CFLAGS += $(RETPOLINE_CFLAGS) -DRETPOLINE
> endif
> endif
> 
> vDSO isn't compiled with $(KBUILD_CFLAGS).  Why does your kernel do it?
> 

Please try my kernel patch at comment 4.


More information about the Gcc-bugs mailing list