[PATCH] Add missing #include <unistd.h> to libdl.c

Paul Brook paul at codesourcery.com
Sun May 25 21:06:13 UTC 2008


> > Yeah, sounds logical. I'd do this too, but I don't have sufficient faith
> > in gcc not being stupid.
>...
> > I can easily imagine that on some architecture gcc may have
> > 32-bit bool. It may be dictated by ABI or gcc may just be stupid again.
> > I'd prefer to not being constrained by gcc's choice,
> > but to make this choice independently from gcc.
>
> Maybe I am too paranoid? What do you think

Depends what your criteria are. If you want absolute smallest writable data 
size then you should probably be using char. If you want smallest overall 
size (including code) there probably isn't a good single choice..

It's not that uncommon for 32-bit loads/stores to be significantly faster than 
byte accesses.

> > From past experience, gcc *can be* stupid. On i386, it aligns
> > explicitly defined string arrays to 32 bits.

There are good performance reasons for this. On many RISC targets this means 
you can use word accesses.  Even on x86 it can give measurable speedup due to 
better cacheline performance.

Paul



More information about the uClibc mailing list