From: David McCullough Date: Tue, 4 Mar 2003 10:48:37 +0000 (+0000) Subject: Changes needed to fix arm-elf debugging and pthreads on ARM and m68k X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=03af559ffbea57f9b1953a9e46c25d078f55038d;p=elf2flt.git Changes needed to fix arm-elf debugging and pthreads on ARM and m68k It also fixes random crashes on ARM where the end of data was not aligned on a 16byte boundary. --- diff --git a/README b/README index a6885b9..15deaeb 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ README - elf2flt ---------------- -Copyright (C) 2001-2002, SnapGear (www.snapgear.com) +Copyright (C) 2001-2003, SnapGear (www.snapgear.com) davidm@snapgear.com gerg@snapgear.com diff --git a/elf2flt.ld b/elf2flt.ld index 184b381..dcefc0c 100644 --- a/elf2flt.ld +++ b/elf2flt.ld @@ -3,7 +3,6 @@ ENTRY (_start) MEMORY { flatmem : ORIGIN = 0x0, LENGTH = 0xffffff - junk : ORIGIN = 0x0, LENGTH = 0x100000 } SECTIONS { @@ -45,7 +44,10 @@ W_RODAT *(.rodata.*) data_start = . ; *(.got.plt) *(.got) + FILL(0) ; + . = ALIGN(0x10) ; LONG(-1) + . = ALIGN(0x10) ; R_RODAT *(.rodata) R_RODAT *(.rodata1) R_RODAT *(.rodata.*) @@ -64,14 +66,20 @@ R_RODAT *(.rodata.*) *(__libc_subinit) *(__libc_subfreeres) *(.note.ABI-tag) + . = ALIGN(4) ; - *(.ctors.*) + /* LATER __CTOR_LIST__ = .; */ + /* LATER LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) */ *(.ctors) LONG(0) - *(.dtors.*) + /* LATER __CTOR_END__ = .; */ + /* LATER __DTOR_LIST__ = .; */ + /* LATER LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) */ *(.dtors) LONG(0) - . = ALIGN(0x10) ; + /* LATER __DTOR_END__ = .; */ + + . = ALIGN(0x10) ; _edata = . ; } > flatmem .bss : { @@ -86,14 +94,24 @@ R_RODAT *(.rodata.*) *(.bss) *(.bss.*) *(COMMON) - . = ALIGN(0x4) ; + . = ALIGN(0x10) ; _ebss = . ; _end = . ; end = . ; } > flatmem - .junk : { - *(.rel*) - *(.rela*) - } > junk + .junk 0 : { *(.rel*) *(.rela*) } + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_info 0 : { *(.debug_info) } + .debug_line 0 : { *(.debug_line) } + .debug_pubnames 0 : { *(.debug_pubnames) } + .debug_aranges 0 : { *(.debug_aranges) } } diff --git a/ld-elf2flt.in b/ld-elf2flt.in index 6c8f596..2c91ec7 100644 --- a/ld-elf2flt.in +++ b/ld-elf2flt.in @@ -6,7 +6,7 @@ # uses the env. var FLTFLAGS as extra parameters to pass to elf2flt # arguments given like -Wl,-elf2flt="-b 10000 -v" are given before FLTFLAGS # -# Copyright (C) 2002 David McCullough +# Copyright (C) 2002,2003 David McCullough # Copyright (C) 2000, Lineo. davidm@lineo.com #