On Tue, Mar 17, 2026 at 12:50:46PM +0400, Marc-André Lureau wrote:
> vgafont.h defined vgafont16 as a static const array, so every .c file
> that included it (via console-priv.h) got its own 4 KiB copy, that
> the linker may or not deduplicate?
>
> Move the array definition into a new vgafont.c compilation unit and
> turn the header into a proper extern declaration with an include guard.
>
> Signed-off-by: Marc-André Lureau <[email protected]>
> ---
> ui/vgafont.h | 4613
> +-------------------------------------------------------
> ui/vgafont.c | 4613
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ui/meson.build | 1 +
> 3 files changed, 4619 insertions(+), 4608 deletions(-)
>
> diff --git a/ui/vgafont.h b/ui/vgafont.h
> index 7e1fc473f75..4498ac4e07b 100644
> --- a/ui/vgafont.h
> +++ b/ui/vgafont.h
> @@ -1,4611 +1,8 @@
> -static const uint8_t vgafont16[256 * 16] = {
> +#ifndef VGAFONT_H
> +#define VGAFONT_H
>
> - /* 0 0x00 '^@' */
> - 0x00, /* 00000000 */
> - 0x00, /* 00000000 */
> - 0x00, /* 00000000 */
> - 0x00, /* 00000000 */
> - 0x00, /* 00000000 */
> - 0x00, /* 00000000 */
> - 0x00, /* 00000000 */
> - 0x00, /* 00000000 */
> - 0x00, /* 00000000 */
> - 0x00, /* 00000000 */
> - 0x00, /* 00000000 */
> - 0x00, /* 00000000 */
> - 0x00, /* 00000000 */
> - 0x00, /* 00000000 */
> - 0x00, /* 00000000 */
> - 0x00, /* 00000000 */
> +#include <stdint.h>
This is pulled in by osdep.h, which every .c file should
be including. Assuming that's removed, then
Reviewed-by: Daniel P. Berrangé <[email protected]>
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|