svn commit: branches/uClibc-nptl/include
carmelo at uclibc.org
carmelo at uclibc.org
Tue Nov 20 10:00:47 UTC 2007
Author: carmelo
Date: 2007-11-20 02:00:46 -0800 (Tue, 20 Nov 2007)
New Revision: 20459
Log:
A bunch of fixes into include directory
- [elf.h] Add missing macro for GNU hash support
- [fcntl.h] Add extern declaration for fcntl64
- [libc-symbols] Re-enale 'hidden_proto' macro and others.
Synch it with trunk
- [tls.h] export USE___THREAD macro to librt too
- [unistd.h] Fix sysconf prototype
- [errno.h] Avoid warnings for duplicated macro definitions
Signed-off-by: Carmelo Amoroso <carmelo.amoroso at st.com>
Modified:
branches/uClibc-nptl/include/elf.h
branches/uClibc-nptl/include/errno.h
branches/uClibc-nptl/include/fcntl.h
branches/uClibc-nptl/include/libc-symbols.h
branches/uClibc-nptl/include/tls.h
branches/uClibc-nptl/include/unistd.h
Changeset:
Modified: branches/uClibc-nptl/include/elf.h
===================================================================
--- branches/uClibc-nptl/include/elf.h 2007-11-20 09:41:17 UTC (rev 20458)
+++ branches/uClibc-nptl/include/elf.h 2007-11-20 10:00:46 UTC (rev 20459)
@@ -431,6 +431,7 @@
#define SHT_SYMTAB_SHNDX 18 /* Extended section indeces */
#define SHT_NUM 19 /* Number of defined types. */
#define SHT_LOOS 0x60000000 /* Start OS-specific */
+#define SHT_GNU_HASH 0x6ffffff6 /* GNU-style hash table. */
#define SHT_GNU_LIBLIST 0x6ffffff7 /* Prelink library list */
#define SHT_CHECKSUM 0x6ffffff8 /* Checksum for DSO content. */
#define SHT_LOSUNW 0x6ffffffa /* Sun-specific low bound. */
@@ -813,6 +814,7 @@
If any adjustment is made to the ELF object after it has been
built these entries will need to be adjusted. */
#define DT_ADDRRNGLO 0x6ffffe00
+#define DT_GNU_HASH 0x6ffffef5 /* GNU-style hash table. */
#define DT_GNU_CONFLICT 0x6ffffef8 /* Start of conflict section */
#define DT_GNU_LIBLIST 0x6ffffef9 /* Library list */
#define DT_CONFIG 0x6ffffefa /* Configuration information. */
Modified: branches/uClibc-nptl/include/errno.h
===================================================================
--- branches/uClibc-nptl/include/errno.h 2007-11-20 09:41:17 UTC (rev 20458)
+++ branches/uClibc-nptl/include/errno.h 2007-11-20 10:00:46 UTC (rev 20459)
@@ -70,7 +70,9 @@
# endif
#endif
+#ifndef __set_errno
#define __set_errno(val) (errno = (val))
+#endif
#ifndef __ASSEMBLER__
extern int *__errno_location (void) __THROW __attribute__ ((__const__));
Modified: branches/uClibc-nptl/include/fcntl.h
===================================================================
--- branches/uClibc-nptl/include/fcntl.h 2007-11-20 09:41:17 UTC (rev 20458)
+++ branches/uClibc-nptl/include/fcntl.h 2007-11-20 10:00:46 UTC (rev 20459)
@@ -75,6 +75,10 @@
extern int __fcntl_nocancel (int fd, int cmd, ...);
#endif
+#ifdef __USE_LARGEFILE64
+extern int fcntl64 (int __fd, int __cmd, ...);
+#endif
+
/* Open FILE and return a new file descriptor for it, or -1 on error.
OFLAG determines the type of access used. If O_CREAT is on OFLAG,
the third argument is taken as a `mode_t', the mode of the created file.
Modified: branches/uClibc-nptl/include/libc-symbols.h
===================================================================
--- branches/uClibc-nptl/include/libc-symbols.h 2007-11-20 09:41:17 UTC (rev 20458)
+++ branches/uClibc-nptl/include/libc-symbols.h 2007-11-20 10:00:46 UTC (rev 20459)
@@ -233,6 +233,19 @@
# else /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
+# ifdef HAVE_ASM_SET_DIRECTIVE
+# ifdef HAVE_ASM_GLOBAL_DOT_NAME
+# define weak_alias(original, alias) \
+ .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ .set C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original) ASM_LINE_SEP \
+ .weak C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
+ .set C_SYMBOL_DOT_NAME (alias), C_SYMBOL_DOT_NAME (original)
+# else
+# define weak_alias(original, alias) \
+ .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ .set C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original)
+# endif
+# else /* ! HAVE_ASM_SET_DIRECTIVE */
# ifdef HAVE_ASM_GLOBAL_DOT_NAME
# define weak_alias(original, alias) \
.weak C_SYMBOL_NAME (alias) ASM_LINE_SEP \
@@ -244,7 +257,7 @@
.weak C_SYMBOL_NAME (alias) ASM_LINE_SEP \
C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
# endif
-
+# endif
# define weak_extern(symbol) \
.weak C_SYMBOL_NAME (symbol)
@@ -412,31 +425,63 @@
#if !defined STATIC && !defined __BCC__
# ifndef __ASSEMBLER__
-# define hidden_proto(name, attrs...)
-# define hidden_def(name)
-# define hidden_data_def(name)
-# define hidden_weak(name)
-# define hidden_data_weak(name)
+# define hidden_proto(name, attrs...) __hidden_proto (name, __GI_##name, ##attrs)
+# define __hidden_proto(name, internal, attrs...) \
+ extern __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
+ __hidden_proto_hiddenattr (attrs);
+# define __hidden_asmname(name) __hidden_asmname1 (__USER_LABEL_PREFIX__, name)
+# define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
+# define __hidden_asmname2(prefix, name) #prefix name
+# define __hidden_ver1(local, internal, name) \
+ extern __typeof (name) __EI_##name __asm__(__hidden_asmname (#internal)); \
+ extern __typeof (name) __EI_##name __attribute__((alias (__hidden_asmname1 (,#local))))
+# define hidden_def(name) __hidden_ver1(__GI_##name, name, name);
+# define hidden_data_def(name) hidden_def(name)
+# define hidden_weak(name) __hidden_ver1(__GI_##name, name, name) __attribute__((weak));
+# define hidden_data_weak(name) hidden_weak(name)
# else /* __ASSEMBLER__ */
# ifdef HAVE_ASM_SET_DIRECTIVE
# ifdef HAVE_ASM_GLOBAL_DOT_NAME
-# define _hidden_strong_alias(original, alias)
+# define _hidden_strong_alias(original, alias) \
+ ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ .hidden C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ .set C_SYMBOL_NAME (alias),C_SYMBOL_NAME (original) ASM_LINE_SEP \
+ ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
+ .hidden C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
+ .set C_SYMBOL_DOT_NAME (alias),C_SYMBOL_DOT_NAME (original)
# else
-# define _hidden_strong_alias(original, alias)
+# define _hidden_strong_alias(original, alias) \
+ ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ .hidden C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ .set C_SYMBOL_NAME (alias),C_SYMBOL_NAME (original)
# endif
# else
# ifdef HAVE_ASM_GLOBAL_DOT_NAME
-# define _hidden_strong_alias(original, alias)
+# define _hidden_strong_alias(original, alias) \
+ ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ .hidden C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) ASM_LINE_SEP \
+ ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
+ .hidden C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
+ C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
# else
-# define _hidden_strong_alias(original, alias)
+# define _hidden_strong_alias(original, alias) \
+ ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ .hidden C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
# endif
# endif
# ifdef HAVE_ASM_GLOBAL_DOT_NAME
-# define _hidden_weak_alias(original, alias)
+# define _hidden_weak_alias(original, alias) \
+ .hidden C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ .hidden C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
+ weak_alias(original, alias)
# else
-# define _hidden_weak_alias(original, alias)
+# define _hidden_weak_alias(original, alias) \
+ .hidden C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ weak_alias(original, alias)
# endif
/* For assembly, we need to do the opposite of what we do in C:
@@ -448,11 +493,11 @@
but we provide it for consistency with the C usage.
hidden_proto doesn't make sense for assembly but the equivalent
is to call via the HIDDEN_JUMPTARGET macro instead of JUMPTARGET. */
-# define hidden_def(name)
-# define hidden_data_def(name)
-# define hidden_weak(name)
-# define hidden_data_weak(name)
-# define HIDDEN_JUMPTARGET(name)
+# define hidden_def(name) _hidden_strong_alias (name, __GI_##name)
+# define hidden_data_def(name) _hidden_strong_alias (name, __GI_##name)
+# define hidden_weak(name) _hidden_weak_alias (name, __GI_##name)
+# define hidden_data_weak(name) _hidden_weak_alias (name, __GI_##name)
+# define HIDDEN_JUMPTARGET(name) __GI_##name
# endif /* __ASSEMBLER__ */
#else /* SHARED */
# ifndef __ASSEMBLER__
Modified: branches/uClibc-nptl/include/tls.h
===================================================================
--- branches/uClibc-nptl/include/tls.h 2007-11-20 09:41:17 UTC (rev 20458)
+++ branches/uClibc-nptl/include/tls.h 2007-11-20 10:00:46 UTC (rev 20459)
@@ -6,7 +6,7 @@
#include_next <tls.h>
#if USE_TLS && HAVE___THREAD \
- && (!defined NOT_IN_libc || defined IS_IN_libpthread)
+ && (!defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt)
# define USE___THREAD 1
Modified: branches/uClibc-nptl/include/unistd.h
===================================================================
--- branches/uClibc-nptl/include/unistd.h 2007-11-20 09:41:17 UTC (rev 20458)
+++ branches/uClibc-nptl/include/unistd.h 2007-11-20 10:00:46 UTC (rev 20459)
@@ -561,7 +561,7 @@
extern long int fpathconf (int __fd, int __name) __THROW;
/* Get the value of the system variable NAME. */
-extern long int sysconf (int __name) __THROW __attribute__ ((__const__));
+extern long int sysconf (int __name) __THROW;
#ifdef __USE_POSIX2
/* Get the value of the string-valued system variable NAME. */
More information about the uClibc-cvs
mailing list