gold patch committed: Make swapping less glibc dependent
Ian Lance Taylor
iant@google.com
Mon Mar 2 02:53:00 GMT 2009
The current code in gold to do byte swapping uses macros which are only
available from glibc. I committed this patch to make it more flexible.
It will now use the gcc builtin functions if they are available (gcc 4.3
or later), otherwise the glibc <byteswap.h> functions, otherwise inline
functions written in ordinary C++. Hopefully this will be more
portable.
Ian
gold:/
2009-03-01 Ian Lance Taylor <iant@google.com>
* configure.ac: Check for byteswap.h.
* configure: Rebuild.
* config.in: Rebuild.
elfcpp:/
2009-03-01 Ian Lance Taylor <iant@google.com>
* elfcpp_swap.h: #include "config.h". Only #include <byteswap.h>
if HAVE_BYTESWAP_H is defined; if not, provide definitions for
bswap_{16,32,64}. For gcc 4.3 and later, use the builtin bswap
functions. Check WORDS_BIGENDIAN rather than __BYTE_ORDER.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-patch
Size: 2854 bytes
Desc: Make swapping less glibc dependent
URL: <https://sourceware.org/pipermail/binutils/attachments/20090302/5a305298/attachment.bin>
More information about the Binutils
mailing list