This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug go/69357] libgo refers to _end in a non-weak way
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 21 Jan 2016 13:47:32 +0000
- Subject: [Bug go/69357] libgo refers to _end in a non-weak way
- Auto-submitted: auto-generated
- References: <bug-69357-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69357
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Btw, my thought was that it ends up like
> cat t2.c
int x = 1;
> gcc t2.c -o libt2.so -shared -lisl -fPIC
> cat t.c
extern char _end[];
char *endp = _end;
int main()
{
}
> gcc -Wl,--as-needed -Wl,--no-add-needed -L. -lt2 -Bstatic t.o -Bdynamic
where libt2.so might provide _end (but is not needed and not linked in the
end),
referenced from t.o (simulating -static-libgo).
It doesn't error this way though (maybe because libt2.so itself provides _end).