This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
[alpha] fix gp-relative reloc overflow
- From: Richard Henderson <rth at twiddle dot net>
- To: libc-alpha at sources dot redhat dot com
- Date: Thu, 5 Jun 2003 18:12:19 -0700
- Subject: [alpha] fix gp-relative reloc overflow
Magic variables can't be described with arbitrary type. The
compiler is allowed to assume they live in .sdata, and so are
accessible with reduced-width relocations.
Fortunately this is never necessary. Declaring the magic as
an array of unspecified length quashes compiler size optimizations,
and normally also removes the need for the '&' operator (though
I didn't actually touch that here).
Ok?
r~
* include/libc-symbols.h (symbol_set_declare): Use arrays
of unspecified size.
Index: include/libc-symbols.h
===================================================================
RCS file: /cvs/glibc/libc/include/libc-symbols.h,v
retrieving revision 1.54
diff -c -p -d -r1.54 libc-symbols.h
*** include/libc-symbols.h 28 May 2003 19:55:28 -0000 1.54
--- include/libc-symbols.h 6 Jun 2003 00:59:39 -0000
***************
*** 350,357 ****
For static linking, the set might be wholly absent and so we use
weak references. */
# define symbol_set_declare(set) \
! extern void *const __start_##set __symbol_set_attribute; \
! extern void *const __stop_##set __symbol_set_attribute;
# ifdef SHARED
# define __symbol_set_attribute attribute_hidden
# else
--- 350,357 ----
For static linking, the set might be wholly absent and so we use
weak references. */
# define symbol_set_declare(set) \
! extern char const __start_##set[] __symbol_set_attribute; \
! extern char const __stop_##set[] __symbol_set_attribute;
# ifdef SHARED
# define __symbol_set_attribute attribute_hidden
# else