relocation truncated to fit

Aaron J. Grier aaron@frye.com
Thu Aug 19 16:48:00 GMT 1999


On Thu, Aug 19, 1999 at 06:41:39PM -0400, Ian Lance Taylor wrote:

> This means that have a 16 bit relocation and you're trying to stuff in
> a value that is larger than 16 bits.  DISP16 is a 16 bit PC relative
> relocation.  Since you are on the m68k, I would guess that you are
> using something like a 16 bit branch call instruction, but the symbol
> _vputs is not within a signed 16 bit range of the instruction.

That makes sense.  The problem, of course, is why the heck is this
happening?  Assembling with --disp-size-default-32 and 
--base-size-default-32 doesn't seem to make any difference.

However, I can manually fix the problem by adding explicit '.l'
suffixes.  It would appear from previous experience that the Sierra
tools aren't as anal about this as GNU.

Is there any way I could automatically have the assembler generate
appropriate byte/word offsets for internal labels, and long offsets for
external ones?

Or is there some way the linker can magically relocate things such that
the minimum distance between any branch and its label falls within a
16-bit offset?  :)  (Hmm...  O(n!) runtime, anyone?  Hehehe...)

Thanks much for your help.

> I would appreciate hearing any easily-implemented suggestions for how
> to make this error message more clear.

I'd settle for having it documented in the info pages.

----
  Aaron J. Grier  |  Frye Electronics, Tigard, OR  |  aaron@frye.com
  "People who are more than casually interested in computers should have
   at least some idea of what the underlying hardware is like. Otherwise
   the programs they write will be pretty weird."   --   Donald Knuth

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com



More information about the crossgcc mailing list