This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
relocation truncateds to fit R_ARM_PC24
- To: binutils at sources dot redhat dot com
- Subject: relocation truncateds to fit R_ARM_PC24
- From: ananda dot motte at philips dot com
- Date: Thu, 8 Nov 2001 13:46:32 +0100
I am trying to understand how runtime initialisation scripts work. So I created a linker script (memmap.ld)with the folowing MEMORY and SECTIONS
MEMORY{
FLASH_ROM (rx) : org = 0x08000000, len = 0x60000
SRAM_BANK0 (rw): org = 0x20000000, len = 0x4000
SRAM_BANK1 (r): org = 0x20004000, len = 0x4000
SRAM_BANK2 (rx): org = 0x20008000, len = 0x4000
SRAM_BANK3 (r): org = 0x2000C000, len = 0x4000
DRAM (rwx): org = 0xC0700000, len = 0x100000
MMU (!i): org = 0x08058000, len = 0x4000
}
SECTIONS{
.FLASHROM 0x08000000 :{
Startup.o(.StartupArea)
_eStartupArea = .;
}>FLASH_ROM
.SRAMBANK0 0x20000000 : AT(_eStartupArea){
Startup.o(.SramBank0Base)
_eSramBank0Base = .;
}>SRAM_BANK0
.SRAMBANK1 0x20004000 : AT(_eSramBank0Base){
Startup.o(.SramBank1Base)
_eSramBank1Base = .;
}>SRAM_BANK1
.SRAMBANK2 0x20008000 : AT(_eSramBank1Base){
Startup.o(.SramBank2Base)
_eSramBank2Base = .;
}>SRAM_BANK2
.SRAMBANK3 0x2000C000 : AT(_eSramBank2Base){
Startup.o(.SramBank3Base)
_eSramBank3Base = .;
}>SRAM_BANK3
.DRAM 0xC0700000 : AT(_eStartupArea){
*(.rodata)
*(.text)
*(.textSwap)
*(.textSort)
*(.data)
__bss_start__ = .;
*(.bss)
*(.sbss)
__bss_end__ = .;
*(.sdata)
_eDRAM = .;
}>DRAM
.MMU 0x08058000 : AT(_eDRAM){
MMU.o(.comm)
} > MMU
}
end = 0x08058000 + 0x4000 ;
I have three files startup.s and swap2.s and mmu.s which are atached below.
When I link (arm-elf-gcc -Wl, -Map peeps3, -Wl -T memap.ld ) I get the message :
SRAM_BANK0 is full ?? (When I remove the 'w' memory attribute this message is no longer given ; same for the other SRAMBANKS)
I also get
Startup.o(.StartupArea+0xc): relocation truncated to fit: R_ARM_PC24 __gccmain
Startup.o(.StartupArea+0x20): relocation truncated to fit: R_ARM_PC24 sort
.crt0.o (from arm-elf library) In function start : relocation truncateds to fit R_ARM_PC24 main
Why ? what's the solution ?
(See attached file: swap2.s)(See attached file: Startup.s)(See attached file: MMU.s)
swap2.s
Startup.s
MMU.s