From: Jeffrey A Law <law@cygnus.com>
To: Mark Klein <mklein@dis.com>
Cc: gcc@gcc.gnu.org
Subject: Re: MPE Port
Date: Tue, 26 Oct 1999 19:12:00 -0000 [thread overview]
Message-ID: <18424.940989664@upchuck> (raw)
In-Reply-To: <4.2.0.58.19991026065301.00c68310@garfield.dis.com>
In message < 4.2.0.58.19991026065301.00c68310@garfield.dis.com >you write:
> There is a table called the XRT (if I understand it correctly on HP-UX, it
> is similar in function to the PLT there) that is fixed up at execution time
> with the space, offset of the code, and the DP and SP of the called
> procedure.
> There are support routines that can dynamically load a program and create
> an XRT for it. All "procedure labels" on MPE are really pointers to the XRT
> entry. There are entry and exit stubs to set and restore those registers
> and to promote privilege as needed.
Not exactly what I was looking for.
I'm interested in how/where are dynamic libraries loaded, does the dynamic
linker make a distinction between code & data in the dynamic library, if
so, does it arrange to load them in different spaces (which would be a
significant divergence from the hpux dynamic linker).
More along the lines of how does mapping of dynamic executables work. THe
> to start looking at this as soon as I have time. I don't know the purpose
> of a "trampoline" and what the __gcc_plt_call does, yet. Can you
> enlighten me?
You'd have to read the gdb code for all the grody details.
When gdb wants to call a function in the inferior program, it writes a bunch of
code onto the stack (ie the stub/trampoline) which is responsible for doing
argument setup, dealing with cross space calls/returns, etc etc.). It then
transfers execution control to that code on the stack, which in turn calls
the final target.
__gcc_plt_call is necessary because the hpux dynamic linker will not allow
the return address for a call to be in a non-text, non-shlib space when the
target function is lazily bound.
jeff
WARNING: multiple messages have this Message-ID
From: Jeffrey A Law <law@cygnus.com>
To: Mark Klein <mklein@dis.com>
Cc: gcc@gcc.gnu.org
Subject: Re: MPE Port
Date: Sun, 31 Oct 1999 23:35:00 -0000 [thread overview]
Message-ID: <18424.940989664@upchuck> (raw)
Message-ID: <19991031233500.udbNDrJLO7bR7C4hQSc1zyv9m7KIaFYXULrqIY8W1dE@z> (raw)
In-Reply-To: <4.2.0.58.19991026065301.00c68310@garfield.dis.com>
In message < 4.2.0.58.19991026065301.00c68310@garfield.dis.com >you write:
> There is a table called the XRT (if I understand it correctly on HP-UX, it
> is similar in function to the PLT there) that is fixed up at execution time
> with the space, offset of the code, and the DP and SP of the called
> procedure.
> There are support routines that can dynamically load a program and create
> an XRT for it. All "procedure labels" on MPE are really pointers to the XRT
> entry. There are entry and exit stubs to set and restore those registers
> and to promote privilege as needed.
Not exactly what I was looking for.
I'm interested in how/where are dynamic libraries loaded, does the dynamic
linker make a distinction between code & data in the dynamic library, if
so, does it arrange to load them in different spaces (which would be a
significant divergence from the hpux dynamic linker).
More along the lines of how does mapping of dynamic executables work. THe
> to start looking at this as soon as I have time. I don't know the purpose
> of a "trampoline" and what the __gcc_plt_call does, yet. Can you
> enlighten me?
You'd have to read the gdb code for all the grody details.
When gdb wants to call a function in the inferior program, it writes a bunch of
code onto the stack (ie the stub/trampoline) which is responsible for doing
argument setup, dealing with cross space calls/returns, etc etc.). It then
transfers execution control to that code on the stack, which in turn calls
the final target.
__gcc_plt_call is necessary because the hpux dynamic linker will not allow
the return address for a call to be in a non-text, non-shlib space when the
target function is lazily bound.
jeff
next prev parent reply other threads:[~1999-10-26 19:12 UTC|newest]
Thread overview: 96+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-09-07 8:42 Mark Klein
1999-09-30 18:02 ` Mark Klein
1999-10-25 22:41 ` Jeffrey A Law
1999-10-26 7:03 ` Mark Klein
1999-10-26 19:12 ` Jeffrey A Law [this message]
1999-10-26 19:52 ` Mark Klein
1999-10-31 23:35 ` Mark Klein
1999-10-31 23:35 ` Jeffrey A Law
1999-10-31 23:35 ` Mark Klein
1999-10-31 23:35 ` Jeffrey A Law
-- strict thread matches above, loose matches on Subject: below --
1999-09-06 10:40 Mark Klein
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:40 Mark Klein
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:40 Mark Klein
1999-09-08 1:41 ` Jeffrey A Law
1999-09-08 6:37 ` Mark Klein
1999-09-30 18:02 ` Mark Klein
1999-09-30 18:02 ` Jeffrey A Law
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:40 Mark Klein
1999-09-08 1:39 ` Jeffrey A Law
1999-09-08 6:35 ` Mark Klein
1999-09-15 2:52 ` Jeffrey A Law
1999-09-15 8:26 ` Mark Klein
1999-09-30 18:02 ` Mark Klein
1999-09-30 18:02 ` Jeffrey A Law
1999-09-30 18:02 ` Mark Klein
1999-09-30 18:02 ` Jeffrey A Law
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:40 Mark Klein
1999-09-30 18:02 ` Mark Klein
1999-10-25 22:32 ` Jeffrey A Law
1999-10-26 6:51 ` Mark Klein
1999-10-26 19:05 ` Jeffrey A Law
1999-10-26 19:21 ` Mark Klein
1999-10-31 23:35 ` Mark Klein
1999-10-31 23:35 ` Jeffrey A Law
1999-10-31 23:35 ` Mark Klein
1999-10-31 23:35 ` Jeffrey A Law
1999-09-06 10:40 Mark Klein
1999-09-07 2:38 ` Jeffrey A Law
1999-09-07 6:39 ` Mark Klein
1999-09-08 0:45 ` Jeffrey A Law
1999-09-08 20:04 ` Mark Klein
1999-09-15 2:47 ` Jeffrey A Law
1999-09-15 8:32 ` Mark Klein
1999-09-30 18:02 ` Mark Klein
1999-09-30 18:02 ` Jeffrey A Law
1999-10-09 20:18 ` Mark Klein
1999-10-14 4:03 ` Jeffrey A Law
1999-10-14 7:20 ` Mark Klein
1999-10-14 10:45 ` Jeffrey A Law
1999-10-14 11:05 ` Mark Klein
1999-10-31 23:35 ` Mark Klein
1999-10-31 23:35 ` Jeffrey A Law
1999-10-31 23:35 ` Mark Klein
1999-10-31 23:35 ` Jeffrey A Law
1999-10-31 23:35 ` Mark Klein
1999-11-08 19:34 ` Mark Klein
1999-11-08 19:54 ` Jeffrey A Law
1999-11-09 6:52 ` Mark Klein
1999-11-30 23:37 ` Mark Klein
1999-11-30 23:37 ` Jeffrey A Law
1999-11-30 23:37 ` Mark Klein
1999-09-30 18:02 ` Mark Klein
1999-09-30 18:02 ` Jeffrey A Law
1999-09-30 18:02 ` Mark Klein
1999-09-30 18:02 ` Jeffrey A Law
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:40 Mark Klein
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:40 Mark Klein
1999-09-08 1:40 ` Jeffrey A Law
1999-09-30 18:02 ` Jeffrey A Law
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:40 Mark Klein
1999-09-08 1:49 ` Jeffrey A Law
1999-09-08 20:31 ` Mark Klein
1999-09-30 18:02 ` Mark Klein
1999-09-30 18:02 ` Jeffrey A Law
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:39 Mark Klein
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:39 Mark Klein
1999-09-07 3:20 ` Jeffrey A Law
1999-09-07 6:46 ` Mark Klein
1999-09-08 0:43 ` Jeffrey A Law
1999-09-30 18:02 ` Jeffrey A Law
1999-09-30 18:02 ` Mark Klein
1999-09-30 18:02 ` Jeffrey A Law
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:39 Mark Klein
1999-09-30 18:02 ` Mark Klein
1999-08-27 17:20 HARD_REGNO_MODE_OK on PA-RISC (revisited) Mark Klein
1999-08-29 3:19 ` Jeffrey A Law
1999-09-06 10:39 ` MPE Port Mark Klein
1999-09-30 18:02 ` Mark Klein
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=18424.940989664@upchuck \
--to=law@cygnus.com \
--cc=gcc@gcc.gnu.org \
--cc=mklein@dis.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).