[gold][patch] Fix non-PIC warning to print only when building position-independent output

Cary Coutant ccoutant@google.com
Fri Mar 27 17:35:00 GMT 2009


>> +                gold_assert(parameters->
>> +                  options().output_is_position_independent());
>>               check_non_pic(object, r_type);
>
> I can see the path you took to get to this patch, but now that you are
> here, why not just put the assert in check_non_pic in all cases?

That would be just as good in my view -- that's what I originally
thought of in my first response to Hans-Peter, but then I realized
that we've already established that we're PIC in all but two cases, so
I thought it might be a bit clearer to establish the assertion more
locally for those two cases. Keeping the name check_non_pic does kind
of make that clear, though, so I'm fine either way.

-cary



More information about the Binutils mailing list