Skip to content

LLEXT: support detached sections #151785

LLEXT: support detached sections

LLEXT: support detached sections #151785

Triggered via pull request September 27, 2024 13:55
@lyakhlyakh
synchronize #79012
lyakh:llext
Status Failure
Total duration 2m 34s
Artifacts 1

compliance.yml

on: pull_request
Run compliance checks on patch series (PR)
2m 25s
Run compliance checks on patch series (PR)
Fit to window
Zoom out
Zoom in

Annotations

3 errors, 2 warnings, and 5 notices
Run compliance checks on patch series (PR)
Process completed with exit code 2.
Run compliance checks on patch series (PR): Checkpatch.txt#L1
See https://docs.zephyrproject.org/latest/contribute/guidelines.html#coding-style for more details. FUNCTION_ARGUMENTS: function definition argument 'const elf_shdr_t *' should also have an identifier name File:include/zephyr/llext/llext.h Line:143
Run compliance checks on patch series (PR)
Process completed with exit code 1.
FUNCTION_ARGUMENTS: include/zephyr/llext/llext.h#L143
include/zephyr/llext/llext.h:143 function definition argument 'const elf_shdr_t *' should also have an identifier name
Run compliance checks on patch series (PR): ClangFormat.txt#L1
See https://docs.zephyrproject.org/latest/contribute/guidelines.html#clang-format for more details. You may want to run clang-format on this change: -#define R_XTENSA_SLOT0_OP 20 +#define R_XTENSA_SLOT0_OP 20 File:arch/xtensa/core/elf.c Line:23 You may want to run clang-format on this change: - case R_XTENSA_SLOT0_OP: - ; + case R_XTENSA_SLOT0_OP:; uint8_t *opc = (uint8_t *)got_entry; /* Check the opcode: is this an L32R? And does it have to be relocated? */ - if ((opc[0] & 0xf) != 1 || opc[1] || opc[2]) + if ((opc[0] & 0xf) != 1 || opc[1] || opc[2]) { break; + } elf_sym_t rsym; int ret = llext_seek(ldr, ldr->sects[LLEXT_MEM_SYMTAB].sh_offset + - ELF_R_SYM(rel->r_info) * sizeof(elf_sym_t)); + ELF_R_SYM(rel->r_info) * sizeof(elf_sym_t)); if (!ret) { ret = llext_read(ldr, &rsym, sizeof(elf_sym_t)); } - if (ret) + if (ret) { return; + } - uintptr_t link_addr = (uintptr_t)llext_loaded_sect_ptr(ldr, ext, rsym.st_shndx) + - rsym.st_value; + uintptr_t link_addr = + (uintptr_t)llext_loaded_sect_ptr(ldr, ext, rsym.st_shndx) + rsym.st_value; File:arch/xtensa/core/elf.c Line:75 You may want to run clang-format on this change: - if (stt != STT_FUNC && - stt != STT_SECTION && - stt != STT_OBJECT && + if (stt != STT_FUNC && stt != STT_SECTION && stt != STT_OBJECT && File:subsys/llext/llext_link.c Line:195 You may want to run clang-format on this change: - link_addr = llext_find_sym(NULL, - SYM_NAME_OR_SLID(name, sym.st_value)); + link_addr = llext_find_sym(NULL, SYM_NAME_OR_SLID(name, sym.st_value)); File:subsys/llext/llext_link.c Line:230 You may want to run clang-format on this change: - const char *s_name = llext_string(ldr, ext, LLEXT_MEM_SHSTRTAB, - shdr->sh_name); + const char *s_name = + llext_string(ldr, ext, LLEXT_MEM_SHSTRTAB, shdr->sh_name); File:subsys/llext/llext_load.c Line:601
You may want to run clang-format on this change: arch/xtensa/core/elf.c#L23
arch/xtensa/core/elf.c:23 -#define R_XTENSA_SLOT0_OP 20 +#define R_XTENSA_SLOT0_OP 20
You may want to run clang-format on this change: arch/xtensa/core/elf.c#L75
arch/xtensa/core/elf.c:75 - case R_XTENSA_SLOT0_OP: - ; + case R_XTENSA_SLOT0_OP:; uint8_t *opc = (uint8_t *)got_entry; /* Check the opcode: is this an L32R? And does it have to be relocated? */ - if ((opc[0] & 0xf) != 1 || opc[1] || opc[2]) + if ((opc[0] & 0xf) != 1 || opc[1] || opc[2]) { break; + } elf_sym_t rsym; int ret = llext_seek(ldr, ldr->sects[LLEXT_MEM_SYMTAB].sh_offset + - ELF_R_SYM(rel->r_info) * sizeof(elf_sym_t)); + ELF_R_SYM(rel->r_info) * sizeof(elf_sym_t)); if (!ret) { ret = llext_read(ldr, &rsym, sizeof(elf_sym_t)); } - if (ret) + if (ret) { return; + } - uintptr_t link_addr = (uintptr_t)llext_loaded_sect_ptr(ldr, ext, rsym.st_shndx) + - rsym.st_value; + uintptr_t link_addr = + (uintptr_t)llext_loaded_sect_ptr(ldr, ext, rsym.st_shndx) + rsym.st_value;
You may want to run clang-format on this change: subsys/llext/llext_link.c#L195
subsys/llext/llext_link.c:195 - if (stt != STT_FUNC && - stt != STT_SECTION && - stt != STT_OBJECT && + if (stt != STT_FUNC && stt != STT_SECTION && stt != STT_OBJECT &&
You may want to run clang-format on this change: subsys/llext/llext_link.c#L230
subsys/llext/llext_link.c:230 - link_addr = llext_find_sym(NULL, - SYM_NAME_OR_SLID(name, sym.st_value)); + link_addr = llext_find_sym(NULL, SYM_NAME_OR_SLID(name, sym.st_value));
You may want to run clang-format on this change: subsys/llext/llext_load.c#L601
subsys/llext/llext_load.c:601 - const char *s_name = llext_string(ldr, ext, LLEXT_MEM_SHSTRTAB, - shdr->sh_name); + const char *s_name = + llext_string(ldr, ext, LLEXT_MEM_SHSTRTAB, shdr->sh_name);

Artifacts

Produced during runtime
Name Size
compliance.xml
1.31 KB