summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-05-04 12:40:09 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-05-04 12:40:09 +0000
commitf35abd486372d2028182858aa97d0872e2003629 (patch)
treee292d736fcfe81a8c4e32e9b710e565a75871139 /c/src/lib/libbsp
parentRemoved warning for unnecessary reference to start as entry point. (diff)
downloadrtems-f35abd486372d2028182858aa97d0872e2003629.tar.bz2
Corrected and added sections to link cleanly under powerpc-rtems (ELF).
Diffstat (limited to 'c/src/lib/libbsp')
-rw-r--r--c/src/lib/libbsp/powerpc/papyrus/startup/linkcmds45
-rw-r--r--c/src/lib/libbsp/powerpc/psim/startup/linkcmds2
2 files changed, 30 insertions, 17 deletions
diff --git a/c/src/lib/libbsp/powerpc/papyrus/startup/linkcmds b/c/src/lib/libbsp/powerpc/papyrus/startup/linkcmds
index 00bf4c6876..3abbdd4bfc 100644
--- a/c/src/lib/libbsp/powerpc/papyrus/startup/linkcmds
+++ b/c/src/lib/libbsp/powerpc/papyrus/startup/linkcmds
@@ -22,22 +22,6 @@ MEMORY
/* Do we need any of these for elf?
__DYNAMIC = 0; */
-/* What are these for? */
-
-__EXCEPT_START__ = 0;
-__EXCEPT_END__ = 0;
-__SDATA2_START__ = 0;
-__SDATA2_END__ = 0;
-__SBSS2_START__ = 0;
-__SBSS2_END__ = 0;
-__FIXUP_START__ = 0;
-__FIXUP_END__ = 0;
-__GOT2_START__ = 0;
-__GOT2_END__ = 0;
-__SDATA_START__ = 0;
-__SDATA_END__ = 0;
-
-
SECTIONS
{
.vectors 0x0100 :
@@ -56,16 +40,19 @@ SECTIONS
*(rom_ver)
etext = ALIGN(0x10);
_etext = .;
+
__CTOR_LIST__ = .;
LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
*(.ctors)
LONG(0)
__CTOR_END__ = .;
+
__DTOR_LIST__ = .;
LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
*(.dtors)
LONG(0)
__DTOR_END__ = .;
+
*(.lit)
*(.shdata)
*(.init)
@@ -78,8 +65,13 @@ SECTIONS
{
*(.data)
*(.data1)
+ PROVIDE (__SDATA_START__ = .);
+ *(.sdata)
} > RAM
+ PROVIDE (__EXCEPT_START__ = .);
+ .gcc_except_table : { *(.gcc_except_table) } >RAM
+ PROVIDE (__EXCEPT_END__ = .);
__GOT_START__ = .;
.got :
{
@@ -87,7 +79,28 @@ SECTIONS
*(.got.plt) *(.got)
} > RAM
__GOT_END__ = .;
+
+ .got1 : { *(.got1) } >RAM
+ PROVIDE (__GOT2_START__ = .);
+ PROVIDE (_GOT2_START_ = .);
+ .got2 : { *(.got2) } >RAM
+ PROVIDE (__GOT2_END__ = .);
+ PROVIDE (_GOT2_END_ = .);
+
+ PROVIDE (__FIXUP_START__ = .);
+ PROVIDE (_FIXUP_START_ = .);
+ .fixup : { *(.fixup) } >RAM
+ PROVIDE (_FIXUP_END_ = .);
+ PROVIDE (__FIXUP_END__ = .);
+ PROVIDE (__SDATA2_START__ = .);
+ .sdata2 : { *(.sdata2) } >RAM
+ .sbss2 : { *(.sbss2) } >RAM
+ PROVIDE (__SBSS2_END__ = .);
+
+ .sbss2 : { *(.sbss2) } >RAM
+ PROVIDE (__SBSS2_END__ = .);
+
__SBSS_START__ = .;
.bss :
{
diff --git a/c/src/lib/libbsp/powerpc/psim/startup/linkcmds b/c/src/lib/libbsp/powerpc/psim/startup/linkcmds
index 7e3b59cc5f..95e02549c2 100644
--- a/c/src/lib/libbsp/powerpc/psim/startup/linkcmds
+++ b/c/src/lib/libbsp/powerpc/psim/startup/linkcmds
@@ -108,6 +108,7 @@ SECTIONS
PROVIDE (_GOT2_START_ = .);
.got2 : { *(.got2) } >RAM
PROVIDE (__GOT2_END__ = .);
+ PROVIDE (_GOT2_END_ = .);
PROVIDE (__CTOR_LIST__ = .);
.ctors : { *(.ctors) } >RAM
@@ -122,7 +123,6 @@ SECTIONS
.fixup : { *(.fixup) } >RAM
PROVIDE (_FIXUP_END_ = .);
PROVIDE (__FIXUP_END__ = .);
- PROVIDE (_GOT2_END_ = .);
PROVIDE (__GOT_START__ = .);
PROVIDE (_GOT_START_ = .);