Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Ryan Bradetich <rbradetich@uswest.net>
To: libc-alpha@sources.redhat.com
Cc: parisc-linux@lists.parisc-linux.org
Subject: [parisc-linux] /lib/ld.so.1 (glibc) issues on parisc-linux 2.5 kernel??
Date: 24 Mar 2003 01:05:34 -0700	[thread overview]
Message-ID: <1048493134.8777.22.camel@beavis.ybsoft.com> (raw)

Hello again,

I have been working on tracking this down some more, and I think I found
something odd.  I just wanted to verify this is an anomaly (and
potentially the problem) or if this is the correct behavior, understand
why.


I am starting to think the kernel is doing the correct thing and
glibc is causing the problem ... based on debug output from i386
and just my general understanding (or lack of understanding :))
of the elf file format.

The bootstrap_map.l_addr was printed using _dl_debug_printf right
after the following line in glibc-2.3.1/elf/rtld.c:

	      ELF_DYNAMIC_RELOCATE (&bootstrap_map, 0, 0);

The ENTRY_POINT, _start, and user_entry line was added as the first
line of code in the function dl_main in glibc-2.3.1/elf/rtld.c.

This is the debug output on hppa:
---------------------------------
rbrad@vega:~/glibc-2.3.1/hppa-linux/obj/elf$ ./ld.so --verify /bin/sh

05626:  bootstrap_map.l_addr: 41000000
05626:  ENTRY_POINT: 41027162 _start: 41027162 user_entry: 41001ff0


This is the Entry point address from the ld.so library on hppa:
---------------------------------------------------------------
rbrad@vega:~/glibc-2.3.1/hppa-linux/obj/elf$ readelf -a ld.so | grep
Entry
  Entry point address:               0x1ff0




This is the debug output on i386:
---------------------------------
rbrad@beavis:~/debug/glibc-2.3.1/i386-linux/obj/elf$ ./ld.so --verify
/bin/sh
18878:  bootstrap_map.l_addr: 80000000
18878:  ENTRY_POINT: 80000b10 _start: 80000b10 user_entry: 80000b10


This is the Entry point address from the ld.so library on i386:
---------------------------------------------------------------
rbrad@beavis:~glibc-2.3.1/i386-linux/obj/elf$ readelf -a ld.so | grep
Entry
  Entry point address:               0xb10



The i386 library makes sense to me: the bootstrap_map.l_addr + the
_start == the user_entry point. On hppa, this is not true, and I 
do not understand why.  The reason why this works when the AT_ENTRY
aux header is not added is because the user_entry defaults to
ENTRY_POINT, and is modified iff the aux AT_ENTRY header is present.
[Note: this code is at:
   glibc-2.3.1/sysdeps/generic/dl-sysdep.c:_dl_sysdep_start()]


Is there a bug in the dynamic loader for hppa that doesn't load the 
address at load_address + _start?  Or can someone explain why there
is an additional 0x25172 byte offset for the entry point? 

I will keep digging around and see what I can dig up, but without
understanding how the dynamic loader works, I feel pretty blind.

Thanks,

- Ryan

P.S. Please cc me on any responses... I am not subscribed to this
list.


-- 
Ryan Bradetich <rbradetich@uswest.net>

             reply	other threads:[~2003-03-24  8:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-24  8:05 Ryan Bradetich [this message]
2003-03-24  9:48 ` [parisc-linux] /lib/ld.so.1 (glibc) issues on parisc-linux 2.5 kernel?? Andreas Schwab
2003-03-24 18:44   ` Ryan Bradetich
2003-03-25 16:12     ` H. J. Lu
2003-03-26  0:50       ` [parisc-linux] Function descriptors fall behind Sysdep-cancel, Less failures, and ABI files for Roland Carlos O'Donell
2003-03-26  0:50       ` Carlos O'Donell
2003-03-25 16:12     ` [parisc-linux] /lib/ld.so.1 (glibc) issues on parisc-linux 2.5 kernel?? H. J. Lu
2003-03-24 18:44   ` Ryan Bradetich
2003-03-24  9:48 ` Andreas Schwab
  -- strict thread matches above, loose matches on Subject: below --
2003-03-24  8:05 Ryan Bradetich
2003-03-21  4:18 Ryan Bradetich
2003-03-21  4:18 Ryan Bradetich

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=1048493134.8777.22.camel@beavis.ybsoft.com \
    --to=rbradetich@uswest.net \
    --cc=libc-alpha@sources.redhat.com \
    --cc=parisc-linux@lists.parisc-linux.org \
    /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