Skip to content

Commit

Permalink
[DRAFT] align .bss
Browse files Browse the repository at this point in the history
When checking whether .bss immediately follows .data check alignment.
Once ELF section information has been made persistent in Zephyr, we
will switch to using correct alignment.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
  • Loading branch information
lyakh committed Nov 6, 2024
1 parent 4bbe035 commit 9ccb67a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/library_manager/llext_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ static int llext_manager_load_module(uint32_t module_id, const struct sof_man_mo
/* .bss directly in front of writable data and properly aligned, prepend */
va_base_data = bss_addr;
data_size += bss_size;
} else if ((uintptr_t)bss_addr == (uintptr_t)va_base_data + data_size) {
} else if ((uintptr_t)bss_addr == (uintptr_t)va_base_data +
ALIGN_UP(data_size, 4)) {
/* .bss directly behind writable data, append */
data_size += bss_size;
} else {
Expand Down

0 comments on commit 9ccb67a

Please sign in to comment.