debian-glibc, Some updates for hppa, still pending are a *lot* of local changes that I need to submit upstream first for revision.
* Carlos O'Donell <[EMAIL PROTECTED]> - debian/patches/51_glibc232-hppa-dist.dpatch: Add entry.h to dist. - debian/patches/51_glibc232-hppa-profiling.dpatch: Fix profile support. (Closes: #221010) ---------- #! /bin/sh -e # All lines beginning with `# DP:' are a description of the patch. # DP: Description: Add the elf entry point definition to those files that are exported. # DP: Related bugs: None, though there could be possible unknown problems, we never want the # generic version to be used. # DP: Author: Carlos O'Donell <[EMAIL PROTECTED]> # DP: Upstream status: Not submitted # DP: Status Details: Will be submitted upstream as part of another patch. # DP: Date: 2004-01-01 if [ $# -ne 2 ]; then echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" exit 1 fi case "$1" in -patch) patch -d "$2" -f --no-backup-if-mismatch -p1 < $0;; -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $0;; *) echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" exit 1 esac exit 0 # append the patch here and adjust the -p? flag in the patch calls. # # 2004-01-01 Carlos O'Donell <[EMAIL PROTECTED]> # # * sysdeps/hppa/Dist: Export the entry point. # --- glibc/sysdeps/hppa/Dist.orig 2004-01-02 11:43:00.000000000 -0500 +++ glibc/sysdeps/hppa/Dist 2004-01-02 11:43:09.000000000 -0500 @@ -1,2 +1,3 @@ dl-symaddr.c dl-fptr.c +elf/entry.h ---------- #! /bin/sh -e # All lines beginning with `# DP:' are a description of the patch. # DP: Description: Fix profiling with -pg # DP: Related bugs: 'roy' FTBS, any program compiled with -pg SIGSEGV's # DP: Author: Randolph Chung ([EMAIL PROTECTED]), (Submitter: Carlos O'Donell <[EMAIL PROTECTED]>) # DP: Upstream status: Not submitted, will be submitted soon. # DP: Status Details: Testing passes, no regresssions. # DP: Date: 2004-01-01 if [ $# -ne 2 ]; then echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" exit 1 fi case "$1" in -patch) patch -d "$2" -f --no-backup-if-mismatch -p1 < $0;; -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $0;; *) echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" exit 1 esac exit 0 # append the patch here and adjust the -p? flag in the patch calls. #2003-11-15 Randolph Chung <[EMAIL PROTECTED]> # # * gmon/gmon.c (__monstartup): Round kcountsize to multiples of the # froms[] array so the array is properly aligned. # # * sysdeps/hppa/elf/entry.h (ENTRY_POINT): Use # __canonicalize_funcptr_for_compare for loading _start to handle lazy # binding. # * sysdeps/hppa/machine-gmon.h: New file. # * sysdeps/unis/sysv/linux/hppa/profil-counter.h: New file. # diff -uNr glibc-2.3.2/gmon/gmon.c build-tree.prof/glibc-2.3.2/gmon/gmon.c --- glibc-2.3.2/gmon/gmon.c 2003-11-15 09:16:02.520797072 -0800 +++ glibc-2.3.2/gmon/gmon.c 2003-11-13 22:10:28.000000000 -0800 @@ -114,7 +114,7 @@ p->lowpc = ROUNDDOWN(lowpc, HISTFRACTION * sizeof(HISTCOUNTER)); p->highpc = ROUNDUP(highpc, HISTFRACTION * sizeof(HISTCOUNTER)); p->textsize = p->highpc - p->lowpc; - p->kcountsize = p->textsize / HISTFRACTION; + p->kcountsize = ROUNDUP(p->textsize / HISTFRACTION, sizeof(*p->froms)); p->hashfraction = HASHFRACTION; p->log_hashfraction = -1; /* The following test must be kept in sync with the corresponding diff -uNr build-tree/glibc-2.3.2/sysdeps/hppa/elf/entry.h build-tree.prof/glibc-2.3.2/sysdeps/hppa/elf/entry.h --- glibc-2.3.2/sysdeps/hppa/elf/entry.h 2003-11-15 09:16:09.280769400 -0800 +++ glibc-2.3.2/sysdeps/hppa/elf/entry.h 2003-11-13 22:10:28.839435896 -0800 @@ -4,7 +4,7 @@ /* The function's entry point is stored in the first word of the function descriptor (plabel) of _start(). */ -#define ENTRY_POINT ({long int *tmp = (long int *)((long)_start & ~2); tmp[0];}) +#define ENTRY_POINT __canonicalize_funcptr_for_compare(_start) /* We have to provide a special declaration. */ #define ENTRY_POINT_DECL(class) class void _start (void); diff -uNr build-tree/glibc-2.3.2/sysdeps/hppa/machine-gmon.h build-tree.prof/glibc-2.3.2/sysdeps/hppa/machine-gmon.h --- glibc-2.3.2/sysdeps/hppa/machine-gmon.h 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.2/sysdeps/hppa/machine-gmon.h 2003-11-13 22:10:28.000000000 -0800 @@ -0,0 +1,25 @@ +/* Machine-specific calling sequence for `mcount' profiling function. PA-RISC + Copyright (C) 1995, 1996, 1997, 2000 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. */ + +/* We can call _mcount directly since gcc supplies the correct + * arguments */ +#define _MCOUNT_DECL(from, self) \ + void _mcount (u_long from, u_long self) + +#define MCOUNT diff -uNr build-tree/glibc-2.3.2/sysdeps/unix/sysv/linux/hppa/profil-counter.h build-tree.prof/glibc-2.3.2/sysdeps/unix/sysv/linux/hppa/profil-counter.h --- glibc-2.3.2/sysdeps/unix/sysv/linux/hppa/profil-counter.h 2000-10-14 20:12:00.000000000 -0700 +++ glibc-2.3.2/sysdeps/unix/sysv/linux/hppa/profil-counter.h 2003-11-15 08:53:01.788700256 -0800 @@ -1,2 +1,25 @@ -/* We can use the ix86 version. */ -#include <sysdeps/unix/sysv/linux/i386/profil-counter.h> +/* Machine-dependent SIGPROF signal handler. PA-RISC version + Copyright (C) 1996, 1997, 2000 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. */ + +static void +profil_counter (int signr, siginfo_t *si, struct ucontext *uctx) +{ + unsigned long ip = uctx->uc_mcontext.sc_iaoq[0] & ~0x3; + profil_count ((void *) ip); +}