binutils-gdb/elfcpp
Nick Alcock e755667f94 libctf, elfcpp, gold: do not assume that <byteswap.h> contains bswap_*
At least one C library (uclibc-ng) defines some of these only when
the compiler is GCC.  We might as well test for all three cases and
handle any of them being missing.

Very similar code exists in libctf and split between elfcpp and gold:
fix both.

(Also sync up elfcpp with a change made to libctf swap.h a few months
ago: since there is no out-of-line definition of the bswap replacements,
they should be declared static inline, not just inline, to prevent the
linker generating out-of-line references to them.)

	PR libctf/25120
libctf/
	* configure.ac: Check for bswap_16, bswap_32, and bswap_64 decls.
	* swap.h (bswap_16): Do not assume that presence of <byteswap.h>
	means this is declared.
	(bswap_32): Likewise.
	(bswap_64): Likewise.
	(bswap_identity_64): Remove, unused.
	* configure: Regenerated.
	* config.h.in: Likewise.
gold/
	* configure.ac: Check for bswap_16, bswap_32, and bswap_64 decls.
	* configure: Regenerated.
	* config.h.in: Likewise.
elfcpp/
	* elfcpp_swap.h (bswap_16): Do not assume that presence of
	<byteswap.h> means this is declared.  Make static inline, matching
	recent change to libctf, since there is no non-inline definition
	of these functions.
	(bswap_32): Likewise.
	(bswap_64): Likewise.
2020-06-26 15:56:39 +01:00
..
ChangeLog libctf, elfcpp, gold: do not assume that <byteswap.h> contains bswap_* 2020-06-26 15:56:39 +01:00
ChangeLog-0815 binutils ChangeLog rotation 2016-01-01 22:59:17 +10:30
ChangeLog-2016 ChangeLog rotation 2017-01-02 13:55:05 +10:30
ChangeLog-2017 ChangeLog rotation 2018-01-03 17:49:42 +10:30
ChangeLog-2018 ChangeLog rotation 2019-01-01 21:25:40 +10:30
ChangeLog-2019 ChangeLog rotation 2020-01-01 18:12:08 +10:30
README Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
aarch64.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
arm.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
dwarf.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
elfcpp.h [PATCH] gold: Set DF_1_PIE for -pie 2020-06-18 10:46:18 +01:00
elfcpp_file.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
elfcpp_internal.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
elfcpp_swap.h libctf, elfcpp, gold: do not assume that <byteswap.h> contains bswap_* 2020-06-26 15:56:39 +01:00
i386.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
mips.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
powerpc.h Rename PowerPC64 pcrel GOT TLS relocations 2020-06-06 14:44:32 +09:30
s390.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
sparc.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
tilegx.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
x86_64.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30

README

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

elfcpp is a C++ library for reading and writing ELF information.  This
was written to support gold, the ELF linker, and may not be generally
useful.

elfcpp does not do file I/O.  It deals only with offsets and memory
data.

For efficiency, most accessors are templates with two arguments: the
ELF file class (32 or 64 bits) and the endianness.


Copyright (C) 2012-2020 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.