lkml.org 
[lkml]   [2022]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 1/3] objtool: Move common code to utils.c
> +#define sym_for_each_insn(file, sym, insn)                              \
> + for (insn = find_insn(file, sym->sec, sym->offset); \
> + insn && &insn->list != &file->insn_list && \
> + insn->sec == sym->sec && \
> + insn->offset < sym->offset + sym->len; \
> + insn = list_next_entry(insn, list))
> +
> +#endif /* UTILS_H */

Since you include <objtool/utils.h> in check.c, you can remove the
definition of sym_for_each_insn() macro from check.c as well.

I wonder if it would make sense to move all these helper functions to
utils.c and utils.h. Might be connected to what Josh wrote about his work
on objtool interface.

Regards
Miroslav

\
 
 \ /
  Last update: 2022-03-23 19:03    [W:0.258 / U:1.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site