3 /* Uncomment this if you want srecords. This is needed for a.out
4 * if you plan to use GDB.
9 GROUP(-lidpgdb -lc -lgcc)
13 * Setup the memory map of the MC68ec0x0 Board (IDP)
14 * stack grows down from high memory. This works for
15 * both the rom68k and the mon68k monitors.
17 * The memory map look like this:
18 * +--------------------+ <- low memory
21 * | ctor list | the ctor and dtor lists are for
22 * | dtor list | C++ support
23 * +--------------------+
24 * | .data | initialized data goes here
26 * +--------------------+
28 * | __bss_start | start of bss, cleared by crt0
29 * | _end | start of heap, used by sbrk()
30 * +--------------------+
34 * | __stack | top of stack
35 * +--------------------+
39 * When the IDP is not remapped (see rom68k's MP command in the
40 * "M68EC0x0IDP Users Manual", the first 64K bytes are reserved;
41 * Otherwise the first 256K bytes are reserved.
43 * The following memory map describes a unmapped IDP w/2MB RAM.
48 ram (rwx) : ORIGIN = 0x00010000, LENGTH = 2M-64K
49 rom0 : ORIGIN = 0x00800000, LENGTH = 1M
50 rom1 : ORIGIN = 0x00900000, LENGTH = 1M
54 * allocate the stack to be at the top of memory, since the stack
58 PROVIDE (__stack = 2M - 8);
61 * Initalize some symbols to be zero so we can reference them in the
62 * crt0 without core dumping. These functions are all optional, but
63 * we do this so we can have our crt0 always use them if they exist.
64 * This is so BSPs work better when using the crt0 installed with gcc.
65 * We have to initalize them twice, so we cover a.out (which prepends
66 * an underscore) and coff object file formats.
68 PROVIDE (hardware_init_hook = 0);
69 PROVIDE (_hardware_init_hook = 0);
70 PROVIDE (software_init_hook = 0);
71 PROVIDE (_software_init_hook = 0);
73 * stick everything in ram (of course)
83 /* These are for running static constructors and destructors under ELF. */
84 KEEP (*crtbegin.o(.ctors))
85 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
86 KEEP (*(SORT(.ctors.*)))
88 KEEP (*crtbegin.o(.dtors))
89 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
90 KEEP (*(SORT(.dtors.*)))
102 __INIT_SECTION__ = . ;
103 LONG (0x4e560000) /* linkw %fp,#0 */
105 SHORT (0x4e5e) /* unlk %fp */
106 SHORT (0x4e75) /* rts */
109 __FINI_SECTION__ = . ;
110 LONG (0x4e560000) /* linkw %fp,#0 */
112 SHORT (0x4e5e) /* unlk %fp */
113 SHORT (0x4e75) /* rts */
142 .stabstr 0 (NOLOAD) :