Source: gcc-16
Version: 16.1.0-3
Severity: normal
X-Debbugs-Cc: [email protected]
User: [email protected]
Usertags: hppa
Building firmware with hppa and hppa64 gcc, with option
-ffreestanding. Starting with gcc-16, the following code
struct tpm_log_entry le = {
.hdr.pcrindex = pcpes->pcrindex,
.hdr.eventtype = pcpes->eventtype,
};
causes the following error to me emitted at link time:
hppa64-linux-gnu-ld.bfd: o64/ccode32flat.o: in function `hash_log_extend':
ccode32flat.o.tmp.c:(.text+0x5400): undefined reference to `memset'
hppa64-linux-gnu-ld.bfd: o64/ccode32flat.o(.text+0x5400): cannot reach memset
ccode32flat.o.tmp.c:(.text+0x5400): relocation truncated to fit:
R_PARISC_PCREL22F against undefined symbol `memset'
The struct in question is a bit large, so it really needs
some memory zeroing in this case. But the compiler is given
-ffreestanding.
Just in case, the code in question links in libgcc.a, but
it doesn't help either.
Apparently this is only a problem for hppa (both 32 and 64 bits)
compilers, other compilers does the right thing here.
This code worked fine when built with gcc-15 and before.
Thanks,
/mjt