Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@oss.sgi.com>
To: Justin Carlson <carlson@sibyte.com>
Cc: linux-mips@oss.sgi.com
Subject: Re: GDB 5 for mips-linux/Shared library loading with new binutils/glibc
Date: Sat, 27 Jan 2001 11:11:46 -0800	[thread overview]
Message-ID: <20010127111146.G867@bacchus.dhis.org> (raw)
In-Reply-To: <0101261750492Y.00834@plugh.sibyte.com>; from carlson@sibyte.com on Fri, Jan 26, 2001 at 05:40:07PM -0800

On Fri, Jan 26, 2001 at 05:40:07PM -0800, Justin Carlson wrote:

> Also, I've run into a problem with ld.so from glibc-2.2 on mips32-linux.
> After some hunting, I found that the templates in elf32bsmip.sh for gnu
> ld have recently changed to support SHLIB_TEXT_START_ADDR as a (non-zero)
> base address for shared library loading.  SHLIB_TEXT_START_ADDR defaults
> to 0x5ffe0000 in the current sources.

For obscure reasons which probably spell IRIX 5.x ELF compatibility ELF
shared objects except the dynamic linker itself are linked to this base
address.

> I'm curious if anyone knows the rationale for these changes.  Best conjecture
> I've heard is that it allows ld.so to not have to relocate itself, as it will
> load by default to the high address.  

By default ld.so get loaded to 0xfb60000.  Again this is an obscure IRIXism.

> However, ld.so seems to know nothing about relocating shared library with a
> non-zero shared library base address, which causes dynamically linked stuff
> to crash spectacularly.  
> 
> I think fixing ld.so won't be too difficult, but I'm really wanting to
> find out why these changes were made.  And whether I'm reinventing some
> wheels by fixing ld.so to cope with the new binutils stuff.

Glibc 2.0 as of '96 already does this just as glibc 2.2 is supposed to.
You may look at the source in the srpm package of glibc 2.1.95 on oss which
definately handles this right.

  Ralf

      parent reply	other threads:[~2001-01-28  2:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-27  1:40 GDB 5 for mips-linux/Shared library loading with new binutils/glibc Justin Carlson
2001-01-27  8:01 ` Maciej W. Rozycki
2001-01-27 19:01   ` Ralf Baechle
2001-01-28 11:55     ` Andreas Jaeger
2001-02-09  0:31       ` Kevin D. Kissell
2001-02-09  0:31         ` Kevin D. Kissell
2001-02-09  2:00         ` Ralf Baechle
2001-02-09  2:00           ` Ralf Baechle
2001-01-29 15:34     ` Maciej W. Rozycki
2001-01-27 19:11 ` Ralf Baechle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010127111146.G867@bacchus.dhis.org \
    --to=ralf@oss.sgi.com \
    --cc=carlson@sibyte.com \
    --cc=linux-mips@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox