ld problem on HPUX 10.01

ld problem on HPUX 10.01

Post by Ciaran Mitchel » Tue, 15 Oct 1996 04:00:00



Hello,

I'm experiencing a problem when linking a third party library
into my code. Does anyone know what the following linker error
message means?

/usr/bin/ld: Reference to <var> in file <filename> needs 3-instruction
sequence - Use +k to recompile
/usr/bin/ld: Data address is out of range for short load or store
   Reference from: <filename>
...
... <repeats>
...
/usr/bin/ld: Invalid fixups exist

Where <var> is some variable (eg. errno) and <filename> can be a system
file (e.g. /usr/lib/crt0.o) or one of our own.

If anyone has seen this linker error, I would greatly appreciate any
suggestions
they might have.

Thanks in advance,

Ciaran.

------------------------------------------------------------
Ciaran Mitchell, Senior Software Engineer

Euristix Ltd.,          Tel. +353-1-2884788  x.253
Century Court,          Fax. +353-1-2885362
100 Upper Georges St.,


------------------------------------------------------------

 
 
 

ld problem on HPUX 10.01

Post by Dennis Hand » Wed, 16 Oct 1996 04:00:00


: I'm experiencing a problem when linking a third party library into my code.

: /usr/bin/ld: Reference to <var> in file <filename> needs 3-instruction
: sequence - Use +k to recompile
: /usr/bin/ld: Data address is out of range for short load or store
:    Reference from: <filename>
: Where <var> is some variable (eg. errno) and <filename> can be a system
: file (e.g. /usr/lib/crt0.o) or one of our own.

See the compiler man page for +k.

The message means you have more than ~2K or so globals.  You must recompile
with +k.  You may be able to compile only some of your objects or you
may have to do all of them.

I'm not sure if ordering the ones you recompile with +k first or last will
do the most good.

 
 
 

ld problem on HPUX 10.01

Post by Stephen Bayn » Wed, 16 Oct 1996 04:00:00


: Hello,

: I'm experiencing a problem when linking a third party library
: into my code. Does anyone know what the following linker error
: message means?

: /usr/bin/ld: Reference to <var> in file <filename> needs 3-instruction
: sequence - Use +k to recompile
: /usr/bin/ld: Data address is out of range for short load or store
:    Reference from: <filename>
: ...
: ... <repeats>
: ...
: /usr/bin/ld: Invalid fixups exist

: Where <var> is some variable (eg. errno) and <filename> can be a system
: file (e.g. /usr/lib/crt0.o) or one of our own.

: If anyone has seen this linker error, I would greatly appreciate any
: suggestions
: they might have.

I have not seen this with HPs linker, but I have seen the equivalent with
other systems. Basically the linker is not able to do the linking requested
by the compiler. There are several possible causes:

Compiler error : compiler generating wrong link information or to restrictive
    link information.
Compiler and linker incompatible: Is the third party library built for a later
    version of the OS and linker or specifically for a different processor
    varient? Possibly mixing specific compilation/linking options might cause
    problems. I can't think of any off the top of my head for HP.
Object file mangled: Try reinstalling.
Linker error: linker has got it self in a mess.
Exceptional size of executables or object modules: can sometimes cause problems
    if they exceed the size of the addressing format used by the compiler.
    I doubt if this is the case here.

--

Philips Semiconductors Ltd
Southampton                                 My views are my own.
United Kingdom
 Are you using ISO8859-1? Do you see ? as copyright, as division and ? as 1/2?

 
 
 

ld problem on HPUX 10.01

Post by Ciaran Mitchel » Wed, 16 Oct 1996 04:00:00



> See the compiler man page for +k.

> The message means you have more than ~2K or so globals.  You must recompile
> with +k.  You may be able to compile only some of your objects or you
> may have to do all of them.

> I'm not sure if ordering the ones you recompile with +k first or last will
> do the most good.

Thanks Dennis,

I looked up the +k option in our HP documentation. The problem is, we're
compiling
with gcc (2.6.3) not cc. gcc doesn't support the +k option. Looking at
the gcc
man page, I can't seem to find an equivalent option.

Thanks again for your help.

Ciaran.

--
------------------------------------------------------------
Ciaran Mitchell
Senior Software Engineer

Euristix Ltd.,          Tel. +353-1-2884788  x.253
Century Court,          Fax. +353-1-2885362
100 Upper Georges St.,
Dun Laoghaire.


------------------------------------------------------------

 
 
 

ld problem on HPUX 10.01

Post by Raymond Nijsse » Wed, 16 Oct 1996 04:00:00




> > See the compiler man page for +k.

> > The message means you have more than ~2K or so globals.  You must recompile
> > with +k.  You may be able to compile only some of your objects or you
> > may have to do all of them.

> > I'm not sure if ordering the ones you recompile with +k first or last will
> > do the most good.
> I looked up the +k option in our HP documentation. The problem is, we're
> compiling
> with gcc (2.6.3) not cc. gcc doesn't support the +k option. Looking at
> the gcc man page, I can't seem to find an equivalent option.

In gcc-2.6.x, there used to be a switch called -mlong-calls which does more or
less the same thing.

Newer versions of gcc (I believe starting from 2.7.1) no longer need this.

[that is: at least I no longer needed to supply +k (cc) or -mlong-calls (gcc),
but you mileage may vary....]

gcc-2.7.2 has been out for almost a year.

-Raymond

--
Raymond X.T. Nijssen     |    Note that  C++>C  is undefined for any value of C
                         |
Eindhoven University of Technology, Design Automation (ES) | tel. +31-402473614
EH 7.36, PO. Box 513, 5600 MB Eindhoven, The Netherlands   | fax. +31-402464527

 
 
 

ld problem on HPUX 10.01

Post by Heribert Dah » Wed, 16 Oct 1996 04:00:00



: I looked up the +k option in our HP documentation. The problem is, we're
: compiling
: with gcc (2.6.3) not cc. gcc doesn't support the +k option. Looking at
: the gcc
: man page, I can't seem to find an equivalent option.

Try gcc 2.7.2 (with gas), maybe obtain a newer /bin/ld.


 
 
 

1. Boot-Problem HPUX 10.01

Hallo !

I have a big Problem with my hp9000. The workstation can't boot.
After the line

/sbin/ioinitrc

then the system reports:

INIT: SINGLE USER MODE
su: your own ID is unkown

[...] loops

What ca I do ??????

Thanks  - Robert L?narz

2. suggestions for VO

3. Problem telneting to HPUX v B.10.01

4. Simulating key press

5. C++ problems / HPUX 10.01

6. A good book on interpreters?

7. Problem with vogle and shared libs (HPUX 10.01)

8. Time limit for 70-029

9. scsi problems on 735 running hpux 10.01 - crash - help

10. Problems with upgrading HPUX 9 to 10.0 version B.10.01

11. Problem with C++ on HPUX 10.01 !!

12. Problem with cout, cerr and threads in HPUX 10.01

13. HPUX 10.01 Problems