Help with relocation truncation problems on m5235 coldfire target

Steve deRosier <[email protected]>
Newsgroups gmane.linux.uclinux.devel
Message-ID <CALLGbRKVGn0TFG4q5VjT5Dq6FaxYUbKStGjUnyBtryU8QWtUwQ@mail.gmail.com>
I hope someone here can help.  I'm trying to port an older project
from ~5 year old version of uClinux to a current version.  I've
managed to get everthing done, until I went to actually port the
business logic app.  I'm getting the following types of errors when it
goes to link:
'relocation truncated to fit: R_68K_GOT16O'

Some searching and I roughly understand the problem, and the alleged
solution is to build some of the problem files with the -mxgot flag.
Fine.  Then the following error:
'/usr/local/CodeSourcery/Sourcery_CodeBench_Lite_for_ColdFire_uClinux/m68k-uclinux/bin/elf2flt:
error: reloc type R_68K_GOT32O is not supported'

@#$%^#@!

Compile command line:
ucfront-gcc m68k-uclinux-gcc -mcpu=5235 -DCONFIG_COLDFIRE -O1 -g -pipe
-fno-common -fno-builtin -Wall   -DEMBED -msep-data -Dlinux
-D__linux__ -Dunix -D__uClinux__ -Wall -Werror -Wno-unused
-Wpointer-arith  -MD
-I/home/derosier/inthinc/projects/mcm820kernel/lib/libhessian/include
-I/home/derosier/inthinc/projects/mcm820kernel/user/iwi/src
-DCONFIG_5235 -DDIRECT_CALL -I./include -I/usr/include/libxml2
-I/home/derosier/inthinc/projects/mcm820kernel/staging/include
-I/home/derosier/inthinc/projects/mcm820kernel/user/iwi/src/common
-I/home/derosier/inthinc/projects/mcm820kernel/user/iwi/modules/sbs_module/include
-I/home/derosier/inthinc/projects/mcm820kernel/lib/libhessian/include
-c -o src/controller/queue.o src/controller/queue.c

When I keep the intermediates, here's the header at the top of the .s file:
| GNU C (Sourcery CodeBench Lite 2011.09-23) version 4.6.1 (m68k-uclinux)
| compiled by GNU C version 4.3.2, GMP version 4.3.2, MPFR version
3.0.1-p4, MPC version 0.9
| GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
| options passed:  -fpreprocessed controller.i -mcpu=5235 -msep-data
| -auxbase-strip src/controller/controller.o -g -O1 -Wall -Werror
| -Wno-unused -Wpointer-arith -fno-common -fno-builtin -fverbose-asm
| options enabled:  -fPIC -fauto-inc-dec -fbranch-count-reg
| -fcombine-stack-adjustments -fcompare-elim -fcprop-registers -fdefer-pop
| -fdelete-null-pointer-checks -fdwarf2-cfi-asm -fearly-inlining
| -feliminate-unused-debug-types -fforward-propagate -ffunction-cse
| -fgcse-lm -fguess-branch-probability -fident -fif-conversion
| -fif-conversion2 -finline -finline-functions-called-once -fipa-profile
| -fipa-pure-const -fipa-reference -fira-share-save-slots
| -fira-share-spill-slots -fivopts -fkeep-static-consts
| -fleading-underscore -fmath-errno -fmerge-constants -fmerge-debug-strings
| -fmove-loop-invariants -fpeephole -fprefetch-loop-arrays
| -freg-struct-return -fsched-critical-path-heuristic
| -fsched-dep-count-heuristic -fsched-group-heuristic -fsched-interblock
| -fsched-last-insn-heuristic -fsched-rank-heuristic -fsched-spec
| -fsched-spec-insn-heuristic -fsched-stalled-insns-dep -fshow-column
| -fsigned-zeros -fsplit-ivs-in-unroller -fsplit-wide-types
| -fstrict-volatile-bitfields -ftoplevel-reorder -ftrapping-math
| -ftree-bit-ccp -ftree-ccp -ftree-ch -ftree-copy-prop -ftree-copyrename
| -ftree-dce -ftree-dominator-opts -ftree-dse -ftree-forwprop -ftree-fre
| -ftree-loop-if-convert -ftree-loop-im -ftree-loop-ivcanon
| -ftree-loop-optimize -ftree-parallelize-loops= -ftree-phiprop -ftree-pta
| -ftree-reassoc -ftree-scev-cprop -ftree-sink -ftree-slp-vectorize
| -ftree-sra -ftree-ter -ftree-vect-loop-version -funit-at-a-time
| -fvar-tracking -fvar-tracking-assignments -fverbose-asm
| -fzero-initialized-in-bss -mdiv -msep-data


Link:

ucfront-gcc m68k-uclinux-gcc -mcpu=5235 -DCONFIG_COLDFIRE -Wl,-elf2flt
-Wl,-move-rodata -msep-data -Wl,-elf2flt -Wl,-move-rodata -msep-data
-L/home/derosier/inthinc/projects/mcm820kernel/user/iwi/libhessian -o
controller {...lots of .o...} libhessian/libhessian.a -lz -lm  -lm

I suspect one of the fundamental problems is the code has some HUGE
functions (2500+ lines) with huge switch blocks, but I'm here mainly
to port not to muck with (ne refactor) the logic.

All help will be appreciated.

Thanks,
- Steve
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.