diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-03-01 06:55:57 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2006-03-01 06:55:57 +0000 |
commit | 6a8c1091fdc978b0e369f4ca3f58a07c2f8b9d33 (patch) | |
tree | 754e2649fcc68e83b3ad749cb5a1a1f7549ffafb /include | |
parent | 378b1353df56387b0706bc42cb661ff2227c8eb9 (diff) | |
download | glibc-6a8c1091fdc978b0e369f4ca3f58a07c2f8b9d33.tar glibc-6a8c1091fdc978b0e369f4ca3f58a07c2f8b9d33.tar.gz glibc-6a8c1091fdc978b0e369f4ca3f58a07c2f8b9d33.tar.bz2 glibc-6a8c1091fdc978b0e369f4ca3f58a07c2f8b9d33.zip |
Updated to fedora-glibc-20060301T0647
Diffstat (limited to 'include')
-rw-r--r-- | include/fcntl.h | 7 | ||||
-rw-r--r-- | include/libc-symbols.h | 7 | ||||
-rw-r--r-- | include/link.h | 130 | ||||
-rw-r--r-- | include/unistd.h | 8 |
4 files changed, 36 insertions, 116 deletions
diff --git a/include/fcntl.h b/include/fcntl.h index f00881449d..e23af1c3d3 100644 --- a/include/fcntl.h +++ b/include/fcntl.h @@ -17,6 +17,13 @@ extern int __open (__const char *__file, int __oflag, ...); libc_hidden_proto (__open) extern int __fcntl (int __fd, int __cmd, ...); libc_hidden_proto (__fcntl) +extern int __openat (int __fd, __const char *__file, int __oflag, ...) + __nonnull ((2)); +libc_hidden_proto (__openat) +extern int __openat64 (int __fd, __const char *__file, int __oflag, ...) + __nonnull ((2)); +libc_hidden_proto (__openat64) + /* Helper functions for the various *at functions. For Linux. */ extern void __atfct_seterrno (int errval, int fd, const char *buf) diff --git a/include/libc-symbols.h b/include/libc-symbols.h index 8ee940719e..da46f5e804 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -1,6 +1,7 @@ /* Support macros for making weak and strong aliases for symbols, and for using symbol sets and linker warnings with GNU ld. - Copyright (C) 1995-1998,2000-2003,2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1995-1998,2000-2003,2004,2005,2006 + Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -502,7 +503,7 @@ for linking") } libc_hidden_weak (foo) - Simularly for global data. If references to foo within libc.so should + Similarly for global data. If references to foo within libc.so should always go to foo defined in libc.so, then in include/foo.h you add: libc_hidden_proto (foo) @@ -517,7 +518,7 @@ for linking") int foo = INITIAL_FOO_VALUE; libc_hidden_data_weak (foo) - If foo is normally just an alias (strong or weak) of some other function, + If foo is normally just an alias (strong or weak) to some other function, you should use the normal strong_alias first, then add libc_hidden_def or libc_hidden_weak: diff --git a/include/link.h b/include/link.h index 0c35264096..3079ae8739 100644 --- a/include/link.h +++ b/include/link.h @@ -1,6 +1,6 @@ /* Data structure for communication from the run-time dynamic linker for loaded ELF shared objects. - Copyright (C) 1995-2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1995-2002,2003,2004,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,67 +18,32 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef _LINK_H -#define _LINK_H 1 +#ifndef _PRIVATE_LINK_H +#define _PRIVATE_LINK_H 1 -#include <elf.h> -#include <dlfcn.h> -#include <stddef.h> -#include <sys/types.h> +#ifdef _LINK_H +# error this should be impossible +#endif + +/* Get most of the contents from the public header, but we define a + different `struct link_map' type for private use. The la_objopen + prototype uses the type, so we have to declare it separately. */ +#define link_map link_map_public +#define la_objopen la_objopen_wrongproto +#include <elf/link.h> +#undef link_map +#undef la_objopen + +struct link_map; +extern unsigned int la_objopen (struct link_map *__map, Lmid_t __lmid, + uintptr_t *__cookie); -/* We use this macro to refer to ELF types independent of the native wordsize. - `ElfW(TYPE)' is used in place of `Elf32_TYPE' or `Elf64_TYPE'. */ -#define ElfW(type) _ElfW (Elf, __ELF_NATIVE_CLASS, type) -#define _ElfW(e,w,t) _ElfW_1 (e, w, _##t) -#define _ElfW_1(e,w,t) e##w##t -#include <bits/elfclass.h> /* Defines __ELF_NATIVE_CLASS. */ -#include <bits/link.h> +#include <stddef.h> #include <bits/linkmap.h> #include <dl-lookupcfg.h> #include <tls.h> /* Defines USE_TLS. */ -/* Rendezvous structure used by the run-time dynamic linker to communicate - details of shared object loading to the debugger. If the executable's - dynamic section has a DT_DEBUG element, the run-time linker sets that - element's value to the address where this structure can be found. */ - -struct r_debug - { - int r_version; /* Version number for this protocol. */ - - struct link_map *r_map; /* Head of the chain of loaded objects. */ - - /* This is the address of a function internal to the run-time linker, - that will always be called when the linker begins to map in a - library or unmap it, and again when the mapping change is complete. - The debugger can set a breakpoint at this address if it wants to - notice shared object mapping changes. */ - ElfW(Addr) r_brk; - enum - { - /* This state value describes the mapping change taking place when - the `r_brk' address is called. */ - RT_CONSISTENT, /* Mapping change is complete. */ - RT_ADD, /* Beginning to add a new object. */ - RT_DELETE /* Beginning to remove an object mapping. */ - } r_state; - - ElfW(Addr) r_ldbase; /* Base address the linker is loaded at. */ - }; - -/* This is the instance of that structure used by the dynamic linker. */ -extern struct r_debug _r_debug; - -/* This symbol refers to the "dynamic structure" in the `.dynamic' section - of whatever module refers to `_DYNAMIC'. So, to find its own - `struct r_debug', a program could do: - for (dyn = _DYNAMIC; dyn->d_tag != DT_NULL; ++dyn) - if (dyn->d_tag == DT_DEBUG) - r_debug = (struct r_debug *) dyn->d_un.d_ptr; - */ -extern ElfW(Dyn) _DYNAMIC[]; - /* Some internal data structures of the dynamic linker used in the linker map. We only provide forward declarations. */ @@ -316,45 +281,6 @@ struct link_map } l_audit[0]; }; -/* Version numbers for la_version handshake interface. */ -#define LAV_CURRENT 1 - -/* Activity types signaled through la_activity. */ -enum - { - LA_ACT_CONSISTENT, - LA_ACT_ADD, - LA_ACT_DELETE - }; - -/* Values representing origin of name for dynamic loading. */ -enum - { - LA_SER_ORIG = 0x01, /* Original name. */ - LA_SER_LIBPATH = 0x02, /* Directory from LD_LIBRARY_PATH. */ - LA_SER_RUNPATH = 0x04, /* Directory from RPATH/RUNPATH. */ - LA_SER_CONFIG = 0x08, /* Found through ldconfig. */ - LA_SER_DEFAULT = 0x40, /* Default directory. */ - LA_SER_SECURE = 0x80 /* Unused. */ - }; - -/* Values for la_objopen return value. */ -enum - { - LA_FLG_BINDTO = 0x01, /* Audit symbols bound to this object. */ - LA_FLG_BINDFROM = 0x02 /* Audit symbols bound from this object. */ - }; - -/* Values for la_symbind flags parameter. */ -enum - { - LA_SYMB_NOPLTENTER = 0x01, /* la_pltenter will not be called. */ - LA_SYMB_NOPLTEXIT = 0x02, /* la_pltexit will not be called. */ - LA_SYMB_STRUCTCALL = 0x04, /* Return value is a structure. */ - LA_SYMB_DLSYM = 0x08, /* Binding due to dlsym call. */ - LA_SYMB_ALTVALUE = 0x10 /* Value has been changed by a previous - la_symbind call. */ - }; #if __ELF_NATIVE_CLASS == 32 # define symbind symbind32 @@ -364,22 +290,8 @@ enum # error "__ELF_NATIVE_CLASS must be defined" #endif -struct dl_phdr_info - { - ElfW(Addr) dlpi_addr; - const char *dlpi_name; - const ElfW(Phdr) *dlpi_phdr; - ElfW(Half) dlpi_phnum; - - unsigned long long int dlpi_adds; - unsigned long long int dlpi_subs; - }; - -extern int dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info, - size_t size, void *data), - void *data); extern int __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info, size_t size, void *data), void *data); -#endif /* link.h */ +#endif /* include/link.h */ diff --git a/include/unistd.h b/include/unistd.h index f4d6cad7b6..670cb324ae 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -96,10 +96,10 @@ extern int __setgid (__gid_t __gid); extern int __setpgid (__pid_t __pid, __pid_t __pgid); libc_hidden_proto (__setpgid) extern int __setregid (__gid_t __rgid, __gid_t __egid); -extern int __getresuid (__uid_t *__euid, __uid_t *__ruid, __uid_t *__suid); -extern int __getresgid (__gid_t *__egid, __gid_t *__rgid, __gid_t *__sgid); -extern int __setresuid (__uid_t __euid, __uid_t __ruid, __uid_t __suid); -extern int __setresgid (__gid_t __egid, __gid_t __rgid, __gid_t __sgid); +extern int __getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid); +extern int __getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid); +extern int __setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid); +extern int __setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid); libc_hidden_proto (__getresuid) libc_hidden_proto (__getresgid) libc_hidden_proto (__setresuid) |