[Glibc-bsd-commits] r5050 - in trunk/glibc-ports/kfreebsd: . bits i386 x86_64
Petr Salinger
ps-guest at alioth.debian.org
Sun Oct 13 18:04:45 UTC 2013
Author: ps-guest
Date: 2013-10-13 18:04:44 +0000 (Sun, 13 Oct 2013)
New Revision: 5050
Added:
trunk/glibc-ports/kfreebsd/bits/auxv.h
Removed:
trunk/glibc-ports/kfreebsd/bits/elf.h
Modified:
trunk/glibc-ports/kfreebsd/dl-support.c
trunk/glibc-ports/kfreebsd/dl-sysdep.c
trunk/glibc-ports/kfreebsd/i386/dl-procinfo.h
trunk/glibc-ports/kfreebsd/x86_64/dl-procinfo.h
Log:
auxval changes
Added: trunk/glibc-ports/kfreebsd/bits/auxv.h
===================================================================
--- trunk/glibc-ports/kfreebsd/bits/auxv.h (rev 0)
+++ trunk/glibc-ports/kfreebsd/bits/auxv.h 2013-10-13 18:04:44 UTC (rev 5050)
@@ -0,0 +1,44 @@
+/* Copyright (C) 1995-2013 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+/* Legal values for a_type (entry type). */
+
+#define AT_NULL 0 /* End of vector */
+#define AT_IGNORE 1 /* Entry should be ignored */
+#define AT_EXECFD 2 /* File descriptor of program */
+#define AT_PHDR 3 /* Program headers for program */
+#define AT_PHENT 4 /* Size of program header entry */
+#define AT_PHNUM 5 /* Number of program headers */
+#define AT_PAGESZ 6 /* System page size */
+#define AT_BASE 7 /* Base address of interpreter */
+#define AT_FLAGS 8 /* Flags */
+#define AT_ENTRY 9 /* Entry point of program */
+#define AT_NOTELF 10 /* Program is not ELF */
+#define AT_UID 11 /* Real uid */
+#define AT_EUID 12 /* Effective uid */
+#define AT_GID 13 /* Real gid */
+#define AT_EGID 14 /* Effective gid */
+
+#define AT_EXECPATH 15 /* Path to the executable. */
+#define AT_CANARY 16 /* Canary for SSP. */
+#define AT_CANARYLEN 17 /* Length of the canary. */
+#define AT_OSRELDATE 18 /* OSRELDATE. */
+#define AT_NCPUS 19 /* Number of CPUs. */
+#define AT_PAGESIZES 20 /* Pagesizes. */
+#define AT_PAGESIZESLEN 21 /* Number of pagesizes. */
+#define AT_STACKPROT 23 /* Initial stack protection. */
+
Deleted: trunk/glibc-ports/kfreebsd/bits/elf.h
===================================================================
--- trunk/glibc-ports/kfreebsd/bits/elf.h 2013-10-13 10:38:18 UTC (rev 5049)
+++ trunk/glibc-ports/kfreebsd/bits/elf.h 2013-10-13 18:04:44 UTC (rev 5050)
@@ -1,37 +0,0 @@
-/* This file defines standard ELF types, structures, and macros.
- Copyright (C) 1995-2003,2004,2005,2006,2007,2008,2009,2010
- 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
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _BITS_ELF_H
-#define _BITS_ELF_H
-
-__BEGIN_DECLS
-
-#define AT_EXECPATH 15 /* Path to the executable. */
-#define AT_CANARY 16 /* Canary for SSP. */
-#define AT_CANARYLEN 17 /* Length of the canary. */
-#define AT_OSRELDATE 18 /* OSRELDATE. */
-#define AT_NCPUS 19 /* Number of CPUs. */
-#define AT_PAGESIZES 20 /* Pagesizes. */
-#define AT_PAGESIZESLEN 21 /* Number of pagesizes. */
-#define AT_STACKPROT 23 /* Initial stack protection. */
-
-__END_DECLS
-
-#endif /* elf.h */
Modified: trunk/glibc-ports/kfreebsd/dl-support.c
===================================================================
--- trunk/glibc-ports/kfreebsd/dl-support.c 2013-10-13 10:38:18 UTC (rev 5049)
+++ trunk/glibc-ports/kfreebsd/dl-support.c 2013-10-13 18:04:44 UTC (rev 5050)
@@ -17,12 +17,11 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define _dl_aux_init _dl_aux_init_ignored_code
-#include <elf/dl-support.c>
-#include <bits/elf.h>
-#undef _dl_aux_init
+#include <ldsodefs.h>
+#ifdef HAVE_AUX_VECTOR
+#include <bits/auxv.h>
+int _dl_clktck;
-#ifdef HAVE_AUX_VECTOR
void
internal_function
_dl_aux_init (ElfW(auxv_t) *av)
@@ -41,4 +40,7 @@
break;
}
}
+#undef HAVE_AUX_VECTOR
#endif
+
+#include <elf/dl-support.c>
Modified: trunk/glibc-ports/kfreebsd/dl-sysdep.c
===================================================================
--- trunk/glibc-ports/kfreebsd/dl-sysdep.c 2013-10-13 10:38:18 UTC (rev 5049)
+++ trunk/glibc-ports/kfreebsd/dl-sysdep.c 2013-10-13 18:04:44 UTC (rev 5050)
@@ -1,6 +1,5 @@
-/* Dynamic linker system dependencies for GNU/kFreeBSD.
- Copyright (C) 1995-1998,2000-2008,2009,2010,2011
- Free Software Foundation, Inc.
+/* Operating system support for run-time dynamic linker. GNU/kFreeBSD version.
+ Copyright (C) 1995-2013 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
@@ -14,28 +13,75 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
-/* For SHARED, use the generic dynamic linker system interface code. */
-/* otherwise the code is in dl-support.c */
+/* We conditionalize the whole of this file rather than simply eliding it
+ from the static build, because other sysdeps/ versions of this file
+ might define things needed by a static build. */
+#include <stdlib.h>
+#include <sys/sysctl.h>
+
+#ifdef SHARED
+
+#include <assert.h>
+#include <elf.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <libintl.h>
#include <string.h>
-#include <fcntl.h>
#include <unistd.h>
-#include <sys/sysctl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
#include <ldsodefs.h>
-#include <kernel-features.h>
+#include <_itoa.h>
+#include <fpu_control.h>
-#ifdef SHARED
-# define _dl_sysdep_start _dl_sysdep_start_ignored_code
-# define _dl_show_auxv _dl_show_auxv_ignored_code
-# include <elf/dl-sysdep.c>
-# include <bits/elf.h>
-# undef _dl_sysdep_start
-# undef _dl_show_auxv
+#include <entry.h>
+#include <dl-machine.h>
+#include <dl-procinfo.h>
+#include <dl-osinfo.h>
+#include <hp-timing.h>
+#include <tls.h>
+extern char **_environ attribute_hidden;
+extern char _end[] attribute_hidden;
+
+/* Protect SUID program against misuse of file descriptors. */
+extern void __libc_check_standard_fds (void);
+
+#ifdef NEED_DL_BASE_ADDR
+ElfW(Addr) _dl_base_addr;
+#endif
+int __libc_enable_secure attribute_relro = 0;
+INTVARDEF(__libc_enable_secure)
+int __libc_multiple_libcs = 0; /* Defining this here avoids the inclusion
+ of init-first. */
+/* This variable contains the lowest stack address ever used. */
+void *__libc_stack_end attribute_relro = NULL;
+rtld_hidden_data_def(__libc_stack_end)
+void *_dl_random attribute_relro = NULL;
+
+#ifndef DL_FIND_ARG_COMPONENTS
+# define DL_FIND_ARG_COMPONENTS(cookie, argc, argv, envp, auxp) \
+ do { \
+ void **_tmp; \
+ (argc) = *(long int *) cookie; \
+ (argv) = (char **) ((long int *) cookie + 1); \
+ (envp) = (argv) + (argc) + 1; \
+ for (_tmp = (void **) (envp); *_tmp; ++_tmp) \
+ continue; \
+ (auxp) = (void *) ++_tmp; \
+ } while (0)
+#endif
+
+#ifndef DL_STACK_END
+# define DL_STACK_END(cookie) ((void *) (cookie))
+#endif
+
+
extern const char *_self_program_name_from_auxv attribute_hidden;
ElfW(Addr)
@@ -226,8 +272,16 @@
_dl_printf ("AT_??? (0x%s): 0x%s\n", val, val2);
}
}
+void
+internal_function
+_dl_sysdep_start_cleanup (void)
+{
+}
+
+
#endif
+
int
attribute_hidden
_dl_discover_osversion (void)
Modified: trunk/glibc-ports/kfreebsd/i386/dl-procinfo.h
===================================================================
--- trunk/glibc-ports/kfreebsd/i386/dl-procinfo.h 2013-10-13 10:38:18 UTC (rev 5049)
+++ trunk/glibc-ports/kfreebsd/i386/dl-procinfo.h 2013-10-13 18:04:44 UTC (rev 5050)
@@ -1 +1 @@
-#include <sysdeps/unix/sysv/linux/i386/dl-procinfo.h>
+#include <sysdeps/i386/dl-procinfo.h>
Modified: trunk/glibc-ports/kfreebsd/x86_64/dl-procinfo.h
===================================================================
--- trunk/glibc-ports/kfreebsd/x86_64/dl-procinfo.h 2013-10-13 10:38:18 UTC (rev 5049)
+++ trunk/glibc-ports/kfreebsd/x86_64/dl-procinfo.h 2013-10-13 18:04:44 UTC (rev 5050)
@@ -1 +1,5 @@
-#include <sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h>
+#ifdef IS_IN_ldconfig
+# include <sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/dl-procinfo.h>
+#else
+# include <sysdeps/generic/dl-procinfo.h>
+#endif
More information about the Glibc-bsd-commits
mailing list