aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
authorTony Puccinelli2010-07-03 03:46:21 +0000
committerTony Puccinelli2010-07-03 03:46:21 +0000
commit13948b8118b3a494cbd8f81a5bb9e9ca55a4c5f8 (patch)
treefe8ec8975d1ca820122b03c9939f3d1825d3fad3 /backends/platform
parent3c6ef6424303fc03632220d6299e046a8eb455ca (diff)
downloadscummvm-rg350-13948b8118b3a494cbd8f81a5bb9e9ca55a4c5f8.tar.gz
scummvm-rg350-13948b8118b3a494cbd8f81a5bb9e9ca55a4c5f8.tar.bz2
scummvm-rg350-13948b8118b3a494cbd8f81a5bb9e9ca55a4c5f8.zip
modified default ds linker script for linking of engine plugins
svn-id: r50612
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/ds/plugin.ld38
1 files changed, 12 insertions, 26 deletions
diff --git a/backends/platform/ds/plugin.ld b/backends/platform/ds/plugin.ld
index dcb6a0ca3f..65ba0496c7 100644
--- a/backends/platform/ds/plugin.ld
+++ b/backends/platform/ds/plugin.ld
@@ -1,14 +1,15 @@
-/* Script for -z combreloc: combine and sort reloc sections */
-OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
- "elf32-littlearm")
+OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
OUTPUT_ARCH(arm)
-ENTRY(_start)
-SEARCH_DIR("/opt/devkitpro/devkitARM/arm-eabi/lib");
+/* PHDRS specifies ELF Program Headers (or segments) to the plugin linker */
+PHDRS {
+ plugin PT_LOAD ; /* Specifies that the plugin segment should be loaded from file */
+}
SECTIONS
{
/* Read-only sections, merged into text segment: */
- PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x8000)); . = SEGMENT_START("text-segment", 0x8000);
- .interp : { *(.interp) }
+ . = 0;
+ .interp : { *(.interp) } : plugin /*The ": plugin" tells the linker to assign this and
+ the following sections to the "plugin" segment*/
.note.gnu.build-id : { *(.note.gnu.build-id) }
.hash : { *(.hash) }
.gnu.hash : { *(.gnu.hash) }
@@ -125,32 +126,17 @@ SECTIONS
}
.ctors :
{
- /* gcc uses crtbegin.o to find the start of
- the constructors, so we make sure it is
- first. Because this is a wildcard, it
- doesn't matter if the user does not
- actually link against crtbegin.o; the
- linker won't look for a file to match a
- wildcard. The wildcard also means that it
- doesn't matter which directory crtbegin.o
- is in. */
- KEEP (*crtbegin.o(.ctors))
- KEEP (*crtbegin?.o(.ctors))
- /* We don't want to include the .ctor section from
- the crtend.o file until after the sorted ctors.
- The .ctor section from the crtend file contains the
- end of ctors marker and it must be last */
- KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
+ ___plugin_ctors = .;
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
+ ___plugin_ctors_end = .;
}
.dtors :
{
- KEEP (*crtbegin.o(.dtors))
- KEEP (*crtbegin?.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
+ ___plugin_dtors = .;
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
+ ___plugin_dtors_end = .;
}
.jcr : { KEEP (*(.jcr)) }
.data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }