[RFC] Cross core support

Daniel Jacobowitz dmj+@andrew.cmu.edu
Thu Jun 28 13:17:00 GMT 2001


On Thu, Jun 28, 2001 at 09:13:56PM +0100, Nick Clifton wrote:
> Hi Daniel,
> 
> > I'm not entirely sure what you mean by "protected by ifdefs"; how
> > would that help us compare them against the native values?
> 
> Sorry I wasn't very clear.  I imagined you creating the table like
> this:
> 
>   #define NOTE_foo_OFFSET_bar  55
>   #ifdef HAVE_PRSTATUS_T
>   #if offsetof (foo,bar) != NOT_foo_OFFSET_bar
>   #error "Offset of 'bar' in 'foo' has chnaged."
>   #endif
>   #endif
> 
> Obviously this is just a rough idea, but my though was to make the
> preprocessot check the offsets if the actual structure definitions
> were available.

Oh, I see.  Can one use sizeof() in preprocessor checks too?

> > If so, I'll try to work out a way to do
> > this with minimal code duplication for parsing all the different note
> > types, and send a patch later today or tomorrow.
> 
> Wow, so fast!

:)

It helps that (albeit hackily) I already have this done; I just need to
move it into the vector properly.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer



More information about the Binutils mailing list