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


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

fix _rtld_local_ro breakage


Problem is that _rtld_local_ro was picking up section .sdata from the
_rtld_local version of __rtld_local_attribute__, which lead to the
compiler believing that 16-bit relocations would work.

Also fixes 

ldsodefs.h:505:1: warning: "__rtld_global_attribute__" redefined
ldsodefs.h:342:1: warning: this is the location of the previous definition


Ok?


r~


2004-03-06  Richard Henderson  <rth@redhat.com>

	* sysdeps/generic/ldsodefs.h (__rtld_local_attribute__,
	__rtld_global_attribute__): Undef after use.
	(_rtld_local_ro): Define __rtld_local_attribute__ with just hidden
	if available.

Index: sysdeps/generic/ldsodefs.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/generic/ldsodefs.h,v
retrieving revision 1.96
diff -c -p -d -r1.96 ldsodefs.h
*** sysdeps/generic/ldsodefs.h	6 Mar 2004 09:05:49 -0000	1.96
--- sysdeps/generic/ldsodefs.h	6 Mar 2004 20:26:09 -0000
*************** struct rtld_global
*** 347,354 ****
--- 347,356 ----
  #   define __rtld_local_attribute__
  #  endif
  extern struct rtld_global _rtld_local __rtld_local_attribute__;
+ #  undef __rtld_local_attribute__
  # endif
  extern struct rtld_global _rtld_global __rtld_global_attribute__;
+ # undef __rtld_global_attribute__
  #endif
  
  #ifndef SHARED
*************** struct rtld_global_ro
*** 504,519 ****
--- 506,528 ----
  };
  # define __rtld_global_attribute__
  # ifdef IS_IN_rtld
+ #  ifdef HAVE_VISIBILITY_ATTRIBUTE
+ #   define __rtld_local_attribute__ __attribute__ ((visibility ("hidden")))
+ #  else
+ #   define __rtld_local_attribute__
+ #  endif
  extern struct rtld_global_ro _rtld_local_ro
      attribute_relro __rtld_local_attribute__;
  extern struct rtld_global_ro _rtld_global_ro
      attribute_relro __rtld_global_attribute__;
+ #  undef __rtld_local_attribute__
  # else
  /* We cheat a bit here.  We declare the variable as as const even
     though it is at startup.  */
  extern const struct rtld_global_ro _rtld_global_ro
      attribute_relro __rtld_global_attribute__;
  # endif
+ # undef __rtld_global_attribute__
  #endif
  #undef EXTERN
  


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