mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH master 0/3] elf: restructure to fix sandbox allyesconfig breakage
@ 2026-01-23 13:17 Ahmad Fatoum
  2026-01-23 13:17 ` [PATCH master 1/3] elf: rename elf.h to <linux/elf.h> Ahmad Fatoum
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2026-01-23 13:17 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

common/elf.c contains code that's only relevant to barebox proper, code
that is only used by the PBL and code that is used for both.

This works when we compile with linker garbage collection, but we don't
do this on sandbox. Sandbox is a PBL-only platform nowadays, so this
leads to linker errors as without LTO, the linker can't determine that
e.g. the reference to list_sort is ultimately unused in PBL.

Instead of stubbing out the functions needed, let's reorganize it, so
most of the original support remains in common/elf.c and the noalloc
and relocation parts move to lib/elf.c

Ahmad Fatoum (3):
  elf: rename elf.h to <linux/elf.h>
  common: elf: split barebox proper-only ELF support from the rest
  common: elf: reorganize barebox proper parts in struct elf_image

 common/Makefile     |   2 +-
 common/elf.c        | 351 +-----------------------------
 include/elf.h       | 511 +-------------------------------------------
 include/lib/elf.h   |  76 +++++++
 include/linux/elf.h | 472 ++++++++++++++++++++++++++++++++++++++++
 lib/Makefile        |   1 +
 lib/elf.c           | 329 ++++++++++++++++++++++++++++
 7 files changed, 891 insertions(+), 851 deletions(-)
 create mode 100644 include/lib/elf.h
 create mode 100644 include/linux/elf.h
 create mode 100644 lib/elf.c

-- 
2.47.3




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-01-26  7:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-23 13:17 [PATCH master 0/3] elf: restructure to fix sandbox allyesconfig breakage Ahmad Fatoum
2026-01-23 13:17 ` [PATCH master 1/3] elf: rename elf.h to <linux/elf.h> Ahmad Fatoum
2026-01-23 13:17 ` [PATCH master 2/3] common: elf: split barebox proper-only ELF support from the rest Ahmad Fatoum
2026-01-23 13:17 ` [PATCH master 3/3] common: elf: reorganize barebox proper parts in struct elf_image Ahmad Fatoum
2026-01-26  7:33 ` [PATCH master 0/3] elf: restructure to fix sandbox allyesconfig breakage Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox