Permalink
Browse files

Add files via upload

  • Loading branch information...
Kenny D. Lee
Kenny D. Lee committed Feb 8, 2018
1 parent cf829d3 commit fbc88f5be812c7f8b971e943889d8c829981ef40
Showing with 5,253 additions and 144 deletions.
  1. +8 −4 devkitpro/crtls/arm/3dsx.ld
  2. +1 −1 devkitpro/crtls/arm/3dsx_crt0.s
  3. +8 −0 devkitpro/crtls/arm/Makefile
  4. +3 −3 devkitpro/crtls/arm/dldi.ld
  5. +86 −37 devkitpro/crtls/arm/ds_arm7.ld
  6. +85 −3 devkitpro/crtls/arm/ds_arm7_crt0.s
  7. +187 −0 devkitpro/crtls/arm/ds_arm7_iwram.ld
  8. +8 −0 devkitpro/crtls/arm/ds_arm7_iwram.specs
  9. +14 −4 devkitpro/crtls/arm/ds_arm7_vram.ld
  10. +1 −1 devkitpro/crtls/arm/ds_arm7_vram.specs
  11. +96 −58 devkitpro/crtls/arm/ds_arm9.ld
  12. +1 −3 devkitpro/crtls/arm/ds_arm9.mem
  13. +67 −9 devkitpro/crtls/arm/ds_arm9_crt0.s
  14. +14 −3 devkitpro/crtls/arm/ds_cart.ld
  15. +1 −1 devkitpro/crtls/arm/ds_cart_crt0.s
  16. +1 −3 devkitpro/crtls/arm/dsi_arm9.mem
  17. +1 −1 devkitpro/crtls/arm/er_crt0.s
  18. +8 −2 devkitpro/crtls/arm/gba_cart.ld
  19. +6 −3 devkitpro/crtls/arm/gba_crt0.s
  20. +2 −2 devkitpro/crtls/arm/gba_er.ld
  21. +10 −3 devkitpro/crtls/arm/gba_mb.ld
  22. +8 −2 devkitpro/crtls/arm/gp32.ld
  23. +1 −1 devkitpro/crtls/arm/gp32_crt0.s
  24. +257 −0 devkitpro/crtls/ppc/wup.ld
  25. +186 −0 devkitpro/crtls/v2/arm/3dsx.ld
  26. +8 −0 devkitpro/crtls/v2/arm/3dsx.specs
  27. +73 −0 devkitpro/crtls/v2/arm/3dsx_crt0.s
  28. +5 −0 devkitpro/crtls/v2/arm/Makefile
  29. +9 −0 devkitpro/crtls/v2/arm/build-crt.sh
  30. +190 −0 devkitpro/crtls/v2/arm/dldi.ld
  31. +176 −0 devkitpro/crtls/v2/arm/ds_arm7.ld
  32. +8 −0 devkitpro/crtls/v2/arm/ds_arm7.specs
  33. +97 −0 devkitpro/crtls/v2/arm/ds_arm7_crt0.s
  34. +180 −0 devkitpro/crtls/v2/arm/ds_arm7_vram.ld
  35. +8 −0 devkitpro/crtls/v2/arm/ds_arm7_vram.specs
  36. +242 −0 devkitpro/crtls/v2/arm/ds_arm9.ld
  37. +8 −0 devkitpro/crtls/v2/arm/ds_arm9.mem
  38. +8 −0 devkitpro/crtls/v2/arm/ds_arm9.specs
  39. +208 −0 devkitpro/crtls/v2/arm/ds_arm9_crt0.s
  40. +213 −0 devkitpro/crtls/v2/arm/ds_cart.ld
  41. +8 −0 devkitpro/crtls/v2/arm/ds_cart.specs
  42. +160 −0 devkitpro/crtls/v2/arm/ds_cart_crt0.s
  43. +8 −0 devkitpro/crtls/v2/arm/dsi_arm9.mem
  44. +8 −0 devkitpro/crtls/v2/arm/dsi_arm9.specs
  45. +56 −0 devkitpro/crtls/v2/arm/er_crt0.s
  46. +8 −0 devkitpro/crtls/v2/arm/gba.specs
  47. +312 −0 devkitpro/crtls/v2/arm/gba_cart.ld
  48. +246 −0 devkitpro/crtls/v2/arm/gba_crt0.s
  49. +49 −0 devkitpro/crtls/v2/arm/gba_er.ld
  50. +8 −0 devkitpro/crtls/v2/arm/gba_er.specs
  51. +296 −0 devkitpro/crtls/v2/arm/gba_mb.ld
  52. +8 −0 devkitpro/crtls/v2/arm/gba_mb.specs
  53. +165 −0 devkitpro/crtls/v2/arm/gp32.ld
  54. +8 −0 devkitpro/crtls/v2/arm/gp32.specs
  55. +74 −0 devkitpro/crtls/v2/arm/gp32_crt0.s
  56. +213 −0 devkitpro/crtls/v2/arm/gp32_gpsdk.ld
  57. +8 −0 devkitpro/crtls/v2/arm/gp32_gpsdk.specs
  58. +246 −0 devkitpro/crtls/v2/arm/gp32_gpsdk_crt0.s
  59. +303 −0 devkitpro/crtls/v2/ppc/gcn.ld
  60. +278 −0 devkitpro/crtls/v2/ppc/ogc.ld
  61. +298 −0 devkitpro/crtls/v2/ppc/rvl.ld
@@ -13,8 +13,8 @@ SECTIONS
{
/* =========== CODE section =========== */
. = 0x100000;
__start__ = . ;
PROVIDE(__start__ = 0x100000);
. = __start__;
.text ALIGN(0x1000) :
{
@@ -40,7 +40,9 @@ SECTIONS
/* =========== RODATA section =========== */
.rodata ALIGN(0x1000) :
. = ALIGN(0x1000);
.rodata :
{
*(.rodata)
*(.roda)
@@ -58,7 +60,9 @@ SECTIONS
/* =========== DATA section =========== */
.data ALIGN(0x1000) :
. = ALIGN(0x1000);
.data :
{
*(.data)
*(.data.*)
@@ -5,7 +5,7 @@
@---------------------------------------------------------------------------------
@---------------------------------------------------------------------------------
.section ".crt0"
.section ".crt0","ax"
.global _start, __service_ptr, __apt_appid, __heap_size, __linear_heap_size, __system_arglist, __system_runflags
@---------------------------------------------------------------------------------
.align 2
@@ -3,3 +3,11 @@ include $(DEVKITARM)/base_rules
all:
$(CC) -x assembler-with-cpp -marm -c $(CRT)_crt0.s -o$(CRT)_crt0.o
$(CC) -x assembler-with-cpp -mthumb -c $(CRT)_crt0.s -o thumb/$(CRT)_crt0.o
ds_arm7_vram_crt0:
$(CC) -x assembler-with-cpp -marm -c -DVRAM ds_arm7_crt0.s -ods_arm7_vram_crt0.o
$(CC) -x assembler-with-cpp -mthumb -c -DVRAM ds_arm7_crt0.s -othumb/ds_arm7_vram_crt0.o
3dsx_crt0:
$(CC) -march=armv6k -mfloat-abi=hard -c 3dsx_crt0.s -o armv6k/fpu/3dsx_crt0.o
@@ -8,16 +8,16 @@ MEMORY {
the patcher / linker to find all shifted addresses within each section.
Changed sections are: glue_7, got
*/
ddmem : ORIGIN = 0xBF800000, LENGTH = 32K
ddmem : ORIGIN = 0xBF800000, LENGTH = 16K
}
SECTIONS
{
.init :
.crt0 :
{
__text_start = . ;
KEEP (*(.init))
KEEP (*(.crt0))
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >ddmem = 0xff
@@ -2,10 +2,21 @@ OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(_start)
PHDRS {
crt0 PT_LOAD FLAGS(7);
arm7 PT_LOAD FLAGS(7);
arm7i PT_LOAD FLAGS(0x100007);
}
MEMORY {
ewram : ORIGIN = 0x02380000, LENGTH = 12M - 512K
rom : ORIGIN = 0x08000000, LENGTH = 32M
iwram : ORIGIN = 0x037f8000, LENGTH = 96K
rom : ORIGIN = 0x08000000, LENGTH = 32M
iwram : ORIGIN = 0x037f8000, LENGTH = 96K
twl_ewram : ORIGIN = 0x02e80000, LENGTH = 512K - 64K
twl_iwram : ORIGIN = 0x03000000, LENGTH = 256K
}
__iwram_start = ORIGIN(iwram);
@@ -21,30 +32,57 @@ __irq_vector = 0x04000000 - 4;
SECTIONS
{
.init :
.twl :
{
__text_start = . ;
KEEP (*(.init))
__arm7i_lma__ = LOADADDR(.twl);
__arm7i_start__ = .;
*(.twl)
*.twl*(.text .stub .text.* .gnu.linkonce.t.*)
*.twl*(.rodata)
*.twl*(.roda)
*.twl*(.rodata.*)
*.twl*(.data)
*.twl*(.data.*)
*.twl*(.gnu.linkonce.d*)
__arm7i_end__ = .;
} >twl_iwram AT>twl_ewram :arm7i
.twl_bss ALIGN(4) (NOLOAD) :
{
__twl_bss_start__ = .;
*(.twl_bss)
*.twl.*(.dynbss)
*.twl.*(.gnu.linkonce.b*)
*.twl.*(.bss*)
*.twl.*(COMMON)
__twl_bss_end__ = .;
} >twl_iwram :NONE
.crt0 :
{
KEEP (*(.crt0))
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >iwram = 0xff
.plt : { *(.plt) } >iwram = 0xff
} >ewram :crt0
.text : /* ALIGN (4): */
.text :
{
__arm7_lma__ = LOADADDR(.text);
__arm7_start__ = .;
KEEP (*(SORT_NONE(.init)))
*(.plt)
*(.text .stub .text.* .gnu.linkonce.t.*)
KEEP (*(.text.*personality*))
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
*(.glue_7t) *(.glue_7) *(.vfp11_veneer)
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >iwram = 0xff
} >iwram AT>ewram :arm7
.fini :
{
KEEP (*(.fini))
} >iwram =0xff
__text_end = . ;
} >iwram AT>ewram
.rodata :
{
@@ -55,27 +93,38 @@ SECTIONS
*(.gnu.linkonce.r*)
SORT(CONSTRUCTORS)
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >iwram = 0xff
} >iwram AT>ewram
.ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >iwram
__exidx_start = .;
.ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } >iwram
__exidx_end = .;
.ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >iwram AT>ewram
.ARM.exidx : {
__exidx_start = .;
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
__exidx_end = .;
} >iwram AT>ewram
/* Ensure the __preinit_array_start label is properly aligned. We
could instead move the label definition inside the section, but
the linker would then create the section even if it turns out to
be empty, which isn't pretty. */
. = ALIGN(32 / 8);
PROVIDE (__preinit_array_start = .);
.preinit_array : { KEEP (*(.preinit_array)) } >iwram = 0xff
PROVIDE (__preinit_array_end = .);
PROVIDE (__init_array_start = .);
.init_array : { KEEP (*(.init_array)) } >iwram = 0xff
PROVIDE (__init_array_end = .);
PROVIDE (__fini_array_start = .);
.fini_array : { KEEP (*(.fini_array)) } >iwram = 0xff
PROVIDE (__fini_array_end = .);
.preinit_array : {
. = ALIGN(32 / 8);
PROVIDE (__preinit_array_start = .);
KEEP (*(.preinit_array))
PROVIDE (__preinit_array_end = .);
} >iwram AT>ewram
.init_array : {
PROVIDE (__init_array_start = .);
KEEP (*(.init_array))
PROVIDE (__init_array_end = .);
} >iwram AT>ewram
.fini_array : {
PROVIDE (__fini_array_start = .);
KEEP (*(.fini_array))
PROVIDE (__fini_array_end = .);
} >iwram AT>ewram
.ctors :
{
@@ -90,7 +139,7 @@ SECTIONS
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >iwram = 0xff
} >iwram AT>ewram
.dtors :
{
@@ -99,21 +148,21 @@ SECTIONS
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >iwram = 0xff
} >iwram AT>ewram
.eh_frame :
{
KEEP (*(.eh_frame))
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >iwram = 0xff
} >iwram AT>ewram
.gcc_except_table :
{
*(.gcc_except_table)
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >iwram = 0xff
.jcr : { KEEP (*(.jcr)) } >iwram = 0
.got : { *(.got.plt) *(.got) } >iwram = 0
} >iwram AT>ewram
.jcr : { KEEP (*(.jcr)) } >iwram AT>ewram
.got : { *(.got.plt) *(.got) } >iwram AT>ewram
.data ALIGN(4) : {
__data_start = ABSOLUTE(.);
@@ -123,10 +172,11 @@ SECTIONS
CONSTRUCTORS
. = ALIGN(4);
__data_end = ABSOLUTE(.) ;
} >iwram = 0xff
} >iwram AT>ewram
.bss ALIGN(4) :
.bss ALIGN(4) (NOLOAD) :
{
__arm7_end__ = .;
__bss_start = ABSOLUTE(.);
__bss_start__ = ABSOLUTE(.);
*(.dynbss)
@@ -171,6 +221,5 @@ SECTIONS
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
.stack 0x80000 : { _stack = .; *(.stack) }
/* These must appear regardless of . */
}
}
Oops, something went wrong.

0 comments on commit fbc88f5

Please sign in to comment.