public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: other/7535: GCC configuration problem: failed to correctly detect hidden attribute support
@ 2002-08-08  4:26 nathan
  0 siblings, 0 replies; 2+ messages in thread
From: nathan @ 2002-08-08  4:26 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, grigory, nobody

Synopsis: GCC configuration problem: failed to correctly detect hidden attribute support

State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Thu Aug  8 03:57:17 2002
State-Changed-Why:
    This is a binutils bug. From gcc's configure.in
     	# GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
    	# This is irritatingly difficult to feature test for.  Look for 
    	# the date string after the version number.
    binutils after 2.12.1 are known good

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7535


^ permalink raw reply	[flat|nested] 2+ messages in thread

* other/7535: GCC configuration problem: failed to correctly detect hidden attribute support
@ 2002-08-08  0:46 grigory
  0 siblings, 0 replies; 2+ messages in thread
From: grigory @ 2002-08-08  0:46 UTC (permalink / raw)
  To: gcc-gnats


>Number:         7535
>Category:       other
>Synopsis:       GCC configuration problem: failed to correctly detect hidden attribute support
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 08 00:06:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Grigory Zagorodnev
>Release:        3.1.1
>Organization:
>Environment:
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
Configured with: ./configure --prefix=/usr/local --program-suffix=-3.1.1 --enable-threads
Thread model: posix
gcc version 3.1.1
>Description:
The issuue
----------
G++ 3.1.1 compiler configuration script failed to detect assembler's hidden attribute support. However, the 'as' installed on my box actually does support this feature. So, we should consider this bahaviour as erroneous.

Config command line is:
	./configure --prefix=/usr/local --program-suffix=-3.1.1 --enable-threads 

Config output:
	...
	checking assembler hidden support... no
	...


Environment
-----------
The environment is:
	ia-32 Red Hat Linux 7.1
	GNU assembler version 2.10.91 (i386-redhat-linux) using BFD version 2.10.91.0.2

Further investigation showed that configure script fails either on ia-32 Red Hat 7.2 and 7.3. Where higher versions of binutils are used.
	GNU assembler version 2.11.93.0.2 (i386-redhat-linux) using BFD version 2.11.93.0.2 20020207


The impact
----------
According to the C++ ABI, __cxa_atexit/__cxa_finalize should be used to perform file-scope C++ objects destruction. Both these routines uses special identifier __dso_handle which should has unique value for each loadable module within the process. 

That requires __dso_handle be local for each particular SO or executable. Attribute hidden should be used to make it local. 

However, wrongly detected hidden attribute feature support, makes impossible to use C++ ABI conformant object destruction mechanism, since __dso_handle becomes visible outside the loadable module.

See declaration of __dso_handle in file "gcc/crtstuff.c":
	#ifdef HAVE_GAS_HIDDEN
	asm (".hidden\t__dso_handle");
	#endif

	#ifdef CRTSTUFFS_O
	void *__dso_handle = &__dso_handle;
	...

Note that C++ ABI conformant destruction mechanism is not enabled in the compiler by default yet. Special option -fuse-cxa-atexit turns this on.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-08-08 10:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-08  4:26 other/7535: GCC configuration problem: failed to correctly detect hidden attribute support nathan
  -- strict thread matches above, loose matches on Subject: below --
2002-08-08  0:46 grigory

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).