This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix locale/weight.h with GCC 3.5


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: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]