This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFC] Cross core support


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]