public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Jaeger <aj@suse.de>
To: libc-hacker@sources.redhat.com
Cc: Roland McGrath <roland@redhat.com>
Subject: Re: Fix locale/weight.h with GCC 3.5
Date: Tue, 07 Sep 2004 18:09:00 -0000	[thread overview]
Message-ID: <200409072008.56509.aj@suse.de> (raw)
In-Reply-To: <hou0uawcao.fsf@reger.suse.de>

[-- Attachment #1: Type: text/plain, Size: 3079 bytes --]

On Tuesday 07 September 2004 13:25, Andreas Jaeger wrote:
> Roland McGrath <roland@redhat.com> writes:
> >> On Monday 06 September 2004 23:21, Roland McGrath wrote:
> >> > > This is a mess - if I change elf/dynamic-link.h in a similar way
> >> > > (see below) I finally get:
> >> >
> >> > dynamic-link.h is used at different scopes in different places.
> >> > You can just make the use of static conditional on #ifndef
> >> > RTLD_BOOTSTRAP.
> >>
> >> Does not seem to help - we include it twice in local scope:
> >> Once in rtld.c where this helps and once in dl-load.c where it won't
> >> help :-(
> >
> > In dl-load.c, dynamic-link.h is used only at global scope.
>
> dl-reloc is the other culprit -  I'm looking into it now,

I'm testing currently the appended patch - with GCC 3.3 and 3.5.

What do you think of it?
Andreas

============================================================
Index: elf/dynamic-link.h
--- elf/dynamic-link.h 6 Mar 2004 09:47:17 -0000 1.50
+++ elf/dynamic-link.h 7 Sep 2004 17:31:45 -0000
@@ -64,8 +64,10 @@ elf_machine_lazy_rel (struct link_map *m
 
 
 /* Read the dynamic section at DYN and fill in INFO with indices DT_*.  */
-
-static inline void __attribute__ ((unused, always_inline))
+#if (!defined RTLD_BOOTSTRAP && !defined LOCAL_SCOPE)
+static
+#endif
+inline void __attribute__ ((unused, always_inline))
 elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
 {
   ElfW(Dyn) *dyn = l->l_ld;
============================================================
Index: elf/do-rel.h
--- elf/do-rel.h 30 Jan 2003 17:36:34 -0000 1.32
+++ elf/do-rel.h 7 Sep 2004 17:31:45 -0000
@@ -49,7 +49,7 @@
    relocations; they should be set up to call _dl_runtime_resolve, rather
    than fully resolved now.  */
 
-static inline void __attribute__ ((always_inline))
+inline void __attribute__ ((always_inline))
 elf_dynamic_do_rel (struct link_map *map,
       ElfW(Addr) reladdr, ElfW(Addr) relsize,
       int lazy)
============================================================
Index: elf/dl-reloc.c
--- elf/dl-reloc.c 7 Mar 2004 05:21:01 -0000 1.96
+++ elf/dl-reloc.c 7 Sep 2004 17:31:45 -0000
@@ -27,6 +27,8 @@
 #include <sys/types.h>
 #include "dynamic-link.h"
 
+#define LOCAL_SCOPE
+
 /* Statistics function.  */
 #ifdef SHARED
 # define bump_num_cache_relocations() ++GL(dl_num_cache_relocations)
============================================================
Index: elf/dl-conflict.c
--- elf/dl-conflict.c 5 Mar 2004 10:14:50 -0000 1.11
+++ elf/dl-conflict.c 7 Sep 2004 17:31:45 -0000
@@ -57,7 +57,9 @@ _dl_resolve_conflicts (struct link_map *
     struct link_map *resolve_conflict_map __attribute__ ((__unused__))
       = GL(dl_loaded);
 
+#define LOCAL_SCOPE
 #include "dynamic-link.h"
+#undef LOCAL_SCOPE
 
     GL(dl_num_cache_relocations) += conflictend - conflict;
 


-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SUSE Linux AG, 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: 189 bytes --]

  reply	other threads:[~2004-09-07 18:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-06 18:52 Andreas Jaeger
2004-09-06 19:22 ` Andreas Jaeger
2004-09-06 21:21   ` Roland McGrath
2004-09-07  5:06     ` Andreas Jaeger
2004-09-07  8:02       ` Roland McGrath
2004-09-07 11:26         ` Andreas Jaeger
2004-09-07 18:09           ` Andreas Jaeger [this message]
2004-09-07 21:26             ` Roland McGrath
2004-09-08  4:57               ` Andreas Jaeger
2004-09-08  5:40                 ` Andreas Jaeger
2004-09-08 17:01                   ` Roland McGrath
2004-09-08 17:24                     ` Andreas Jaeger
2004-09-08 17:46                       ` Roland McGrath
2004-09-08 19:33                         ` Andreas Jaeger
2004-09-08 19:44                       ` Andreas Jaeger
2004-09-08 20:02                         ` Roland McGrath
2004-09-09  8:19                         ` Jakub Jelinek
2004-09-09  9:20                           ` Andreas Jaeger
2004-09-21  7:19                   ` Andreas Jaeger

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=200409072008.56509.aj@suse.de \
    --to=aj@suse.de \
    --cc=libc-hacker@sources.redhat.com \
    --cc=roland@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).