mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2024-11-22 12:21:34 +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:
parent
0b4bd34f15
commit
fdb05a1e8b
@ -36,11 +36,6 @@ SECTIONS
|
||||
src/lowlevel_init.o(.text)
|
||||
src/start_kboot.o (.text)
|
||||
*(.text)
|
||||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
}
|
||||
|
||||
@ -58,7 +53,7 @@ SECTIONS
|
||||
|
||||
. = ALIGN(4);
|
||||
__bss_start = .;
|
||||
.bss :
|
||||
.bss (NOLOAD) :
|
||||
{
|
||||
*(.bss)
|
||||
}
|
||||
|
@ -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++;
|
||||
|
Loading…
Reference in New Issue
Block a user