Skip to content

Commit

Permalink
scripts: build: Fix check_init_priorities for ARCMWDT compatibility
Browse files Browse the repository at this point in the history
ARCMWDT linker generates extended section names (
ex.: .rela.z_init_POST_KERNEL40_0_.__init_k_sys_work_q_init).

Default stript is unable to parse such format. Thats why
normalization for extended names was added. It cuts extra part of name.

Signed-off-by: Nikolay Agishev <[email protected]>
  • Loading branch information
Nikolay Agishev committed Aug 30, 2023
1 parent e80f71a commit 2a5b441
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/build/check_init_priorities.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ def _find_defined_devices(self):
if not section.name.startswith(_INIT_SECTION_PREFIX):
continue

sect_name_num_segments = len(section.name.split("."))
if sect_name_num_segments > 3:
section.name = section.name.rsplit(".", sect_name_num_segments - 3)[0]

prio = Priority(section.name)

for rel in section.iter_relocations():
Expand Down

0 comments on commit 2a5b441

Please sign in to comment.