1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-26 01:59:44 +02:00

fix-do-relocation

Start meddling with linkser script, more changes came later
that actually got it working by pushing all .rodata into first
4K so the linked addresses matched reality even when ran from
the SDRAM copy.

Signed-off-by: Andy Green <andy@openmoko.com>
This commit is contained in:
Andy Green 2008-08-13 00:41:21 +01:00
parent 0b4bd34f15
commit fdb05a1e8b
2 changed files with 16 additions and 7 deletions

View File

@ -36,11 +36,6 @@ SECTIONS
src/lowlevel_init.o(.text) src/lowlevel_init.o(.text)
src/start_kboot.o (.text) src/start_kboot.o (.text)
*(.text) *(.text)
}
. = ALIGN(4);
.rodata :
{
*(.rodata) *(.rodata)
} }
@ -58,7 +53,7 @@ SECTIONS
. = ALIGN(4); . = ALIGN(4);
__bss_start = .; __bss_start = .;
.bss : .bss (NOLOAD) :
{ {
*(.bss) *(.bss)
} }

View File

@ -38,9 +38,12 @@ unsigned char buf[2*1024];
#define ADDR ((volatile unsigned *)&buf) #define ADDR ((volatile unsigned *)&buf)
#define stringify(x) #x #define stringify(x) #x
static char * hello = "hello";
int start_kboot(void) int start_kboot(void)
{ {
static int n = 0; static int n = 0;
void (*p)(unsigned int) = print32;
port_init(); port_init();
serial_init(0x11, UART2); serial_init(0x11, UART2);
@ -49,7 +52,18 @@ int start_kboot(void)
serial_putc(2, '0'); serial_putc(2, '0');
serial_putc(2, 'x'); serial_putc(2, 'x');
print32((unsigned int)&n); print32((unsigned int)&n);
serial_putc(2, ' ');
serial_putc(2, '0');
serial_putc(2, 'x');
print32((unsigned int)p);
serial_putc(2, ' ');
serial_putc(2, '0');
serial_putc(2, 'x');
print32((unsigned int)hello);
serial_putc(2, '\n'); serial_putc(2, '\n');
// printk("Openmoko KBOOT "stringify(BUILD_HOST)" "stringify(BUILD_VERSION)" "stringify(BUILD_DATE)"\n"); // printk("Openmoko KBOOT "stringify(BUILD_HOST)" "stringify(BUILD_VERSION)" "stringify(BUILD_DATE)"\n");
blue_on(1); blue_on(1);
n++; n++;