This is the mail archive of the gcc-bugs@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]

Re: How to debug "relocation truncated" error.


On Fri, Aug 17, 2001 at 12:58:14PM -0700, Doug Broadwell wrote:
> Hi,
> 
> I'm cross compiling code using the m68k-pic-coff-gcc compiler, version
> 2.7.2.3-pic-060999, on an Intel Linux machine . The command line:
> 
>      m68k-pic-coff-gcc main.c monitor.o graph.o
> 
> results in the error:
> 
>      monitor.o(.text+0xdf8):monitor.c: relocation truncated to fit: DISP16
> data
> 
> I don't know how to go about debugging this error as the assembly output
> does not give address information (nor the C code interleaved with the
> assembly code). It does not generate the executable so I can't debug using
> GDB (assuming I got it set up to work on the remote machine).
> 
> Help!
> 
> Thanks, Doug Broadwell

The easiest way to find .text+0xdf8 is by doing:

nm monitor.o | sort

Then look for the symbol (function) name that starts on or before 0xdf8
(the first column).  I don't know what "relocation truncated" means.

-- 
Carlo Wood <carlo@alinoe.com>


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