diff options
author | Jens Arnold <amiconn@rockbox.org> | 2005-06-29 21:04:22 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2005-06-29 21:04:22 +0000 |
commit | 305a7ce1a29b35a463a5ea79e8089b362f9810da (patch) | |
tree | 17e03cdf1fa32370cb0f592afc716bde45935939 /apps/plugins/plugin.lds | |
parent | 84d6f9e89bf1bae7e3669e487541f91f27a86b0a (diff) | |
download | rockbox-305a7ce1a29b35a463a5ea79e8089b362f9810da.tar.gz rockbox-305a7ce1a29b35a463a5ea79e8089b362f9810da.zip |
Enabled sectioned compilation for the plugin library, and linking with garbage collection for the plugins. The effect is that functions and data objects from one object file in the plugin library are included in the .elf individually, not as a whole. It makes maintaining larger plugin library packages easier, as it is no longer necessary to split the source files by function to avoid dead code to get included in the plugins.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6931 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/plugin.lds')
-rw-r--r-- | apps/plugins/plugin.lds | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/apps/plugins/plugin.lds b/apps/plugins/plugin.lds index 42f56e58bf..bf1057e332 100644 --- a/apps/plugins/plugin.lds +++ b/apps/plugins/plugin.lds | |||
@@ -51,12 +51,12 @@ MEMORY | |||
51 | SECTIONS | 51 | SECTIONS |
52 | { | 52 | { |
53 | .text : { | 53 | .text : { |
54 | *(.entry) | 54 | KEEP(*(.entry)) |
55 | *(.text) | 55 | *(.text*) |
56 | } > PLUGIN_RAM | 56 | } > PLUGIN_RAM |
57 | 57 | ||
58 | .data : { | 58 | .data : { |
59 | *(.data) | 59 | *(.data*) |
60 | } > PLUGIN_RAM | 60 | } > PLUGIN_RAM |
61 | 61 | ||
62 | /DISCARD/ : { | 62 | /DISCARD/ : { |
@@ -64,13 +64,11 @@ SECTIONS | |||
64 | } | 64 | } |
65 | 65 | ||
66 | .bss : { | 66 | .bss : { |
67 | *(.bss) | 67 | *(.bss*) |
68 | } > PLUGIN_RAM | 68 | } > PLUGIN_RAM |
69 | 69 | ||
70 | .rodata : { | 70 | .rodata : { |
71 | *(.rodata) | 71 | *(.rodata*) |
72 | *(.rodata.str1.1) | ||
73 | *(.rodata.str1.4) | ||
74 | . = ALIGN(0x4); | 72 | . = ALIGN(0x4); |
75 | #ifdef ARCH_IRIVER | 73 | #ifdef ARCH_IRIVER |
76 | iramcopy = .; | 74 | iramcopy = .; |
@@ -86,4 +84,9 @@ SECTIONS | |||
86 | iramend = .; | 84 | iramend = .; |
87 | } > PLUGIN_IRAM | 85 | } > PLUGIN_IRAM |
88 | #endif | 86 | #endif |
87 | /* Special trick to avoid a linker error when no other sections are | ||
88 | left after garbage collection (plugin not for this platform) */ | ||
89 | .comment 0 : { | ||
90 | KEEP(*(.comment)) | ||
91 | } | ||
89 | } | 92 | } |