]> git.ipfire.org Git - thirdparty/u-boot.git/commit
m68k: Update linker scripts to ensure appended device tree is aligned
authorTom Rini <trini@konsulko.com>
Thu, 15 Jan 2026 22:19:33 +0000 (16:19 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 20 Jan 2026 18:07:14 +0000 (12:07 -0600)
commitdac67bf0bee168de8f43050fe9b1d776de1ee00f
tree802995bf2d0929be3b08c3c183c23e36f6483195
parent8b0ebe054bb3334c6ca9bed018360b08d4ddc7a4
m68k: Update linker scripts to ensure appended device tree is aligned

With commit 0535e46d55d7 ("scripts/dtc: Update to upstream version
v1.7.2-35-g52f07dcca47c") it is now a fatal error to U-Boot if our
device tree is not 8-byte aligned. In commit 85f586035d75 ("ARM: OMAP2+:
Pad SPL binary to 8-byte alignment before DTB") Beleswar Padhi explains
that we must have ALIGN(x) statements inside of a section to ensure that
padding is included and not simply that the linker address counter is
incremented. To that end, this patch:
- Remove part of what Marek Vasut did in commit 9ed99e2eeadb ("m68k:
  Assure end of U-Boot is at 8-byte aligned offset") as we now better
  understand what can trigger failure and check for it.
- Rewrite the '.dynsym' section to follow modern practices, and include
  the 8-byte alignment at the end of the section.
- Ensure that we do have alignment by adding an ASSERT so that when not
  aligned we fail to link (and explain why).

Signed-off-by: Tom Rini <trini@konsulko.com>
arch/m68k/cpu/u-boot.lds