PATCH: Better messages for discarde section
Nick Clifton
nickc@redhat.com
Tue Jun 3 16:57:00 GMT 2003
Hi H.J.
>> asprintf() returns 0 if it failed to allocate the memory, not -1.
> Linux's asprintf returns -1 on error.
Really ? The one in libiberty returns 0. Oh well.
> I changed it to "ok <= 0".
Thanks.
>> > -error_handler VPARAMS ((int id ATTRIBUTE_UNUSED, const char *fmt, ...))
>> > +error_handler (int id, const char *fmt, ...)
>> > {
>> > - VA_OPEN (arg, fmt);
>> > - VA_FIXEDARG (arg, const char *, fmt);
>>
>> Please do not remove the V.... macros. We have not switched over to
>> using IsoC. (Well not yet anyway).
>
> I am not sure if I have a choice here since va_copy is used, which
> is not available in K&R C.
Why are you using va_copy ? If it is only because of the recursive
call to einfo() inside your new code, then it might be cleaner to just
set a flag and then tail-call einfo at the end of the function. That
way it should work with K&R as well.
> + case -LD_DEFINITION_IN_DISCARDED_SECTION:
> + case LD_DEFINITION_IN_DISCARDED_SECTION:
What is the purpose of the negative version of
LD_DEFINITION_IN_DISCARDED_SECTION ? Does anything use it ? Assuming
that it is needed, it ought to be documented in a comment somewhere.
Cheers
Nick
More information about the Binutils
mailing list