freemyipod r98 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r97‎ | r98 | r99 >
Date:17:20, 11 August 2010
Author:theseven
Status:new
Tags:
Comment:
Make the location of the boot information table a bit more predictable
Modified paths:
  • /embios/trunk/global.h (modified) (history)
  • /embios/trunk/init.c (modified) (history)
  • /embios/trunk/target/ipodnano2g/crt0.S (modified) (history)
  • /embios/trunk/target/ipodnano2g/ls.x (modified) (history)
  • /embios/trunk/target/ipodnano4g/crt0.S (modified) (history)
  • /embios/trunk/target/ipodnano4g/ls.x (modified) (history)

Diff [purge]

Index: embios/trunk/init.c
@@ -71,7 +71,7 @@
7272 static uint32_t initstack[0x400] INITSTACK_ATTR;
7373 extern int _loadspaceend;
7474 extern int _initstart;
75 -const struct bootinfo_t bootinfo_src INITCONST_ATTR =
 75+struct bootinfo_t bootinfo_src INITHEAD_ATTR =
7676 {
7777 .signature = "emBIboot",
7878 .version = 0,
Index: embios/trunk/global.h
@@ -29,6 +29,7 @@
3030 #define ICONST_ATTR __attribute__((section(".irodata")))
3131 #define IDATA_ATTR __attribute__((section(".idata")))
3232 #define IBSS_ATTR __attribute__((section(".ibss")))
 33+#define INITHEAD_ATTR __attribute__((section(".inithead")))
3334 #define INITCODE_ATTR __attribute__((section(".initcode")))
3435 #define INITCONST_ATTR __attribute__((section(".initrodata")))
3536 #define INITDATA_ATTR __attribute__((section(".initdata")))
Index: embios/trunk/target/ipodnano2g/ls.x
@@ -1,4 +1,4 @@
2 -ENTRY(_start)
 2+ENTRY(__start)
33 OUTPUT_FORMAT(elf32-littlearm)
44 OUTPUT_ARCH(arm)
55 STARTUP(build/ipodnano2g/target/ipodnano2g/crt0.o)
@@ -16,6 +16,7 @@
1717 .init :
1818 {
1919 _initstart = .;
 20+ *(.inithead*)
2021 *(.initcode*)
2122 *(.initrodata*)
2223 *(.initdata*)
Index: embios/trunk/target/ipodnano2g/crt0.S
@@ -33,6 +33,11 @@
3434 .ltorg
3535
3636
 37+.section .inithead,"ax",%progbits
 38+.global __start
 39+__start:
 40+ b _start
 41+
3742 .section .initcode,"ax",%progbits
3843 .global _start
3944 _start:
Index: embios/trunk/target/ipodnano4g/ls.x
@@ -1,4 +1,4 @@
2 -ENTRY(_start)
 2+ENTRY(__start)
33 OUTPUT_FORMAT(elf32-littlearm)
44 OUTPUT_ARCH(arm)
55 STARTUP(build/ipodnano4g/target/ipodnano4g/crt0.o)
@@ -16,6 +16,7 @@
1717 .init :
1818 {
1919 _initstart = .;
 20+ *(.inithead*)
2021 *(.initcode*)
2122 *(.initrodata*)
2223 *(.initdata*)
Index: embios/trunk/target/ipodnano4g/crt0.S
@@ -33,6 +33,11 @@
3434 .ltorg
3535
3636
 37+.section .inithead,"ax",%progbits
 38+.global __start
 39+__start:
 40+ b _start
 41+
3742 .section .initcode,"ax",%progbits
3843 .global _start
3944 _start: