This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Aliased to undefined symbol
- From: stelios xanthakis <sxanth at cs dot teiath dot gr>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 19 Apr 2005 01:13:24 +0300
- Subject: Aliased to undefined symbol
Hi
This is a recent change (last month?) in the semantics of alias.
We can no longer say:
---------program.c---------
int foo();
int bar () __attribute__((alias("foo")));
------------------------------
According to the documentation:
"""
This is because it's meaningless to define an alias to an undefined symbol.
On Solaris, the native assembler would have caught this error, but GNU
as does not.
"""
But how is this meaningless? It used to work just fine. If the solaris
native assembler
caught this "error" then it's probably a bug of the solaris native
assembler. If it was an
error GNU as couldn't catch, then programs using this would crash or
fail to link.
Probably this is not important since "alias" is a non-standard extension
and people
who use it should be prepared for such breakage. Still, I hope it's fixed.
Stelios