Offer an option to build the gdbserver statically. This helps in case of debugging shared library loading.
1 See http://sources.redhat.com/ml/libc-hacker/2003-12/msg00023.html
2 or http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/s390/s390-32/posix_fadvise64.c?cvsroot=glibc
6 ../sysdeps/unix/sysv/linux/posix_fadvise64.c: In function `__posix_fadvise64_l64':
7 ../sysdeps/unix/sysv/linux/posix_fadvise64.c:35: warning: implicit declaration of function `DECLARGS_6'
8 ../sysdeps/unix/sysv/linux/posix_fadvise64.c:35: error: parse error before "register"
10 ../sysdeps/unix/sysv/linux/posix_fadvise64.c:35: error: parse error before "ASMFMT_6"
11 make[2]: *** [crosstool-0.28-rc34/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-2.3.3/build-glibc/io/posix_fadvise64.o] Error 1
14 From: Martin Schwidefsky <schwidefsky at de dot ibm dot com>
15 Organization: IBM Deutschland GmbH
16 To: libc-hacker at sources dot redhat dot com
17 Subject: fadvise64_64 for s390-32.
18 Date: Fri, 5 Dec 2003 18:46:33 +0100
21 on s390* system calls can have up to 5 paramters. The generic linux
22 implemenation of fadvise64_64 for 32 bit systems needs 6 parameters,
23 so we need to have a s390-32 special version of posix_fadvise64.c.
24 For s390-64 we do not have the problem because there fadvise64_64
25 has only 4 parameters.
30 2003-12-05 Martin Schwidefsky <schwidefsky@de.ibm.com>
32 * sysdeps/unix/sysv/linux/s390/s390-32/posix_fadvise64.c: New file.
34 diff -urN libc/sysdeps/unix/sysv/linux/s390/s390-32/posix_fadvise64.c libc-s390/sysdeps/unix/sysv/linux/s390/s390-32/posix_fadvise64.c
35 --- libc/sysdeps/unix/sysv/linux/s390/s390-32/posix_fadvise64.c 1970-01-01 01:00:00.000000000 +0100
36 +++ libc-s390/sysdeps/unix/sysv/linux/s390/s390-32/posix_fadvise64.c 2003-11-13 15:31:40.000000000 +0100
38 +/* Copyright (C) 2003 Free Software Foundation, Inc.
39 + This file is part of the GNU C Library.
41 + The GNU C Library is free software; you can redistribute it and/or
42 + modify it under the terms of the GNU Lesser General Public
43 + License as published by the Free Software Foundation; either
44 + version 2.1 of the License, or (at your option) any later version.
46 + The GNU C Library is distributed in the hope that it will be useful,
47 + but WITHOUT ANY WARRANTY; without even the implied warranty of
48 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
49 + Lesser General Public License for more details.
51 + You should have received a copy of the GNU Lesser General Public
52 + License along with the GNU C Library; if not, write to the Free
53 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
59 +#include <kernel-features.h>
61 +int __posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise);
62 +int __posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise);
64 +/* Advice the system about the expected behaviour of the application with
65 + respect to the file associated with FD. */
67 +struct fadvise64_64_layout
76 +__posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise)
78 +#ifdef __NR_fadvise64_64
79 + struct fadvise64_64_layout parameters;
80 + INTERNAL_SYSCALL_DECL (err);
83 + parameters.offset = offset;
84 + parameters.len = len;
85 + parameters.advise = advise;
86 + int ret = INTERNAL_SYSCALL (fadvise64_64, err, 1, ¶meters);
87 + if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
89 +# ifndef __ASSUME_FADVISE64_64_SYSCALL
90 + if (INTERNAL_SYSCALL_ERRNO (ret, err) != ENOSYS)
92 + return INTERNAL_SYSCALL_ERRNO (ret, err);
94 +#ifndef __ASSUME_FADVISE64_64_SYSCALL
95 +# ifdef __NR_fadvise64
96 + if (len != (off_t) len)
99 + INTERNAL_SYSCALL_DECL (err2);
100 + int ret2 = INTERNAL_SYSCALL (fadvise64, err2, 5, fd,
101 + __LONG_LONG_PAIR ((long) (offset >> 32),
103 + (off_t) len, advise);
104 + if (!INTERNAL_SYSCALL_ERROR_P (ret2, err2))
106 + return INTERNAL_SYSCALL_ERRNO (ret2, err2);
113 +#include <shlib-compat.h>
115 +#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_3_3)
118 +__posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise)
120 + return __posix_fadvise64_l64 (fd, offset, len, advise);
123 +versioned_symbol (libc, __posix_fadvise64_l64, posix_fadvise64, GLIBC_2_3_3);
124 +compat_symbol (libc, __posix_fadvise64_l32, posix_fadvise64, GLIBC_2_2);
126 +strong_alias (__posix_fadvise64_l64, posix_fadvise64);