[PATCH] ARM: mach-rpc: fix zImage build after recent font-related changes

Helge Deller deller at gmx.de
Fri May 22 15:03:39 PDT 2026


On 5/22/26 23:49, Helge Deller wrote:
> Hi Ethan,
> 
> On 5/20/26 06:49, Ethan Nelson-Moore wrote:
>> Thanks for investigating this issue.
>>
>> On Tue, May 19, 2026 at 2:11 AM Helge Deller <deller at kernel.org> wrote:
>>> Ethan, does this compile-only-tested patch fix the issue?
>> It almost does - I also had to remove #include <linux/math.h> from
>> include/linux/font.h.
>> This is probably because of the following highly questionable code in
>> arch/arm/boot/compressed/Makefile:
>> CFLAGS_font.o := -Dstatic=
>> which is causing unused static functions to not be optimized out. (The
>> real purpose of it is to make the acorndata_8x8 array non-static so
>> the decompressor can use it.) Really, the decompressor should be fixed
>> to not use this hack.
> 
> Would it help to mark acorndata_8x8 with attribute("visible") ?
> That way it should become accessible.
> 
>>> Maybe only the first hunk is necessary.
>> You're right. The kernel links successfully with only the #include
>> <linux/math.h> removal and the first hunk applied.
> 
> Ok, good.
> How shall we continue?
> Do you want to try the visible trick?

I meant the __visible #define from
include/linux/compiler_attributes.h:# define __visible __attribute__((__externally_visible__))
I understand it might conflict with the "static" keyword (I did not test).

In your patch you #defined OMIT_FONT_DESC:

+# decompressor. OMIT_FONT_DESC is used in lib/fonts/font_acorn_8x8.c to omit the
+# definition of the font's font_desc structure, which requires <linux/font.h>.
+CFLAGS_font.o := -Dstatic= -D_VIDEO_FONT_H -DOMIT_FONT_DESC

On parisc I used a #define BOOTLOADER, which already describes the reason.
For your patch you could also use the "BOOTLOADER" define and then (instead of using __visible):
#ifdef BOOTLOADER
  static const struct font_data acorndata_8x8 =
#else
  const struct font_data acorndata_8x8 = {
#endif

?
Helge



More information about the linux-arm-kernel mailing list