public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: grigory@stl.sarov.ru
To: gcc-gnats@gcc.gnu.org
Subject: other/7535: GCC configuration problem: failed to correctly detect hidden attribute support
Date: Thu, 08 Aug 2002 00:46:00 -0000	[thread overview]
Message-ID: <20020808065621.22619.qmail@sources.redhat.com> (raw)


>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:


             reply	other threads:[~2002-08-08  7:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-08  0:46 grigory [this message]
2002-08-08  4:26 nathan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020808065621.22619.qmail@sources.redhat.com \
    --to=grigory@stl.sarov.ru \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).