Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@gnat.com>
To: Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de>
Cc: Mark Kettenis <kettenis@chello.nl>,
	binutils@sources.redhat.com, gdb-patches@sources.redhat.com
Subject: Re: [RFA] MIPS_TEXT symbols should be associated to .text section?
Date: Fri, 30 Jul 2004 18:08:00 -0000	[thread overview]
Message-ID: <20040730180800.GQ1167@gnat.com> (raw)
In-Reply-To: <20040730003138.GU965@rembrandt.csv.ica.uni-stuttgart.de>

Hello Thiemo,


> Right, that appears to be some leftover of earlier code. Looks like
> elf_tdata()->elf_text_section replaced it.
> 
> Joel, can you try the appended (untested) patch and tell me if it
> works for you?

I tried your patch, but unfortunately it doesn't work :-(. The reason
is that elf_tdata (abfd)->elf_text_section is NULL. I looked at the
code, and elf-bfd.h tells me that this field is IRIX-specific. Then
searching for the places where this field is set only turns up one
location: _bfd_mips_elf_add_symbol_hook(). And according to the comment
above it, it's only used for linking...

So this leaves us with 2 options:

  1. Do a search for the .text and .data sections by name

  2. Find a place somewhere where we can set these fields before we
     need to use them. If we have a hook for instance after we've
     read the ELF header, or while iterating over the different sections
     (I don't know the code, so I'm just tossing ideas).
     
     Or another approach would be to check that field, and if null
     then do the lookup by name and store it in elf_tdata
     (abfd)->elf_text_section for all the following symbols.
     This is just an optimized variation of 1, really.

What do you think?

Thanks,
-- 
Joel


  parent reply	other threads:[~2004-07-30 18:08 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-21 20:46 Joel Brobecker
2004-07-29 22:02 ` Joel Brobecker
2004-07-29 22:19   ` Thiemo Seufer
2004-07-29 23:15     ` Mark Kettenis
2004-07-30  0:31       ` Thiemo Seufer
2004-07-30 11:32         ` Eli Zaretskii
2004-07-30 13:37           ` Andrew Cagney
2004-07-30 18:04             ` Eli Zaretskii
2004-07-30 18:13               ` Joel Brobecker
2004-07-30 18:44                 ` Eli Zaretskii
2004-07-30 18:55                   ` Joel Brobecker
2004-07-30 19:36                     ` Eli Zaretskii
2004-07-30 19:59                     ` Andrew Cagney
2004-07-30 22:29                     ` Michael Chastain
2004-07-30 18:08         ` Joel Brobecker [this message]
2004-07-30 18:57           ` Thiemo Seufer
2004-07-30 21:08             ` Mark Kettenis
2004-07-30 23:03             ` Joel Brobecker
2004-07-30 23:57               ` Thiemo Seufer
2004-07-30 18:19         ` Joel Brobecker
2004-07-30  0:17     ` Joel Brobecker
2004-07-22 15:47 David Anderson

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=20040730180800.GQ1167@gnat.com \
    --to=brobecker@gnat.com \
    --cc=binutils@sources.redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=ica2_ts@csv.ica.uni-stuttgart.de \
    --cc=kettenis@chello.nl \
    /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