linux-origin
[Top] [All Lists]

Re: ld.so bug

To: Kanoj Sarcar <kanoj@xxxxxxxxxxxxxxxxxxx>
Subject: Re: ld.so bug
From: Ralf Baechle <ralf@xxxxxxxxxxx>
Date: Wed, 13 Sep 2000 23:49:16 +0200
Cc: linux-origin@xxxxxxxxxxx, Ulf Carlsson <ulfc@xxxxxxxxxxxxxxxxxxxx>, Keith M Wesolowski <wesolows@xxxxxxxxxxxx>, "Maciej W. Rozycki" <macro@xxxxxxxxxxxxx>
In-reply-to: <200009122312.QAA82825@xxxxxxxxxxxxxxxxxxx>; from kanoj@xxxxxxxxxxxxxxxxxxx on Tue, Sep 12, 2000 at 04:12:05PM -0700
References: <20000912193424.A4052@xxxxxxxxxxxxxxxx> <200009122312.QAA82825@xxxxxxxxxxxxxxxxxxx>
Sender: owner-linux-origin@xxxxxxxxxxx
On Tue, Sep 12, 2000 at 04:12:05PM -0700, Kanoj Sarcar wrote:

> > We've got a bug in the dynamic linker which makes it die when it's not
> > loaded to the address it's linked to.  This is bug number one but the
> > second bug is the fact that it gets loaded to the wrong address.  I
> > suspect this may also happen at times on a 32-bit kernel also but it's
> > happening much easier on mips64.  Easiest way to show this is to run
> > /lib/ld.so.1 - it will always die on MIPS64.  This brings us to bug number
> > three - gdb 4.16 only prints junk from the resulting corefile; I assume
> > that the 64-bit kernel doesn't write the registers properly into the core
> > file.
> > 
> > Kanoj, got an idea why the kernel might load ld.so to a different address
> > than it is linked for?
> 
> I don't clearly understand what is going on, but I would start off by
> looking at SET_PERSONALITY and TASK_UNMAPPED_BASE when you run 
> /lib/ld.so.1. May or may not yield anything ...

I checked binfmt_elf32.c; the load address which I saw is defined by the
constant ELF_ET_DYN_BASE which is defined in <asm/elf.h> which should have
triggered the bug I'm observing a long time ago and also on the 32-bit
kernels.  In short - there is no kernel bug.

I'm just building libc binaries with the fix applied and will probably
have rpms ready by tomorrow.

  Ralf

<Prev in Thread] Current Thread [Next in Thread>