diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-04-16 18:08:27 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-04-16 18:08:27 +0000 |
commit | 4a22e7a0ed614cd7e65555b249520012a12a7418 (patch) | |
tree | aaf2edb5863ad442c9f842fc0303a2fe87c2fad6 /c | |
parent | Added .eh_fram and .gcc_exc sections. (diff) | |
download | rtems-4a22e7a0ed614cd7e65555b249520012a12a7418.tar.bz2 |
Corrected to reflect new way of doing mips constructors.
Diffstat (limited to 'c')
-rw-r--r-- | c/src/lib/libbsp/mips/p4000/startup/linkcmds | 53 | ||||
-rw-r--r-- | c/src/lib/libbsp/mips64orion/p4000/startup/linkcmds | 53 |
2 files changed, 94 insertions, 12 deletions
diff --git a/c/src/lib/libbsp/mips/p4000/startup/linkcmds b/c/src/lib/libbsp/mips/p4000/startup/linkcmds index 47e0ba1162..18637fee44 100644 --- a/c/src/lib/libbsp/mips/p4000/startup/linkcmds +++ b/c/src/lib/libbsp/mips/p4000/startup/linkcmds @@ -7,6 +7,7 @@ OUTPUT_ARCH(mips) /* Do we need any of these for elf? __DYNAMIC = 0; */ _DYNAMIC_LINK = 0; + SECTIONS { /* Read-only sections, merged into text segment: */ @@ -15,14 +16,54 @@ SECTIONS /* .text 0x00020000 : /* */ { _ftext = . ; + *(.init) + eprol = .; *(.text) - CREATE_OBJECT_SYMBOLS - _etext = .; + *(.text.*) + *(.gnu.linkonce.t*) + *(.mips16.fn.*) + *(.mips16.call.*) + PROVIDE (__runtime_reloc_start = .); + *(.rel.sdata) + PROVIDE (__runtime_reloc_stop = .); + *(.fini) + /* CREATE_OBJECT_SYMBOLS */ + etext = .; + _etext = .; } - .init ALIGN(8) : { *(.init) } =0 - .fini ALIGN(8) : { *(.fini) } =0 - .ctors ALIGN(8) : { *(.ctors) } - .dtors ALIGN(8) : { *(.dtors) } + .ctors : + { + ___ctors = .; +/* + * This version is preferable but requires a very late + * model binutils (post 2.9.1). + KEEP(*crtbegin.o(.ctors)); + KEEP(*(SORT(.ctors.*))); + KEEP(*(.ctors)); +*/ + *crtbegin.o(.ctors); + *(.ctors.*); + *(.ctors); + ___ctors_end = .; + } + .dtors : + { + ___dtors = .; +/* + * This version is preferable but requires a very late + * model binutils (post 2.9.1). + KEEP(*crtbegin.o(.dtors)); + KEEP(*(SORT(.dtors.*))); + KEEP(*(.dtors)); +*/ + *crtbegin.o(.dtors); + *(.dtors.*); + *(.dtors); + ___dtors_end = .; + } + . = .; + + .rodata ALIGN(8) : { *(.rodata) *(.gnu.linkonce.r*) } .rodata1 ALIGN(8) : { diff --git a/c/src/lib/libbsp/mips64orion/p4000/startup/linkcmds b/c/src/lib/libbsp/mips64orion/p4000/startup/linkcmds index 47e0ba1162..18637fee44 100644 --- a/c/src/lib/libbsp/mips64orion/p4000/startup/linkcmds +++ b/c/src/lib/libbsp/mips64orion/p4000/startup/linkcmds @@ -7,6 +7,7 @@ OUTPUT_ARCH(mips) /* Do we need any of these for elf? __DYNAMIC = 0; */ _DYNAMIC_LINK = 0; + SECTIONS { /* Read-only sections, merged into text segment: */ @@ -15,14 +16,54 @@ SECTIONS /* .text 0x00020000 : /* */ { _ftext = . ; + *(.init) + eprol = .; *(.text) - CREATE_OBJECT_SYMBOLS - _etext = .; + *(.text.*) + *(.gnu.linkonce.t*) + *(.mips16.fn.*) + *(.mips16.call.*) + PROVIDE (__runtime_reloc_start = .); + *(.rel.sdata) + PROVIDE (__runtime_reloc_stop = .); + *(.fini) + /* CREATE_OBJECT_SYMBOLS */ + etext = .; + _etext = .; } - .init ALIGN(8) : { *(.init) } =0 - .fini ALIGN(8) : { *(.fini) } =0 - .ctors ALIGN(8) : { *(.ctors) } - .dtors ALIGN(8) : { *(.dtors) } + .ctors : + { + ___ctors = .; +/* + * This version is preferable but requires a very late + * model binutils (post 2.9.1). + KEEP(*crtbegin.o(.ctors)); + KEEP(*(SORT(.ctors.*))); + KEEP(*(.ctors)); +*/ + *crtbegin.o(.ctors); + *(.ctors.*); + *(.ctors); + ___ctors_end = .; + } + .dtors : + { + ___dtors = .; +/* + * This version is preferable but requires a very late + * model binutils (post 2.9.1). + KEEP(*crtbegin.o(.dtors)); + KEEP(*(SORT(.dtors.*))); + KEEP(*(.dtors)); +*/ + *crtbegin.o(.dtors); + *(.dtors.*); + *(.dtors); + ___dtors_end = .; + } + . = .; + + .rodata ALIGN(8) : { *(.rodata) *(.gnu.linkonce.r*) } .rodata1 ALIGN(8) : { |