public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Simon Richter <Simon.Richter@hogyros.de>
To: "Stefan Burström" <f94sbu@efd.lth.se>
Cc: gdb@sources.redhat.com
Subject: Re: Relocation question
Date: Wed, 10 Aug 2005 19:54:00 -0000	[thread overview]
Message-ID: <42FA5B78.6000207@hogyros.de> (raw)
In-Reply-To: <33ee1ab42d6.485e60cd@mail.m.bonet.se>

[-- Attachment #1: Type: text/plain, Size: 1101 bytes --]

Hi,

Stefan Burström wrote:

> Can someone explain to me how gdb is supposed to handle relocated
> executables? I am porting gdb to AmigaOS4 which relocates its executables
> when they are loaded.

w00t! How far are you concerning bfd support for 0x3f3 binaries? I have
just started work on that as I need that to hack a new bootloader for
APUS Linux in order to survive the cleanup going on in the kernel.

> However, when I run an application through gdb, gdb
> uses the bfd functions to build its map over the file. However, the bfd
> library always relocates everything relative to 0 (since it obviously
> doesn't know anything else to relocate it to)

AFAIK gdb knows of an offset to apply to everything that needs to be set
around loading time, but I don't remember offhand how to do that. I need
such a beast myself, so I'm going to invest some time into that in the
next days (my problem at hand is that bFLT executables also get
relocated, and that it is pretty normal to have a PIC register for the
data section to allow sharing code between processes).

   Simon


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 307 bytes --]

  reply	other threads:[~2005-08-10 19:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-10 19:00 Stefan Burström
2005-08-10 19:54 ` Simon Richter [this message]
2005-08-10 21:33 ` Andreas Schwab
2005-08-11 13:51 Ton van Overbeek

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=42FA5B78.6000207@hogyros.de \
    --to=simon.richter@hogyros.de \
    --cc=f94sbu@efd.lth.se \
    --cc=gdb@sources.redhat.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).