Skip to content

Commit

Permalink
zephyr: wrapper: remove dead smex code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
LaurentiuM1234 committed Sep 18, 2024
1 parent 1fe942f commit 30150d9
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions zephyr/wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,29 +167,8 @@ unsigned int _xtos_ints_off(unsigned int mask)
return 0;
}

/* Zephyr redefines log_message() and mtrace_printf() which leaves
* 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.
*/
static inline const void *smex_placeholder_f(void)
{
_DECLARE_LOG_ENTRY(LOG_LEVEL_DEBUG,
"placeholder so .static_log.X are not all empty",
_TRACE_INV_CLASS, 0);

return &log_entry;
}

/* Need to actually use the function and export something otherwise the
* compiler optimizes everything away.
*/
const void *_smex_placeholder;

int task_main_start(struct sof *sof)
{
_smex_placeholder = smex_placeholder_f();

/* init default audio components */
sys_comp_init(sof);

Expand Down

0 comments on commit 30150d9

Please sign in to comment.