From: Sergey Shtylyov <email@example.com> To: Steven Rostedt <firstname.lastname@example.org>, <email@example.com> Cc: Ingo Molnar <firstname.lastname@example.org>, Andrew Morton <email@example.com>, Yoshinori Sato <firstname.lastname@example.org>, Rich Felker <email@example.com>, <firstname.lastname@example.org> Subject: Re: [for-next][PATCH 10/12] ftrace/sh: Add arch_ftrace_ops_list_func stub to have compressed image still link Date: Wed, 27 Oct 2021 11:58:31 +0300 [thread overview] Message-ID: <email@example.com> (raw) In-Reply-To: <firstname.lastname@example.org> On 26.10.2021 19:23, Steven Rostedt wrote: > From: "email@example.com" <firstname.lastname@example.org> Collective author, really? :-) > Using the linker script to fix an issue where some archs call the > function tracer with just the ip (instruction pointer) and pip (parent > instruction pointer) where as more up to date archs also pass in the > associated ftrace_ops and the ftrace_regs pointer, the generic code > will be called either with two parameters or four. To avoid any C > undefined behavior of calling two parameters to four or four to two > parameter function, two functions are created, where a preprocessor > macro uses the one that matches the architecture. As the function > pointers for them may be different, a typecast is used. But this > triggers issues with newer compilers that will fail due to -Werror. > > A linker trick is now used to map the generic function to the function > that is used (note the generic function is only used to set the default > function callback). The linker trick defines ftrace_ops_list_func (the > generic function) to arch_ftrace_ops_list_func (the arch defined one). > > Link: https://email@example.com/ > > But this fails sh arch because their linker script is included in their > compressed image that does not define arch_ftrace_ops_list_func at all > > sh4-linux-ld:arch/sh/boot/compressed/../../kernel/vmlinux.lds:32: undefined symbol `arch_ftrace_ops_list_func' referenced in expression > > Included a stub by that name in the misc.c to allow the code to > compile and link, even though it's not used. > > This is similar to what was done for ftrace_stub: > > b83b43ffc6e4b ("fgraph: Fix function type mismatches of > ftrace_graph_return using ftrace_stub") > > Link: https://firstname.lastname@example.org > > Cc: Yoshinori Sato <email@example.com> > Cc: Rich Felker <firstname.lastname@example.org> > Cc: email@example.com > Signed-off-by: Steven Rostedt (VMware) <firstname.lastname@example.org> [...] MBR, Sergey
next prev parent reply other threads:[~2021-10-27 8:58 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <email@example.com> 2021-10-26 16:23 ` Steven Rostedt 2021-10-27 8:58 ` Sergey Shtylyov [this message] 2021-10-27 12:01 ` Steven Rostedt
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 \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --subject='Re: [for-next][PATCH 10/12] ftrace/sh: Add arch_ftrace_ops_list_func stub to have compressed image still link' \ /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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).