From: martin@v.loewis.de (Martin v. Loewis)
To: "David Abrahams" <david.abrahams@rcn.com>
Cc: "H . J . Lu" <hjl@lucon.org>, <drepper@redhat.com>,
"Mark Mitchell" <mark@codesourcery.com>,
"Jason Merrill" <jason@redhat.com>,
"Ralf W. Grosse-Kunstleve" <rwgk@cci.lbl.gov>, <gcc@gcc.gnu.org>
Subject: Re: Minimal GCC/Linux shared lib + EH bug example
Date: Sat, 18 May 2002 17:55:00 -0000 [thread overview]
Message-ID: <m3it5lvzgh.fsf@mira.informatik.hu-berlin.de> (raw)
In-Reply-To: <015801c1feb6$a184c320$6501a8c0@boostconsulting.com>
"David Abrahams" <david.abrahams@rcn.com> writes:
> I attempted to take C++ out of the picture in "weak.tgz" by using
> __attribute__((weak)), but the assembler doesn't like what the compiler
> outputs.
Please be always as specific you can in such reports. I assume the
assembler expressed its dislike by saying
Error: symbol `x' can not be both weak and common
That may be a bug in gcc - it should not export a symbol as "common"
when it also declares it as weak.
> DOes g++ add some additional attribute to the template static data
> members to make the assembler happy?
No. For template static data, it *only* emits them as .comm, not as
.weak. For initialized data that need to be merged at run-time (such
as vtables), it emits them as weak. In your C example, you can achieve
the same effect by saying
int x __attribute__((weak)) = 1;
I ran your example, but could not see any problems with it.
> Each archive contains a script build.sh which attempts to build and run the
> example (well, "weak.tgz" doesn't attempt to run, since the build fails). I
> am using GCC 3.1 installed in /usr/local, which explains why /usr/local/lib
> appears in the LD_LIBRARY_PATH in the scripts.
Could it be that you've attached the same example twice? I could not
find anything involving template static members (or C++, for that
matter).
For a minimal example, it would help if the directory structure where
simpler...
Regards,
Martin
next prev parent reply other threads:[~2002-05-18 22:59 UTC|newest]
Thread overview: 104+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <09b501c1f634$04747d80$6501a8c0@boostconsulting.com>
2002-05-12 4:57 ` Jason Merrill
2002-05-12 6:42 ` David Abrahams
2002-05-12 7:30 ` Jason Merrill
2002-05-12 7:31 ` David Abrahams
2002-05-12 8:07 ` Jason Merrill
2002-05-12 9:24 ` David Abrahams
2002-05-12 9:31 ` Martin v. Loewis
2002-05-12 9:34 ` David Abrahams
2002-05-12 12:17 ` Mark Mitchell
2002-05-12 12:24 ` Martin v. Loewis
2002-05-12 12:29 ` Mark Mitchell
2002-05-12 12:36 ` Jason Merrill
2002-05-12 12:37 ` Mark Mitchell
2002-05-12 16:55 ` Jason Merrill
2002-05-12 13:41 ` David Abrahams
2002-05-13 1:34 ` Martin v. Loewis
2002-05-13 2:05 ` Mark Mitchell
2002-05-13 5:44 ` David Abrahams
2002-05-13 16:58 ` Martin v. Loewis
2002-05-13 21:39 ` David Abrahams
2002-05-14 2:34 ` Martin v. Loewis
2002-05-14 13:12 ` David Abrahams
2002-05-14 14:17 ` Martin v. Loewis
2002-05-12 12:36 ` David Abrahams
2002-05-13 1:28 ` Martin v. Loewis
2002-05-13 5:00 ` David Abrahams
2002-05-13 16:50 ` Martin v. Loewis
2002-05-13 19:00 ` David Abrahams
2002-05-14 2:14 ` Martin v. Loewis
2002-05-14 6:07 ` David Abrahams
2002-05-14 13:53 ` Martin v. Loewis
2002-05-14 14:45 ` David Abrahams
2002-05-15 2:54 ` Martin v. Loewis
2002-05-14 15:28 ` Jason Merrill
2002-05-14 18:32 ` Daniel Jacobowitz
2002-05-15 1:34 ` Martin v. Loewis
2002-05-14 13:23 ` Sean Parent
2002-05-14 14:08 ` David Abrahams
2002-05-14 18:38 ` Sean Parent
2002-05-14 22:50 ` David Abrahams
2002-05-15 11:38 ` Sean Parent
2002-05-15 11:50 ` Matthew Austern
2002-05-15 12:29 ` Joe Buck
2002-05-15 17:26 ` David Abrahams
2002-05-15 20:21 ` H . J . Lu
2002-05-15 22:35 ` David Abrahams
2002-05-16 11:18 ` H . J . Lu
2002-05-18 16:53 ` David Abrahams
2002-05-18 17:55 ` Martin v. Loewis [this message]
2002-05-18 19:06 ` David Abrahams
2002-05-19 4:18 ` Duplicate data objects in shared libraries Martin v. Loewis
2002-05-19 5:00 ` David Abrahams
2002-05-19 5:14 ` Martin v. Loewis
2002-05-19 5:48 ` David Abrahams
2002-05-19 15:05 ` Martin v. Loewis
2002-05-20 1:42 ` Jason Merrill
2002-05-20 3:47 ` H . J . Lu
2002-05-20 4:08 ` Mark Mitchell
2002-05-20 9:55 ` Jason Merrill
2002-05-20 10:15 ` Mark Mitchell
2002-05-20 12:42 ` Jason Merrill
2002-05-20 12:53 ` Mark Mitchell
2002-05-20 13:23 ` Jason Merrill
2002-05-20 13:28 ` David Abrahams
2002-05-22 16:35 ` Jason Merrill
2002-05-22 21:46 ` David Abrahams
2002-05-22 23:05 ` Jason Merrill
[not found] ` <20020529130945.A16909@lucon.org>
[not found] ` <039401c20759$a3ba1400$6601a8c0@boostconsulting.com>
[not found] ` <wvl8z615rsz.fsf@prospero.cambridge.redhat.com>
[not found] ` <1022790116.22692.205.camel@myware.mynet>
2002-05-30 18:51 ` PATCH: Treat RTLD_LOCAL like Solaris (Re: Duplicate data objects in shared libraries) Jason Merrill
[not found] ` <wvlit54530i.fsf@prospero.cambridge.redhat.com>
2002-05-31 0:28 ` Jason Merrill
2002-05-31 0:39 ` Ulrich Drepper
2003-04-10 15:31 ` Jason Merrill
2003-04-10 15:32 ` H. J. Lu
2003-04-10 16:20 ` H. J. Lu
2002-05-20 7:42 ` Duplicate data objects in shared libraries David Abrahams
2002-05-20 9:34 ` Jason Merrill
2002-05-20 9:57 ` David Abrahams
2002-05-20 10:28 ` H . J . Lu
2002-05-20 13:49 ` Jason Merrill
2002-05-20 13:59 ` H . J . Lu
2002-05-20 14:17 ` Jason Merrill
2002-05-20 18:19 ` H . J . Lu
2002-05-20 14:32 ` David Abrahams
2002-05-20 14:32 ` David Abrahams
2002-05-20 15:31 ` Martin v. Loewis
2002-05-21 19:07 ` H . J . Lu
2002-05-22 1:46 ` Martin v. Loewis
2002-05-20 13:26 ` David Beazley
2002-05-20 13:57 ` H . J . Lu
2002-05-20 14:36 ` David Beazley
2002-05-20 15:50 ` Michael Matz
2002-05-18 19:13 ` Minimal GCC/Linux shared lib + EH bug example David Abrahams
2002-05-19 4:29 ` Martin v. Loewis
2002-05-19 5:10 ` David Abrahams
2002-05-19 14:48 ` Martin v. Loewis
2002-05-15 16:36 ` David Abrahams
2002-05-15 19:26 ` Jeff Sturm
2002-05-12 8:17 ` Martin v. Loewis
2002-05-14 15:37 Ralf W. Grosse-Kunstleve
2002-05-15 5:05 ` Martin v. Löwis
2002-05-16 0:16 ` Mark Mitchell
2002-05-16 4:35 ` Martin v. Löwis
2002-05-15 8:23 Ralf W. Grosse-Kunstleve
2002-05-15 8:32 ` David Abrahams
2002-05-15 10:44 ` Martin v. Löwis
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=m3it5lvzgh.fsf@mira.informatik.hu-berlin.de \
--to=martin@v.loewis.de \
--cc=david.abrahams@rcn.com \
--cc=drepper@redhat.com \
--cc=gcc@gcc.gnu.org \
--cc=hjl@lucon.org \
--cc=jason@redhat.com \
--cc=mark@codesourcery.com \
--cc=rwgk@cci.lbl.gov \
/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).