This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: f build dies with: undefined reference to `lookup_name'
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Richard Henderson <rth at redhat dot com>, Andrew Cagney <cagney at mac dot com>, Alan Modra <amodra at bigpond dot net dot au>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 06 Mar 2002 17:39:05 -0500
- Subject: Re: f build dies with: undefined reference to `lookup_name'
>>>>> Richard Henderson writes:
Richard> Basically, yes. Though I would actually remove weak_finish
Richard> entirely and process #pragma weak forward declarations in
Richard> finish_decl and finish_function or something.
That means weak_decls now needs to be global, but it is defined in
varasm.c so we will not have any undefined symbols.
As far as finish_decl or finish_function or sometihng, what if I
have
#pragma weak a
#pragma weak b
#pragma weak c
extern a();
/* use a */
extern b();
/* use b */
extern c();
/* use c */
Current weak_finish() is run at the end of the file, not each function.
There isn't any language-dependent finish_file(). It seems that we would
need to add that to each language, or just add weak_finish to each
language, possibly a no-op.
David