This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: 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


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