This is the mail archive of the
mailing list for the GCC project.
.hidden and dso_handle on 3.1 prerelease
- From: "Ulrich Weigand" <Ulrich dot Weigand at de dot ibm dot com>
- To: rth at redhat dot com
- Cc: gcc at gcc dot gnu dot org, mark at codesourcery dot com
- Date: Mon, 13 May 2002 19:11:17 +0200
- Subject: .hidden and dso_handle on 3.1 prerelease
I've been testing the 3.1 prerelease on s390(x) and it looked quite good,
however when building a glibc with the new compiler and running the glibc
test suite, two test cases failed. They used to work with the 3.1 branch
from two weeks ago ...
It turns out that the cause is that the dso_handle symbol in crtbegin.o
is no longer marked .hidden by the compiler. This in turn causes the
symbol to be exported from various shared objects, which causes serious
confusion in glibc's __cxa_atexit handling (as the dynamic linker relocates
the weak dso_handle from the main executable to point to one of those
exported symbols). Unfortunately, C++ depends on this to work properly.
The reason why dso_handle is no longer .hidden is your change to
configure that tests for a binutils date of 2002-04-04. I was using
a 126.96.36.199.12.3 binutils version (of 2001-11-21), which used to work
fine before (at least it appeared to -- in any case the symbol was
actually hidden and not exported).
What is the reason for not using .hidden on this binutils version?
If there is really a binutils bug, should we then not rather refuse
to build the compiler at all instead of building without .hidden,
when this breaks glibc?
Mit freundlichen Gruessen / Best Regards
Dr. Ulrich Weigand
Linux for S/390 Design & Development
IBM Deutschland Entwicklung GmbH, Schoenaicher Str. 220, 71032 Boeblingen
Phone: +49-7031/16-3727 --- Email: Ulrich.Weigand@de.ibm.com