This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Sat, Mar 23, 2002 at 11:27:32PM +0100, Jakub Jelinek wrote: > The dl-*brk.c addition breaks lots of targets, because generic > dl-*brk.c are including <brk.c> resp. <sbrk.c>, while lots of targets > use brk.S and sbrk.S. Furthermore, sysdeps/unix/sysv/linux/i386/dl-brk.c > and dl-sbrk.c don't seem to be i?86-*-linux specific, __curbrk is used > on all linux ports (well, some others too). > Here is one possible solution (I wanted to avoid adding too many other > dl-brk.S files, but if you perferred it that way, dl-sbrk and dl-brk > could stay where they are, sysdeps/generic/dl-brk.c and dl-sbrk.c > could have the attribute hidden stuff, and lots of > dl-brk.S files all around). Here is the second alternative. Note that sysdeps/mach/hurd/brk.c sysdeps/unix/sysv/aix/brk.c apparently don't use __curbrk at all, but IMHO extern void * __curbrk attribute_hidden; doesn't hurt there at all (of course, we can add sysdeps/mach/hurd/dl-{,s}brk.c sysdeps/unix/sysv/aix/dl-{,s}brk.c which will just include the non-"dl-" versions. 2002-03-23 Jakub Jelinek <jakub@redhat.com> * sysdeps/generic/brk.c (__curbrk): Declare. * sysdeps/generic/dl-brk.c: Add attribute_hidden to __curbrk. * sysdeps/generic/dl-sbrk.c: Likewise. * sysdeps/unix/arm/dl-brk.S: New file. * sysdeps/unix/bsd/hp/m68k/dl-brk.S: New file. * sysdeps/unix/bsd/osf/alpha/dl-brk.S: New file. * sysdeps/unix/bsd/sun/m68k/dl-brk.S: New file. * sysdeps/unix/bsd/vax/dl-brk.S: New file. * sysdeps/unix/i386/dl-brk.S: New file. * sysdeps/unix/mips/dl-brk.S: New file. * sysdeps/unix/sparc/dl-brk.S: New file. * sysdeps/unix/sysv/linux/alpha/dl-brk.S: New file. * sysdeps/unix/sysv/linux/ia64/dl-brk.S: New file. * sysdeps/unix/sysv/linux/powerpc/dl-brk.S: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/dl-brk.S: New file. * sysdeps/unix/sysv/linux/i386/dl-brk.c: Remove. * sysdeps/unix/sysv/linux/i386/dl-sbrk.c: Remove. --- libc/sysdeps/generic/brk.c.jj Thu Aug 23 18:49:24 2001 +++ libc/sysdeps/generic/brk.c Sat Mar 23 23:15:50 2002 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1995, 1996, 1997, 2002 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 @@ -19,6 +19,9 @@ #include <errno.h> #include <unistd.h> +/* sbrk.c expects this. */ +void *__curbrk; + /* Set the end of the process's data space to ADDR. Return 0 if successful, -1 if not. */ int --- libc/sysdeps/generic/dl-brk.c.jj Fri Mar 15 05:39:53 2002 +++ libc/sysdeps/generic/dl-brk.c Fri Mar 15 05:41:13 2002 @@ -1,2 +1,5 @@ -/* Just use the normal code. */ +/* We can use the normal code but we also know the __curbrk is not exported + from ld.so. */ +extern void *__curbrk attribute_hidden; + #include <brk.c> --- libc/sysdeps/generic/dl-sbrk.c.jj Fri Mar 15 05:40:28 2002 +++ libc/sysdeps/generic/dl-sbrk.c Fri Mar 15 05:41:49 2002 @@ -1,2 +1,5 @@ -/* Just use the normal code. */ +/* We can use the normal code but we also know the __curbrk is not exported + from ld.so. */ +extern void *__curbrk attribute_hidden; + #include <sbrk.c> --- libc/sysdeps/unix/arm/dl-brk.S.jj Sat Mar 23 23:36:53 2002 +++ libc/sysdeps/unix/arm/dl-brk.S Sat Mar 23 23:36:53 2002 @@ -0,0 +1 @@ +#include <brk.S> --- libc/sysdeps/unix/bsd/hp/m68k/dl-brk.S.jj Sat Mar 23 23:36:53 2002 +++ libc/sysdeps/unix/bsd/hp/m68k/dl-brk.S Sat Mar 23 23:36:53 2002 @@ -0,0 +1 @@ +#include <brk.S> --- libc/sysdeps/unix/bsd/osf/alpha/dl-brk.S.jj Sat Mar 23 23:36:53 2002 +++ libc/sysdeps/unix/bsd/osf/alpha/dl-brk.S Sat Mar 23 23:36:53 2002 @@ -0,0 +1 @@ +#include <brk.S> --- libc/sysdeps/unix/bsd/sun/m68k/dl-brk.S.jj Sat Mar 23 23:36:53 2002 +++ libc/sysdeps/unix/bsd/sun/m68k/dl-brk.S Sat Mar 23 23:36:53 2002 @@ -0,0 +1 @@ +#include <brk.S> --- libc/sysdeps/unix/bsd/vax/dl-brk.S.jj Sat Mar 23 23:36:53 2002 +++ libc/sysdeps/unix/bsd/vax/dl-brk.S Sat Mar 23 23:36:53 2002 @@ -0,0 +1 @@ +#include <brk.S> --- libc/sysdeps/unix/i386/dl-brk.S.jj Sat Mar 23 23:36:53 2002 +++ libc/sysdeps/unix/i386/dl-brk.S Sat Mar 23 23:36:53 2002 @@ -0,0 +1 @@ +#include <brk.S> --- libc/sysdeps/unix/mips/dl-brk.S.jj Sat Mar 23 23:36:53 2002 +++ libc/sysdeps/unix/mips/dl-brk.S Sat Mar 23 23:36:53 2002 @@ -0,0 +1 @@ +#include <brk.S> --- libc/sysdeps/unix/sparc/dl-brk.S.jj Sat Mar 23 23:36:53 2002 +++ libc/sysdeps/unix/sparc/dl-brk.S Sat Mar 23 23:36:53 2002 @@ -0,0 +1 @@ +#include <brk.S> --- libc/sysdeps/unix/sysv/linux/alpha/dl-brk.S.jj Sat Mar 23 23:36:53 2002 +++ libc/sysdeps/unix/sysv/linux/alpha/dl-brk.S Sat Mar 23 23:36:53 2002 @@ -0,0 +1 @@ +#include <brk.S> --- libc/sysdeps/unix/sysv/linux/ia64/dl-brk.S.jj Sat Mar 23 23:36:53 2002 +++ libc/sysdeps/unix/sysv/linux/ia64/dl-brk.S Sat Mar 23 23:36:53 2002 @@ -0,0 +1 @@ +#include <brk.S> --- libc/sysdeps/unix/sysv/linux/i386/dl-brk.c.jj Fri Mar 15 05:41:13 2002 +++ libc/sysdeps/unix/sysv/linux/i386/dl-brk.c Sat Mar 23 23:35:39 2002 @@ -1,5 +0,0 @@ -/* We can use the normal code but we also know the __curbrk is not exported - from ld.so. */ -extern void *__curbrk attribute_hidden; - -#include <brk.c> --- libc/sysdeps/unix/sysv/linux/i386/dl-sbrk.c.jj Fri Mar 15 05:41:49 2002 +++ libc/sysdeps/unix/sysv/linux/i386/dl-sbrk.c Sat Mar 23 23:35:39 2002 @@ -1,5 +0,0 @@ -/* We can use the normal code but we also know the __curbrk is not exported - from ld.so. */ -extern void *__curbrk attribute_hidden; - -#include <sbrk.c> --- libc/sysdeps/unix/sysv/linux/powerpc/dl-brk.S.jj Sat Mar 23 23:36:53 2002 +++ libc/sysdeps/unix/sysv/linux/powerpc/dl-brk.S Sat Mar 23 23:36:53 2002 @@ -0,0 +1 @@ +#include <brk.S> --- libc/sysdeps/unix/sysv/linux/sparc/sparc64/dl-brk.S.jj Sat Mar 23 23:36:53 2002 +++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/dl-brk.S Sat Mar 23 23:36:53 2002 @@ -0,0 +1 @@ +#include <brk.S> Jakub
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |