>I beleive this could be improved by using linker tricks to have the
>linker store this size in a place where the code can fetch it via
>pc-relative access, but I don't know ld well enough to write such a script.

Actually (assuming I've understood correctly) something like this would 
stand a good chance:

int sizeof_data()
{
  extern void __data_start, __data_end;
  return &__data_end - &__data_start;
}

I think the linker already defines __data_end (though it might be called 
_edata or some such) but I'm less sure about __data_start.  It would be 
trivial to add though.

p.


unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]

Reply via email to