[comp.sys.mips] loader error question

dwl@hare.cdc.com (Daren W Latham) (11/06/90)

I have seen the following error, or something similar several times,
does anybody know what causes this, and how do you work around it, or
fix it.

cc -o xbd xbd.o shared.o field.o scores.o -lXext -lX11 \
  -systype bsd43 -lmld -lm

ld:
/bsd43/usr/lib/libc.a(syslog.o): jump relocation out-of-range, 
  bad object file produced, can't jump from 0x429bb4 to 0x10007d90 (time)
*** Error code 1

Stop.

    -- Thanks,

      -- Daren

-- 
Daren W. Latham, ARH215                | dwl@udev.cdc.com
Control Data Corporation               | {uunet}!shamash!punjab!hare!dwl
4201 North Lexington Avenue            |
Arden Hills, MN 55126                  | (612)482-3457

rogerk@mips.COM (Roger B.A. Klorese) (11/06/90)

In article <28303@shamash.cdc.com> dwl@udev.cdc.com (Daren W Latham) writes:
>
>I have seen the following error, or something similar several times,
>does anybody know what causes this, and how do you work around it, or
>fix it.
>
>cc -o xbd xbd.o shared.o field.o scores.o -lXext -lX11 \
>  -systype bsd43 -lmld -lm
>
>ld:
>/bsd43/usr/lib/libc.a(syslog.o): jump relocation out-of-range, 
>  bad object file produced, can't jump from 0x429bb4 to 0x10007d90 (time)
>*** Error code 1
>
>Stop.

Daren:

That problem is almost universally caused by having an external data element
declared with the same name as a procedure.

This message is telling you that it is trying to jump from 0x429bb4, an
address in the default text region range, to 0x10007d90, an address in the
default data region range (data starts at 0x10000000).  The symbol it is 
attempting to resolve is "time", and you probably have a variable called
"time" while your code or routines called by you call "time".
-- 
ROGER B.A. KLORESE                                  MIPS Computer Systems, Inc.
MS 6-05    930 DeGuigne Dr.   Sunnyvale, CA  94086              +1 408 524-7421
rogerk@mips.COM         {ames,decwrl,pyramid}!mips!rogerk         "I'm the NLA"
"The problem with the rat race is even if you win you're still a rat." - Tomlin

jay@mips.COM (Jay McCauley) (11/07/90)

In article <28303@shamash.cdc.com> dwl@udev.cdc.com (Daren W Latham) writes:
>
>I have seen the following error, or something similar several times,
>does anybody know what causes this, and how do you work around it, or
>fix it.
>
>cc -o xbd xbd.o shared.o field.o scores.o -lXext -lX11 \
>  -systype bsd43 -lmld -lm
>
>ld:
>/bsd43/usr/lib/libc.a(syslog.o): jump relocation out-of-range, 
>  bad object file produced, can't jump from 0x429bb4 to 0x10007d90 (time)
>*** Error code 1
>
>Stop.
<<stuff deleted>>
Most commonly this comes from having a global variable that has
the same name as a function, often a global variable in your program
conflicts with an exposed library name or vice versa.  The message is 
arguably awfully cryptic, and gives little or no clue about what is 
really wrong.  I'll mention it to the compiler folks.

-- 
Jay McCauley
MIPS Computer Systems, 928 E. Arques, Sunnyvale, CA 94086 (408)524-8211
{decwrl,pyramid,ames}!mips!jay         jay@mips.com