This is the mail archive of the crossgcc@sourceware.cygnus.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


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

Re: relocation truncated to fit


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


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