Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  relocation truncated to fit -> error when compiling mod.c for IPodmini2g
« previous next »
  • Print
Pages: [1]

Author Topic: relocation truncated to fit -> error when compiling mod.c for IPodmini2g  (Read 6154 times)

Offline cynric

  • Member
  • *
  • Posts: 12
relocation truncated to fit -> error when compiling mod.c for IPodmini2g
« on: February 28, 2007, 04:10:17 PM »
Hi!
I used to build my own svn build for my ipod mini 2g (using the vmware image) with the greyscale ipod lcd fix and the .mod codec (0.13). but since i had to update the vmware image i get the following errors at compiling mod.c:
Code: [Select]
CC mod.c
LD mod.elf
/home/user/rbx/RockboxSvn/rockbox_patched_svn/built/apps/codecs/mod.o: In function `codec_main':
mod.c:(.text+0xbc): relocation truncated to fit: R_ARM_PC24 against `.icode'
mod.c:(.text+0x1c0): relocation truncated to fit: R_ARM_PC24 against `.icode'
collect2: ld returned 1 exit status
make[2]: *** [/home/user/rbx/RockboxSvn/rockbox_patched_svn/built/apps/codecs/mod.elf] Error 1
rm /home/user/rbx/RockboxSvn/rockbox_patched_svn/built/apps/codecs/codec_crt0.o
make[1]: *** [build-codecs] Error 2
make: *** [all] Error 2
without the .mod codec everything works fine...
also for other platforms, compiling works (tested for h120).

how can i get this to work again?

thanks!
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3421
  • creature
Re: relocation truncated to fit -> error when compiling mod.c for IPodmini2g
« Reply #1 on: February 28, 2007, 05:13:42 PM »
this error message looks like an outdated compiler -- which version are you using?
(try arm-elf-gcc --version) You should at least have 4.0.3 (and IIRC the vmware image was outdated at some time, but I might be wrong at this).
Logged
Rockbox Utility development binaries (updated infrequently) · How to ask questions the smart way · We do not estimate timeframes.

Offline cynric

  • Member
  • *
  • Posts: 12
Re: relocation truncated to fit -> error when compiling mod.c for IPodmini2g
« Reply #2 on: February 28, 2007, 05:29:36 PM »
4.0.3. just trying a dist-upgrade, see if that helps...
Logged

Offline cynric

  • Member
  • *
  • Posts: 12
Re: relocation truncated to fit -> error when compiling mod.c for IPodmini2g
« Reply #3 on: February 28, 2007, 06:06:11 PM »
no luck, same error..
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: relocation truncated to fit -> error when compiling mod.c for IPodmini2g
« Reply #4 on: February 28, 2007, 06:32:06 PM »
If it compiles fine without the patch, I would suggest asking the patch author.
Logged

Offline cynric

  • Member
  • *
  • Posts: 12
Re: relocation truncated to fit -> error when compiling mod.c for IPodmini2g
« Reply #5 on: February 28, 2007, 08:28:14 PM »
the strange thing is however, that from the same patched sources i can successfully compile a build for another system (h120)..
i just tried the previous patches, which downto 0.11 all result in the same error; 0.10 and below were before some larger changes in svn and cannot be used anymore. however i am sure to have built a mini2g version with v0.10 on 070204.
So either the patch is broken only for certain platforms or there must be some changes done for the compiler command (maybe certain optimzations?)...

i will take a look at the codechanges from v.10 to .11 tomorrow, maybe i can figure something out from that...
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: relocation truncated to fit -> error when compiling mod.c for IPodmini2g
« Reply #6 on: February 28, 2007, 08:38:42 PM »
Yes, but H120 uses a different version of GCC entirely. Try a Gigabeat build, and I suspect you'll encounter the same trouble. Or any iPod Build.
Logged

Offline cynric

  • Member
  • *
  • Posts: 12
Re: relocation truncated to fit -> error when compiling mod.c for IPodmini2g
« Reply #7 on: March 01, 2007, 05:08:57 AM »
gigabeat works, ipods fail (tested photo, video, 4g, both minis).  is there a way to disable platform specific optimization for one .c file and compile in a kind of safe mode?
Logged

Offline nls

  • Developer
  • Member
  • *
  • Posts: 460
Re: relocation truncated to fit -> error when compiling mod.c for IPodmini2g
« Reply #8 on: March 01, 2007, 09:53:41 AM »
You must replace "static" before any functions in iram with "STATICIRAM" to make this work after some changes by amiconn on feb 17

Functions in iram are those followed by ICODE_ATTR in the declaration.

for example:
static void UpdateNote(void) ICODE_ATTR;
static void UpdateNote(void) {

would become:
STATICIRAM UpdateNote(void) ICODE_ATTR;
STATICIRAM void UpdateNote(void) {
Logged

Offline cynric

  • Member
  • *
  • Posts: 12
Re: relocation truncated to fit -> error when compiling mod.c for IPodmini2g
« Reply #9 on: March 01, 2007, 10:20:39 AM »
wow, thanks alot, nls. now it compiles and plays fine again!
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  relocation truncated to fit -> error when compiling mod.c for IPodmini2g
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.81 seconds with 15 queries.