This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Patch for MIPS targets...
- To: "Steven J. Hill" <sjhill at cotw dot com>
- Subject: Re: Patch for MIPS targets...
- From: "H . J . Lu" <hjl at lucon dot org>
- Date: Fri, 27 Apr 2001 08:09:20 -0700
- Cc: libc-alpha at sources dot redhat dot com
- References: <3AE9896A.79BDD8CB@cotw.com>
On Fri, Apr 27, 2001 at 09:59:54AM -0500, Steven J. Hill wrote:
> Greetings.
>
> I would like to submit the following patch to fix Linux MIPS
The patch is not correct. See my comments below.
> targets. I have tested this patch against 2.2.2, 2.2.3 and
> the latest out of CVS. This patch is necessary in order to
> build GLIBC with the latest released binutils and gcc-3.0
> branch. Thanks.
>
> -Steve
>
> --
> Steven J. Hill - Embedded SW Engineer
> Public Key: 'http://www.cotw.com/pubkey.txt'
> FPR1: E124 6E1C AF8E 7802 A815
> FPR2: 7D72 829C 3386 4C4A E17D
> diff -urN --exclude=CVS glibc-2.2.3/sysdeps/mips/dl-machine.h glibc-2.2.3-patched/sysdeps/mips/dl-machine.h
> --- glibc-2.2.3/sysdeps/mips/dl-machine.h Mon Mar 26 22:53:28 2001
> +++ glibc-2.2.3-patched/sysdeps/mips/dl-machine.h Fri Apr 27 07:46:48 2001
> @@ -61,23 +61,6 @@
> in l_info array. */
> #define DT_MIPS(x) (DT_MIPS_##x - DT_LOPROC + DT_NUM)
>
> -/*
> - * MIPS libraries are usually linked to a non-zero base address. We
> - * subtract the base address from the address where we map the object
> - * to. This results in more efficient address space usage.
> - *
> - * FIXME: By the time when MAP_BASE_ADDR is called we don't have the
> - * DYNAMIC section read. Until this is fixed make the assumption that
> - * libraries have their base address at 0x5ffe0000. This needs to be
> - * fixed before we can safely get rid of this MIPSism.
> - */
> -#if 0
> -#define MAP_BASE_ADDR(l) ((l)->l_info[DT_MIPS(BASE_ADDRESS)] ? \
> - (l)->l_info[DT_MIPS(BASE_ADDRESS)]->d_un.d_ptr : 0)
> -#else
> -#define MAP_BASE_ADDR(l) 0x5ffe0000
> -#endif
> -
> /* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in
> with the run-time address of the r_debug structure */
> #define ELF_MACHINE_DEBUG_SETUP(l,r) \
This patch looks ok.
> diff -urN --exclude=CVS glibc-2.2.3/sysdeps/mips/mipsel/rtld-parms glibc-2.2.3-patched/sysdeps/mips/mipsel/rtld-parms
> --- glibc-2.2.3/sysdeps/mips/mipsel/rtld-parms Sat Jul 12 18:26:15 1997
> +++ glibc-2.2.3-patched/sysdeps/mips/mipsel/rtld-parms Fri Apr 27 07:46:20 2001
> @@ -1,3 +1,3 @@
> ifndef rtld-oformat
> -rtld-oformat = elf32-littlemips
> +rtld-oformat = elf32-tradlittlemips
> endif
> diff -urN --exclude=CVS glibc-2.2.3/sysdeps/mips/rtld-parms glibc-2.2.3-patched/sysdeps/mips/rtld-parms
> --- glibc-2.2.3/sysdeps/mips/rtld-parms Mon Jul 21 19:04:07 1997
> +++ glibc-2.2.3-patched/sysdeps/mips/rtld-parms Fri Apr 27 07:46:20 2001
> @@ -2,7 +2,7 @@
> rtld-wordsize = 32
> endif
> ifndef rtld-oformat
> -rtld-oformat = elf$(rtld-wordsize)-bigmips
> +rtld-oformat = elf$(rtld-wordsize)-tradbigmips
> endif
> ifndef rtld-arch
> rtld-arch = mips
Can you remove
sysdeps/mips/mips64/rtld-parms
sysdeps/mips/mipsel/rtld-parms
sysdeps/mips/rtld-ldscript.in
libc/sysdeps/mips/rtld-parms
and rebuild glibc to see if it works? I don't believe they are needed
for the new MIPS gcc/binutils if I am right.
Thanks.
H.J.