diff options
| author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-07-22 07:27:02 +0000 |
|---|---|---|
| committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-07-22 07:27:02 +0000 |
| commit | 4ace63889357f5ffc8b96a8a6144352e7ce56eec (patch) | |
| tree | 21cae77af0719690b1255038635714a30e4f073d /libpthread/nptl/compat/libc-symbols.h | |
| parent | f5faeff83458b4dc618ca83edd2dd33dbe63c15d (diff) | |
| download | uClibc-alpine-4ace63889357f5ffc8b96a8a6144352e7ce56eec.tar.bz2 uClibc-alpine-4ace63889357f5ffc8b96a8a6144352e7ce56eec.tar.xz | |
Big set of various patches to get the NPTL libraries to build and link.
Diffstat (limited to 'libpthread/nptl/compat/libc-symbols.h')
| -rw-r--r-- | libpthread/nptl/compat/libc-symbols.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/libpthread/nptl/compat/libc-symbols.h b/libpthread/nptl/compat/libc-symbols.h index 9c7cc6238..777cafb3e 100644 --- a/libpthread/nptl/compat/libc-symbols.h +++ b/libpthread/nptl/compat/libc-symbols.h @@ -1,6 +1,14 @@ #ifndef _LIBC_SYMBOLS_H #define _LIBC_SYMBOLS_H 1 +#ifndef __SYMBOL_PREFIX +# ifdef NO_UNDERSCORES +# define __SYMBOL_PREFIX +# else +# define __SYMBOL_PREFIX "_" +# endif +#endif + /* Handling on non-exported internal names. We have to do this only for shared code. */ #ifdef SHARED @@ -26,6 +34,29 @@ # define INTVARDEF2(name, newname) #endif +/* These are all done the same way in ELF. + There is a new section created for each set. */ +# ifdef SHARED +/* 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__ ((used, section (#set))) = &(symbol) +# else +# define _elf_set_element(set, symbol) \ + static const void *const __elf_set_##set##_element_##symbol##__ \ + __attribute__ ((used, section (#set))) = &(symbol) +# endif + +#define text_set_element(set, symbol) _elf_set_element(set, symbol) +#define __sec_comment "\n\t#" +#define __libc_freeres_fn_section \ + __attribute__ ((section ("__libc_freeres_fn"))) +#define libc_freeres_fn(name) \ + static void name (void) __attribute_used__ __libc_freeres_fn_section; \ + text_set_element (__libc_subfreeres, name); \ + static void name (void) + #if 0 # ifndef __ASSEMBLER__ # if !defined HAVE_VISIBILITY_ATTRIBUTE \ |
