Linking with the static Linaro Forge sampler library fails with FDE overlap errors

When linking with the static Linaro Forge sampler library, you might get FDE overlap errors similar to:

ld: .eh_frame_hdr table[791] FDE at 0000000000822830 overlaps table[792] FDE at 0000000000825788

This can occur when the version of binutils on a system has been upgraded to 2.25 or later and is most commonly seen on Cray machines using CCE 8.5.0 or later.

Solution

To fix this issue, rerun make-profiler-libraries --lib-type=static and use the freshly generated static libraries and allinea-profiler.ld to link these with your program.

See Static Linking in Prepare a program for profiling for more details.

If you do not use a Cray or SUSE build of Linaro Forge and you require a binutils 2.25 compatible static library, contact Forge Support.

The error message occurs because the version of libmap-sampler.a that you attempted to link was not compatible with the version of ld in binutils versions 2.25 or greater.

For Cray machines, there is a separate library called libmap-sampler-binutils-2.25.a which is provided for use with this updated linker.

The make-profiler-libraries script automatically selects the appropriate library to use based on the version of ld found in your PATH.

If you erroneously attempt to link libmap-sampler-binutils-2.25.a with your program using a version of ld prior to 2.25, the following errors can occur:

/usr/bin/ld.x: libmap-sampler.a(dl.o): invalid relocation type 42

If this happens, check that the correct version of ld is in your PATH and rerun make-profiler-libraries --lib-type=static.