Linux PARISC architecture development
 help / color / mirror / Atom feed
From: bame@riverrock.org
To: alan@linuxcare.com.au, parisc-linux@thepuffingroup.com
Subject: Re: [parisc-linux] Get rid of %r8 linker stubs
Date: Tue, 04 Jul 2000 16:33:18 -0600	[thread overview]
Message-ID: <m139bFr-001VspC@chalet> (raw)


Unfortunately it looks like a couple of us are unable to build
working user-space executables with the no-%r8 linker.  I tried re-linking
with the old (16-June) one and that works (but of course that linker
can't link large executables).  So starting with:

	main(){}

I used both the 16-June and today's binutils.  It appears the "broken"
executable is running or sleeping (unlikely?) and it doesn't panic
the system.  I disassembled both versions and the _init sections are
a bit different, which isn't surprising, but also doesn't look right
to me.  Here's the one which works, using the old %r8 stub method:

000010b4 <_init>:
    10b4:       6b c2 3f d9     stw rp,-14(sr0,sp)
    10b8:       37 de 00 80     ldo 40(sp),sp
    10bc:       6b d3 3f c1     stw r19,-20(sr0,sp)
    10c0:       6b c4 3f 81     stw r4,-40(sr0,sp)
    /* jsr through stub to __gmon_start */
    10c4:       e5 00 22 f4     be,l 1178(sr4,r8),%sr0,%r31
    10c8:       08 13 02 44     copy r19,r4
    /* jsr through stub to __do_global_ctors_aux */
    10cc:       e5 00 22 bc     be,l 115c(sr4,r8),%sr0,%r31
    10d0:       08 00 02 40     nop
    10d4:       4b c2 3f 59     ldw -54(sr0,sp),rp
    10d8:       e8 40 c0 00     bv r0(rp)
    10dc:       4f c4 3f 81     ldw,mb -40(sr0,sp),r4

And here's the new one which fails.  Looks like maybe the %rp is
not being set, or the linker's overwriting a branch in a funny
way or something:

000010bc <_init>:
    10bc:       6b c2 3f d9     stw rp,-14(sr0,sp)
    10c0:       37 de 00 80     ldo 40(sp),sp
    10c4:       6b d3 3f c1     stw r19,-20(sr0,sp)
    10c8:       6b c4 3f 81     stw r4,-40(sr0,sp)
    /* jsr through local stub to __gmon_start */
    10cc:       e8 5f 1f c5     b,l 10b4 <_init-0x8>,rp
    10d0:       08 13 02 44     copy r19,r4
    /* branch to __do_global_ctors_aux !!! rp was never set !!! */
    10d4:       20 2b 40 00     ldil 56000,r1
    10d8:       e0 20 26 ba     be,n 35c(sr4,r1)
    /* nullified instruction -- otherwise it'd be an infinite loop */
    10dc:       e8 5f 1f e5     b,l 10d4 <_init+0x18>,rp
    10e0:       08 00 02 40     nop
    10e4:       4b c2 3f 59     ldw -54(sr0,sp),rp
    10e8:       e8 40 c0 00     bv r0(rp)
    10ec:       4f c4 3f 81     ldw,mb -40(sr0,sp),r4

Help?

	-Paul Bame

             reply	other threads:[~2000-07-04 22:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-04 22:33 bame [this message]
2000-07-05  0:36 ` [parisc-linux] Get rid of %r8 linker stubs Alan Modra
2000-07-05  0:57   ` Ulrich Drepper
2000-07-05  1:52     ` bame
2000-07-05  2:38       ` Alan Modra
2000-07-05  1:55     ` Alan Modra
2000-07-05  2:58   ` bame
2000-07-05  6:43     ` Patric Karlstrom
2000-07-05  6:26       ` willy
  -- strict thread matches above, loose matches on Subject: below --
2000-06-21 14:07 Alan Modra
2000-06-22 20:33 ` Paul Bame
2000-06-22 20:35   ` Jeffrey A Law
2000-06-23  1:45   ` Alan Modra
2000-06-23 10:34     ` Alan Modra
2000-07-03 19:15       ` willy
2000-07-04 14:21     ` willy
2000-07-05  0:38       ` Alan Modra

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=m139bFr-001VspC@chalet \
    --to=bame@riverrock.org \
    --cc=alan@linuxcare.com.au \
    --cc=parisc-linux@thepuffingroup.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