This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: categorize_decl_for_section bogosity
- From: "Dave Korn" <dk at artimi dot com>
- To: "'Richard Henderson'" <rth at redhat dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Tue, 1 Jun 2004 18:38:11 +0100
- Subject: RE: categorize_decl_for_section bogosity
> -----Original Message-----
> From: Richard Henderson
> Sent: 25 May 2004 23:29
> To: Dave Korn
> On Tue, May 25, 2004 at 07:23:31PM +0100, Dave Korn wrote:
> > Anyone got any thoughts on this?
>
> Why are you asking what section an external reference is in?
> Seems to me your bug is before here.
>
>
>
> r~
[oops; shoulda sent this last week. pardon me for dropping it]
It's a heuristic that's specific to my particular h/w: I want to know
which section it'll end up in because if it's in the ram on my target board
I can address it via a short addressing mode and if it's in rom I can't. As
with the ppc long/short jump thing, it's easy enough to know what section an
object or function gets assigned to if it's compiled in the current module,
more difficult if it's an extern ref; but since I happen to know there's a
reliable relationship between C typedef and eventual memory disposition in
this particular case, it's a reasonable enough heuristic for my inhouse use.
And the answer, I've decided, is that regardless of whether the decl's an
extern or not, I may as well just test TREE_READONLY (as opposed to
decl_readonly_section or RTX_UNCHANGING of the underlying mem) and be done
with it.
cheers,
DaveK
--
Can't think of a witty .sigline today....