Commit [63b569]  Maximize  Restore  History

Tidy powerpc64 bfd target check

Testing for a bfd_target vector might (will!) break. See

It's safer to ask BFD for the target name. I left the direct target
vector checks in configure tests, and updated them, even though the
target vector is no longer used in oprofile code, because a run-time
configure test for powerpc64 support in bfd:
#include <bfd.h>
int main(void)
{ return !bfd_find_target("elf64-powerpc", (void *)0); }
unfortunately isn't possible when cross-compiling.

The bfd_target vector tests could be omitted if we aren't bothered by
the small runtime overhead of a strncmp on targets other than

* libutil++/bfd_support.cpp (get_synth_symbols): Don't check for
ppc64 target vector, use bfd_get_target to return the target
name instead.
* m4/binutils.m4: Modernize bfd_get_synthetic_symtab checks to
use AC_LINK_IFELSE. Check for either powerpc_elf64_vec or

Signed-off-by: Alan Modra <>

Alan Modra Alan Modra 2014-05-02

Maynard Johnson Maynard Johnson 2014-05-02

changed libutil++/bfd_support.cpp
changed m4/binutils.m4
libutil++/bfd_support.cpp Diff Switch to side-by-side view
m4/binutils.m4 Diff Switch to side-by-side view