This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Re: An undefined typed symbol bug?


On Fri, Aug 22, 2003 at 11:35:11AM +0930, Alan Modra wrote:
> Without knowing the background, I'd say we should keep the warning,
> and possibly fix the case where we currently don't warn.  The testcase
> explicitly sets the type of the undefined symbol to @object.  I think
> a warning is in order when satisfying the reference with a @function
> symbol.

Not all compilers generate undefined symbols with types. Gcc doesn't.
The warning doesn't provide anything useful. In C, you use the same
prototype for definition and reference to make sure they are consistent.
In assembly, anything goes and linker shouldn't bother.

> 
> I'm thinking of ABIs like powerpc64-linux with function descriptors
> as a reason for wanting to distinguish between the descriptor and its
> code.

The code is written on purpose. The goal is to get the address of the
function body, not its function descriptor.


H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]