[uClinux-dev] gdb, gdbserver, and global variables

Gavin Lambert gavinl at compacsort.com
Wed Aug 3 03:12:06 EDT 2005


Quoth David McCullough:
> 
> I was under the impression (perhaps falsely) that the gdbserver 
> in the uClinux dist could debug XIP apps on m68k,  at least 
> when using the 2.95 based tools.  But then again,  something 
> about XIP support is ringing a bell.  It's been a long long time 
> since I actually used that combination on a coldfire though :-(

Actually I've already had to turn off XIP entirely (DISABLE_XIP=1,
DISABLE_MOVE_RODATA=1, make clean).  Otherwise I got the aforementioned
"reloc outside program" error.  Seemed to happen whenever the
Has-PIC-GOT flag was set, although that might be a false trail.  So my
app is already Load-to-Ram.

(Interestingly, Has-PIC-GOT got set even when I wasn't using -msep-data,
and was using the toolchain libs rather than the uClinux libs.  It only
went away after I disabled XIP in uClinux.  Possibly I've got a stealth
include in there somewhere.)

My latest link line is as follows:
  m68k-elf-gcc -m5307 -DCONFIG_COLDFIRE -O0 -g -fno-common -Wall -Dlinux
-D__linux__ -Dunix -D__uClinux__ -DEMBED -fno-builtin -Wl,-elf2flt='-s
65536' -o testApp testApp.eo ../testLib/libtestLib.a
../testCore/libtestCore.ea -lstdc++




More information about the uClinux-dev mailing list