Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Raoul Gough" <RaoulGough@yahoo.co.uk>
To: <gdb-patches@sources.redhat.com>
Cc: "Elena Zannoni" <ezannoni@redhat.com>
Subject: Re: RFC: coffread.c relocation fixes
Date: Mon, 07 Apr 2003 11:54:00 -0000	[thread overview]
Message-ID: <002a01c2fcfc$7a0e4970$0201a8c0@albert> (raw)
In-Reply-To: <16012.44364.781796.157557@localhost.redhat.com>

"Elena Zannoni" <ezannoni@redhat.com> wrote in message
news:16012.44364.781796.157557@localhost.redhat.com...
> Raoul Gough writes:
>  > When a shared object can't be loaded at its preferred image base,
it
>  > gets relocated. There's a convoluted switch statement in
>  > coff_symtab_read that handles relocation of the symbols, and I
believe
>  > it handles a couple of cases incorrectly:
>  >
>  > o Static symbols (with c_sclass of C_STAT) never get relocated. I
>  > think this is wrong, probably an oversight where the C_STAT cases
fall
>  > through to the C_EXT case and then don't get handled.
>  >
>  > o Absolute symbols (with c_secnum of N_ABS) *do* get relocated,
so
>  > things like __minor_os_version__ get adjusted by the relocation
>  > offset. Curiously, there is a fixme comment in the code not to do
>  > this.
>  >
>  > The attached exmple shows the problem in action and the attached
diffs
>  > fix both problems. Do these changes seem sensible to others?
>
> I am not a coff expert, but the change seems sensible.
> See below for a typo.
> Did you run the gdb testsuite with your patch and w/o? Any
differences?
>
> elena

I'm still not geared up to run the test suites (I guess I just need to
install dejagnu). Will try to manage this by the end of the week, and
report back...

Will fix the typo as well - thanks!

--
Raoul Gough
see http://home.clara.net/raoulgough/ for my work availability


  reply	other threads:[~2003-04-07 11:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-26 18:40 Raoul Gough
2003-04-03 21:48 ` Elena Zannoni
2003-04-07 11:54   ` Raoul Gough [this message]
2003-05-12 16:38   ` Raoul Gough
2003-05-23 16:19     ` Elena Zannoni
2003-05-28 15:04       ` Raoul Gough
2003-05-28 15:42         ` Eli Zaretskii
2003-05-23 18:42 Michael Elizabeth Chastain

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='002a01c2fcfc$7a0e4970$0201a8c0@albert' \
    --to=raoulgough@yahoo.co.uk \
    --cc=ezannoni@redhat.com \
    --cc=gdb-patches@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