From 2c2f8f84c7eec39a073ea503ad05bc4671fcad26 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Wed, 24 May 2006 15:31:25 +0000 Subject: [PATCH] 2006-05-24 Carlos O'Donell * sysdeps/hppa/ldsodefs.h: New file. * sysdeps/unix/sysv/linux/hppa/bits/mman.h: Only define MADV_* macros when __USE_BSD is present. (MADV_REMOVE, MADV_DONTFORK, MADV_DOFORK): Define. --- ChangeLog.hppa | 7 ++++ sysdeps/hppa/ldsodefs.h | 42 ++++++++++++++++++++++++ sysdeps/unix/sysv/linux/hppa/bits/mman.h | 22 ++++++++----- 3 files changed, 63 insertions(+), 8 deletions(-) create mode 100644 sysdeps/hppa/ldsodefs.h diff --git a/ChangeLog.hppa b/ChangeLog.hppa index fe73322f4d..4aeaac4b29 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,10 @@ +2006-05-24 Carlos O'Donell + + * sysdeps/hppa/ldsodefs.h: New file. + * sysdeps/unix/sysv/linux/hppa/bits/mman.h: + Only define MADV_* macros when __USE_BSD is present. + (MADV_REMOVE, MADV_DONTFORK, MADV_DOFORK): Define. + 2006-05-15 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/clone.S: Accept extra arguments diff --git a/sysdeps/hppa/ldsodefs.h b/sysdeps/hppa/ldsodefs.h new file mode 100644 index 0000000000..5bd7887265 --- /dev/null +++ b/sysdeps/hppa/ldsodefs.h @@ -0,0 +1,42 @@ +/* Run-time dynamic linker data structures for loaded ELF shared objects. + Copyright (C) 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 + 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 _HPPA_LDSODEFS_H +#define _HPPA_LDSODEFS_H 1 + +#include + +struct La_hppa_regs; +struct La_hppa_retval; + +#define ARCH_PLTENTER_MEMBERS \ + Elf32_Addr (*hppa_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *, \ + uintptr_t *, struct La_hppa_regs *, \ + unsigned int *, const char *name, \ + long int *framesizep); + +#define ARCH_PLTEXIT_MEMBERS \ + unsigned int (*hppa_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *, \ + uintptr_t *, \ + const struct La_hppa_regs *, \ + struct La_hppa_retval *, const char *); + +#include_next + +#endif diff --git a/sysdeps/unix/sysv/linux/hppa/bits/mman.h b/sysdeps/unix/sysv/linux/hppa/bits/mman.h index 0b23bd3220..54531ecf28 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/mman.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/mman.h @@ -53,14 +53,20 @@ #define MCL_CURRENT 1 /* lock all current mappings */ #define MCL_FUTURE 2 /* lock all future mappings */ -#define MADV_NORMAL 0 /* no further special treatment */ -#define MADV_RANDOM 1 /* expect random page references */ -#define MADV_SEQUENTIAL 2 /* expect sequential page references */ -#define MADV_WILLNEED 3 /* will need these pages */ -#define MADV_DONTNEED 4 /* dont need these pages */ -#define MADV_SPACEAVAIL 5 /* insure that resources are reserved */ -#define MADV_VPS_PURGE 6 /* Purge pages from VM page cache */ -#define MADV_VPS_INHERIT 7 /* Inherit parents page size */ +/* Advice to "madvise" */ +#ifdef __USE_BSD +# define MADV_NORMAL 0 /* no further special treatment */ +# define MADV_RANDOM 1 /* expect random page references */ +# define MADV_SEQUENTIAL 2 /* expect sequential page references */ +# define MADV_WILLNEED 3 /* will need these pages */ +# define MADV_DONTNEED 4 /* dont need these pages */ +# define MADV_SPACEAVAIL 5 /* insure that resources are reserved */ +# define MADV_VPS_PURGE 6 /* Purge pages from VM page cache */ +# define MADV_VPS_INHERIT 7 /* Inherit parents page size */ +# define MADV_REMOVE 9 /* Remove these pages and resources. */ +# define MADV_DONTFORK 10 /* Do not inherit across fork. */ +# define MADV_DOFORK 11 /* Do inherit across fork. */ +#endif /* The range 12-64 is reserved for page size specification. */ #define MADV_4K_PAGES 12 /* Use 4K pages */