smex and trace sections cleanup#9491
Conversation
As of commit 0868b1f ("zephyr: Remove legacy logging artifacts") smex is no longer included in Zephyr builds. As such, there's no need to include a ".static_log_entries" ELF section in the Zephyr ELFs. This was originally added via commit ca6e3c3 ("zephyr: add smex_placeholder()"). Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
If trace is disabled (i.e: CONFIG_TRACE=n) there's no need to place the trace context inside a special linker section (i.e: .trace_ctx). This spares platforms that don't use trace from having to include the .trace_ctx section inside their linker scripts. Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
There was a problem hiding this comment.
wrapper.c change makes sense to me, approved.
trace.h change not reviewed.
| * totally empty the .static_log_entries ELF sections for the | ||
| * sof-logger. This makes smex fail. Define at least one such section to | ||
| * fix the build when sof-logger is not used. | ||
| */ |
There was a problem hiding this comment.
should sof-logger -l support also be removed?
There was a problem hiding this comment.
not sure that's a good idea. As far as I can tell there's still some AMD (?) platforms and imx8m using XTOS. I don't have the toolchain right now to test but smex should still be included in those builds. AFAICT removing -l from the logger would break the only way of logging for those platforms (as you need the ldc file for it to work).
CC: @marc-hb please do correct me if I'm wrong here. Haven't really used sof-logger in a while :(
LE: just noticed #9421, sorry for any unnecessary recent tags/review requests :(
There was a problem hiding this comment.
Excellent, thanks @LaurentiuM1234 ! There's indeed no need for this, we have a rich toolset to log with Zephyr (including dictionary and mipi syst), so need to go back when Zephyr is used.
This series removes the need to add ".trace_ctx" and ".static_log_entries" linker sections for Zephyr platforms not using trace.