Forwarding Dave's explanation (with permission).
--- Begin Message ---
Typically, the cryptic message indicates an overflow of the stub stable
generated by the linker.  The stubs are used to make long calls.  GCC
assumes a fixed size for the table and computes branch distances on this
basis.

Changing GCC versions probably won't help although versions vary in
the amount of inlining, and therfore the number of calls from a single
function.  The message to "recompile with -ffunction-sections" doesn't
usally help.

-mlong-calls should fix the problem at the expense of longer call
instruction sequences.  There are GCC options to limit inlining.  This
may take some trial and error to find the best alternative, but this
will result in better code.

There have been some fixes correcting branch distances since 3.4.  Further,
the oldest supported GCC branch is 4.3.  Support for it will soon stop when
4.7 is released.  It's likely there will be no further 4.3 releases.
So, we need a report with current GCC and binutils versions.

It is not easy to work around this limitation because it is based on the
approach used originally in HP-UX.  There is a ld option to change the
size of the stub table, but mucking with this doesn't usually help because
GCC's branch distance calculation is fixed.  PA 2.0 has longer branch
distances for pc-rel calls but this won't help if support for PA 1.X is
maintained.

Dave
-- 
J. David Anglin                                  dave.ang...@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

--- End Message ---

Reply via email to