From 53afa8d96790cce8fd0d0ce71307bc7ae31c15fb Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 12 Apr 1995 01:03:38 +0000 Subject: Tue Apr 11 20:38:55 1995 Roland McGrath * sysdeps/i386/add_n.S [PIC]: Use self-call to avoid generating reloc. * sysdeps/i386/sub_n.S [PIC]: Likewise. * libc-symbols.h (_elf_set_element) [PIC]: Don't make the element word `const'. * Makeconfig (CPPFLAGS, CFLAGS): Fix swapped references to $(foo-$(suffix $@)). * manual/Makefile (chapters-incl): Filter out summary.texi. --- libc-symbols.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libc-symbols.h') diff --git a/libc-symbols.h b/libc-symbols.h index 83773bfdc9..be88e7601b 100644 --- a/libc-symbols.h +++ b/libc-symbols.h @@ -153,9 +153,17 @@ Cambridge, MA 02139, USA. */ /* These are all done the same way in ELF. There is a new section created for each set. */ +#ifdef PIC +/* When building a shared library, make the set section writable, + because it will need to be relocated at run time anyway. */ +#define _elf_set_element(set, symbol) \ + static const void *__elf_set_##set##_element_##symbol##__ \ + __attribute__ ((section (#set))) = &(symbol) +#else #define _elf_set_element(set, symbol) \ static const void *const __elf_set_##set##_element_##symbol##__ \ __attribute__ ((section (#set))) = &(symbol) +#endif /* Define SET as a symbol set. This may be required (it is in a.out) to be able to use the set's contents. */ -- cgit 1.4.1