From: Carlos O'Donell <carlos@codesourcery.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Pedro Alves <pedro@codesourcery.com>,
Jim Blandy <jimb@red-bean.com>,
gdb-patches <gdb-patches@sourceware.org>,
Dave Anglin <dave.anglin@nrc.ca>
Subject: Re: arm_addr_bits_remove
Date: Fri, 25 Jan 2008 09:56:00 -0000 [thread overview]
Message-ID: <47996465.6090201@codesourcery.com> (raw)
In-Reply-To: <20080125025555.GH3979@adacore.com>
Joel Brobecker wrote:
>> /* The low two bits of the PC on the PA contain the privilege level.
>> Some genius implementing a (non-GCC) compiler apparently decided
>> this means that "addresses" in a text section therefore include a
>> privilege level, and thus symbol tables should contain these bits.
>> This seems like a bonehead thing to do--anyway, it seems to work
>> for our purposes to just ignore those bits. */
>
> I just love the comment :). I'm so happy I'm not the HP genius
> in question :-). Seriously, I think we should be careful not to
> add more sarcastic comments like this in the future, it's not
> very serious nor very useful. That being said, I love sarcasm,
> so I had a good laugh.
What do they mean by `"addresses" in a text section'?
The only thing that should have a privilege level (PL) is the PC (IAOQ)
at runtime, and it should match the PL of the executing instruction.
If you start talking about addresses, and symbol tables, you wander into
the realm of function addresses and official procedure descriptors (OPD).
On 32-bit hppa-linux-gnu the address of a function may point to the
function or the official procedure descriptor (On 64-bit you always have
an OPD). The OPD address has bit 2 set, and bit 1 is reserved (See pg 31
of the 32-bit SOM Runtime). The OPD is a struct { ELF32 ip; ELF32 gp}.
If (<function symbol> & 3) is true you have a function address,
otherwise an OPD. To read the OPD you strip the bottom 2 bits, cast to a
struct, and use ip and gp.
Might the writer of the comment gotten confused?
>> I guess that compiler would be HP's. If the symbols had the bits set,
>> so could the line info.
>
> Right. That's why I mentioned the fact that part of my toolchain
> was from GNU tools.
>
>> Do we still support HP's object format and debug info ?
>
> Not sure.
HP's 32-bit HP-PARISC object format is SOM.
Dave, binutils still has SOM support?
We still generate some HP debug info, namely .PARISC.unwind sections,
and AFAIK gdb uses them (readelf shows them correctly)?
Cheers,
Carlos.
--
Carlos O'Donell
CodeSourcery
carlos@codesourcery.com
(650) 331-3385 x716
next prev parent reply other threads:[~2008-01-25 4:24 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-22 21:17 arm_addr_bits_remove Pedro Alves
2008-01-22 23:26 ` arm_addr_bits_remove Jim Blandy
2008-01-23 14:45 ` arm_addr_bits_remove Pedro Alves
2008-01-23 19:22 ` arm_addr_bits_remove Jim Blandy
2008-01-23 19:29 ` arm_addr_bits_remove Daniel Jacobowitz
2008-01-23 21:12 ` arm_addr_bits_remove Jim Blandy
2008-01-24 4:54 ` arm_addr_bits_remove Pedro Alves
2008-01-24 7:35 ` arm_addr_bits_remove Jim Blandy
2008-01-24 6:30 ` arm_addr_bits_remove Jim Blandy
2008-01-24 13:39 ` arm_addr_bits_remove Pedro Alves
2008-01-24 14:45 ` arm_addr_bits_remove Daniel Jacobowitz
2008-01-24 14:56 ` arm_addr_bits_remove Pedro Alves
2008-01-24 16:53 ` arm_addr_bits_remove Jim Blandy
2008-01-24 17:01 ` arm_addr_bits_remove Pedro Alves
2008-01-24 22:19 ` arm_addr_bits_remove Joel Brobecker
2008-01-25 0:11 ` arm_addr_bits_remove Pedro Alves
2008-01-25 4:13 ` arm_addr_bits_remove Joel Brobecker
2008-01-25 9:56 ` Carlos O'Donell [this message]
2008-01-25 21:24 ` arm_addr_bits_remove John David Anglin
2008-01-25 22:14 ` arm_addr_bits_remove Jim Blandy
2008-01-26 13:57 ` arm_addr_bits_remove John David Anglin
2008-02-04 10:16 ` arm_addr_bits_remove Maciej W. Rozycki
2008-02-04 13:41 ` arm_addr_bits_remove Daniel Jacobowitz
2008-02-04 14:45 ` arm_addr_bits_remove Maciej W. Rozycki
2008-02-04 14:51 ` arm_addr_bits_remove Daniel Jacobowitz
2008-02-04 15:20 ` arm_addr_bits_remove Maciej W. Rozycki
2008-01-24 17:18 ` arm_addr_bits_remove Mark Kettenis
2008-01-24 17:50 ` arm_addr_bits_remove Joel Brobecker
2008-01-24 21:33 ` arm_addr_bits_remove Jim Blandy
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=47996465.6090201@codesourcery.com \
--to=carlos@codesourcery.com \
--cc=brobecker@adacore.com \
--cc=dave.anglin@nrc.ca \
--cc=gdb-patches@sourceware.org \
--cc=jimb@red-bean.com \
--cc=pedro@codesourcery.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