This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [RFA] pei386 dll: auto-import patch
> no, this saves execution time rather than calling strlen OVER and OVER
> on the same constant strings. We could compute it once and then cache
> those values, but geez, that's ugly.
Ok, never mind then.
> Is printf ("%s\n", __FUNCTION__); okay ? If so, done.
Yup.
> ret = snprintf (fixup_name, buffer_len, "__fu%d_%s",
> counter++, sym->name);
Sorry, can't use snprintf. Use strlen every time (figure 20 for the
counter) and compare to the max length. Round up to a multiple of 100
to reduce heap fragmentation. Then use regular sprintf.