[coreboot] libpayload: Add -Os to the CFLAGS
Segher Boessenkool
segher at kernel.crashing.org
Thu Mar 20 04:03:15 CET 2008
> Unfortunately, it exposes a strange issue where strcpy() suddenly goes
> missing - we think that strcpy() is being provided by libgcc, and that
> for some reason, -Os changes the beahavior.
strcpy() isn't part of libgcc. What happened is that without -Os, the
compiler will inline certain invocations of strcpy() as a builtin.
> +char *strcpy(char *d, const char *s)
> +{
> + return strncpy(d, s, strlen(s));
> +}
This doesn't put a terminating 0 on the string.
Segher
More information about the coreboot
mailing list