1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-12-23 15:05:29 +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,14 +36,9 @@ SECTIONS
src/lowlevel_init.o(.text)
src/start_kboot.o (.text)
*(.text)
*(.rodata)
}
. = ALIGN(4);
.rodata :
{
*(.rodata)
}
. = ALIGN(4);
.data :
{
@ -58,7 +53,7 @@ SECTIONS
. = ALIGN(4);
__bss_start = .;
.bss :
.bss (NOLOAD) :
{
*(.bss)
}

View File

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