[U-Boot-Users] Coldfire: Problem with linking / CFG_MONITOR_BASE

Dear List,
I was trying to clean up my "new" mcf532x tree to prepare for sending patches, and switched back to CONFIG_MONITOR_IS_IN_RAM being undefined.
Now, I get the following error during final linking:
cpu/mcf532x/start.o(.text+0x452):start.S:163: relocation truncated to fit: R_68K_PC16 against symbol `board_init_f' defined in .text section in lib_m68k/libm68k.a(board.o) cpu/mcf532x/start.o(.text+0x504):start.S:266: relocation truncated to fit: R_68K_PC16 against symbol `int_handler' defined in .text section in lib_m68k/libm68k.a(interrupts.o) make: *** [u-boot] Error 1
I could track it down that this is triggered by the setting of #ifdef CONFIG_MONITOR_IS_IN_RAM #define CFG_MONITOR_BASE 0x40020000 #else #define CFG_MONITOR_BASE (CFG_FLASH_BASE + 0x400) #endif in my config.h, i.e. if I swap these two values, compilation fails in the other case.
Can anybody give a hint what might be going wrong here?
Thank you, Wolfgang

Hi,
sorry for answering (or following up to) my own message.
The problem is related to the linker script and code size.
I can link U-Boot successfully when commenting out the special treatment for the environment in the linker script:
/* . = DEFINED(env_offset) ? env_offset : .;*/ /* common/environment.o (.text)*/
The resulting image is, however, more than 2 times as big as the image configured for starting from RAM, I did not yet figure out why. (regular: around 100k, now: 238k)
Best regards, Wolfgang
On 8 Aug 2007 at 15:33, w.wegner@astro-kom.de wrote:
Dear List,
I was trying to clean up my "new" mcf532x tree to prepare for sending patches, and switched back to CONFIG_MONITOR_IS_IN_RAM being undefined.
Now, I get the following error during final linking:
cpu/mcf532x/start.o(.text+0x452):start.S:163: relocation truncated to fit: R_68K_PC16 against symbol `board_init_f' defined in .text section in lib_m68k/libm68k.a(board.o) cpu/mcf532x/start.o(.text+0x504):start.S:266: relocation truncated to fit: R_68K_PC16 against symbol `int_handler' defined in .text section in lib_m68k/libm68k.a(interrupts.o) make: *** [u-boot] Error 1
I could track it down that this is triggered by the setting of #ifdef CONFIG_MONITOR_IS_IN_RAM #define CFG_MONITOR_BASE 0x40020000 #else #define CFG_MONITOR_BASE (CFG_FLASH_BASE + 0x400) #endif in my config.h, i.e. if I swap these two values, compilation fails in the other case.
Can anybody give a hint what might be going wrong here?
Thank you, Wolfgang

Wolfgang,
Check the u-boot.lds in board folder, it could be the env unable to fit nicely in the flash sector. Also, in configuration file, make sure the env size and offset match the flash offset and size.
Regards, TsiChung
-----Original Message----- From: u-boot-users-bounces@lists.sourceforge.net [mailto:u-boot-users-bounces@lists.sourceforge.net] On Behalf Of w.wegner@astro-kom.de Sent: Wednesday, August 08, 2007 8:33 AM To: u-boot-users@lists.sourceforge.net Subject: [U-Boot-Users] Coldfire: Problem with linking / CFG_MONITOR_BASE
Dear List,
I was trying to clean up my "new" mcf532x tree to prepare for sending patches, and switched back to CONFIG_MONITOR_IS_IN_RAM being undefined.
Now, I get the following error during final linking:
cpu/mcf532x/start.o(.text+0x452):start.S:163: relocation truncated to fit: R_68K_PC16 against symbol `board_init_f' defined in .text section in lib_m68k/libm68k.a(board.o) cpu/mcf532x/start.o(.text+0x504):start.S:266: relocation truncated to fit: R_68K_PC16 against symbol `int_handler' defined in .text section in lib_m68k/libm68k.a(interrupts.o) make: *** [u-boot] Error 1
I could track it down that this is triggered by the setting of #ifdef CONFIG_MONITOR_IS_IN_RAM #define CFG_MONITOR_BASE 0x40020000 #else #define CFG_MONITOR_BASE (CFG_FLASH_BASE + 0x400) #endif in my config.h, i.e. if I swap these two values, compilation fails in the other case.
Can anybody give a hint what might be going wrong here?
Thank you, Wolfgang
------------------------------------------------------------------------ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
participants (2)
-
Liew Tsi Chung-r5aahp
-
w.wegner@astro-kom.de