This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Linker errors with large objects and -pg on PA
- To: gcc at gcc dot gnu dot org
- Subject: Linker errors with large objects and -pg on PA
- From: Olivier Hainque <hainque at act-europe dot fr>
- Date: Tue, 6 Feb 2001 16:18:37 +0100 (CET)
Hello all,
On HP-UX 10.20, using gcc version 2.97 20010205 (experimental),
configured with --host=hppa1.1-hp-hpux10.20 --with-gnu-as
As soon as we have objects bigger than some threshold and generated
with -pg, we get messages like :
/usr/ccs/bin/ld: Target of unconditional branch is out of range
Reference from: dumb.o(0x3ffe8)
/usr/ccs/bin/ld: Target of unconditional branch is out of range
Reference from: dumb.o(0x401bc)
These specific messages were obtained with the following command line :
$ gcc -save-temps -pg dumb.c
and a (generated) dumb.c file containing 600 functions like
proc_1 ()
{
printf ("1 with i = %d\n", 0);
...
printf ("1 with i = %d\n", 19);
}
+ one main() to call them all.
The references in the linker point to the locations of the calls to mcount
beyond a certain offset. The messages disappear if the file is split into
pieces, presumably because the HP linker correctly inserts stubs for large
PC_REL fixups in that case.
Any idea so as to why the above happens and what could be done to remedy
without splitting the source ?
Thank you very much in advance for your help,
I can provide a small C program to generate the faulty code if necessary.
Olivier