mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH master 0/3] elf: restructure to fix sandbox allyesconfig breakage
Date: Fri, 23 Jan 2026 14:17:10 +0100	[thread overview]
Message-ID: <20260123131922.2663665-1-a.fatoum@pengutronix.de> (raw)

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




             reply	other threads:[~2026-01-23 13:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-23 13:17 Ahmad Fatoum [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260123131922.2663665-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox