On Mon, Jan 8, 2018 at 9:18 AM, Michael Matz <m...@suse.de> wrote: > Hi, > > On Mon, 8 Jan 2018, H.J. Lu wrote: > >> On Mon, Jan 8, 2018 at 4:00 AM, Jakub Jelinek <ja...@redhat.com> wrote: >> > On Mon, Jan 08, 2018 at 03:55:52AM -0800, H.J. Lu wrote: >> >> > I'm wondering whether thunk creation can be a good target-independent >> >> > generalization? I guess >> >> > we can emit the function declaration without direct writes to >> >> > asm_out_file? And the emission >> >> > of function body can be potentially a target hook? >> >> > >> >> > What about emitting body of the function with RTL instructions instead >> >> > of direct assembly write? >> >> > My knowledge of RTL is quite small, but maybe it can bring some >> >> > generalization and reusability >> >> > for other targets? >> >> >> >> Thunks are x86 specific and they are created the same way as 32-bit PIC >> >> thunks. >> >> I don't see how a target hook is used. >> > >> > Talking about PIC thunks, those have I believe . character in their >> > symbols, >> > so that they can't be confused with user functions. Any reason these >> > retpoline thunks aren't? >> > >> >> They used to have '.'. It was changed at the last minute since kernel >> needs to export them as regular symbols. > > That can be done via asm aliases or direct assembler use; the kernel > doesn't absolutely have to access them via C compatible symbol names. >
Hi David, Can you comment on this? -- H.J.