From: Andreas Jaeger <aj@suse.de>
To: Richard Henderson <rth@redhat.com>
Cc: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: Re: Aliases ...
Date: Fri, 14 Jan 2005 08:54:00 -0000 [thread overview]
Message-ID: <m3mzvc75mb.fsf@gromit.moeb> (raw)
In-Reply-To: <20050109232721.GA23478@redhat.com> (Richard Henderson's message of "Sun, 9 Jan 2005 15:27:21 -0800")
[-- Attachment #1: Type: text/plain, Size: 1698 bytes --]
Richard Henderson <rth@redhat.com> writes:
> On Sun, Jan 09, 2005 at 10:00:25PM +0100, Andreas Jaeger wrote:
>> One testcase is:
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> int errno;
>> extern int __libc_errno __attribute__ ((alias ("errno")));
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ...
>> So, what shall we do with glibc?
>
> For this case, either initialize the variable, or use -fno-common.
Here's a patch to initialize it - it removes the warning.
Ok to commit?
Andreas
2005-01-14 Andreas Jaeger <aj@suse.de>
* sysdeps/generic/errno.c: Initialize errno.
============================================================
Index: sysdeps/generic/errno.c
--- sysdeps/generic/errno.c 4 Oct 2004 20:59:41 -0000 1.7
+++ sysdeps/generic/errno.c 14 Jan 2005 08:52:47 -0000
@@ -1,5 +1,5 @@
/* Definition of `errno' variable. Canonical version.
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,9 @@ int rtld_errno attribute_hidden;
#elif USE___THREAD
-__thread int errno;
+/* We have to initialize errno, since aliasing of a common symbol does
+ not work. */
+__thread int errno = 0;
extern __thread int __libc_errno __attribute__ ((alias ("errno")))
attribute_hidden;
--
Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]
next prev parent reply other threads:[~2005-01-14 8:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-09 21:00 Aliases Andreas Jaeger
2005-01-10 17:14 ` Aliases H. J. Lu
2005-01-10 17:27 ` Aliases H. J. Lu
[not found] ` <20050109232721.GA23478@redhat.com>
2005-01-10 6:11 ` Aliases Andreas Jaeger
2005-01-14 9:09 ` Aliases Andreas Jaeger
2005-01-30 10:36 ` Aliases Andreas Jaeger
2005-01-14 8:54 ` Andreas Jaeger [this message]
2005-01-14 16:41 ` Aliases Roland McGrath
2005-01-14 18:41 ` Aliases Andreas Jaeger
2005-01-14 18:56 ` Aliases Roland McGrath
[not found] <20050114192642.GC19955@redhat.com>
2005-01-14 19:30 ` Aliases Roland McGrath
2005-01-14 20:04 ` Aliases Jakub Jelinek
2005-01-15 7:19 ` Aliases Andreas Jaeger
2005-01-15 9:35 ` Aliases Jakub Jelinek
2005-01-15 9:49 ` Aliases Andreas Jaeger
2005-01-14 20:23 ` Aliases Andreas Schwab
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=m3mzvc75mb.fsf@gromit.moeb \
--to=aj@suse.de \
--cc=libc-hacker@sources.redhat.com \
--cc=rth@redhat.com \
/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).