This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Linker errors with large objects and -pg on PA



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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]