summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-03-24 15:27:42 -0700
committerKeith Packard <keithp@keithp.com>2013-03-24 15:27:42 -0700
commit32654ffde488570abbb4db53cc93251c35df7ea9 (patch)
treefc060bbafd1011f113d6a8d81294cc8adeff532b
parent72a1110b6d0571d43ddba437683f66f6d54bfda8 (diff)
altos/stm: Add comments to the .ld files explaining how the romconfig stuff works
Would be nice to be able to explicitly define addresses for the romconfig variables, but I can't figure out how to make that work. Instead, just explicitly load the files in teh right order to make things land in the right places. Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--src/stm/altos-application.ld12
-rw-r--r--src/stm/altos-loader.ld11
2 files changed, 21 insertions, 2 deletions
diff --git a/src/stm/altos-application.ld b/src/stm/altos-application.ld
index 5bdfcd05..c94c06b8 100644
--- a/src/stm/altos-application.ld
+++ b/src/stm/altos-application.ld
@@ -35,9 +35,19 @@ SECTIONS {
. = ORIGIN(rom) + 0x100;
+
+ /* Ick. What I want is to specify the
+ * addresses of some global constants so
+ * that I can find them across versions
+ * of the application. I can't figure out
+ * how to make gnu ld do that, so instead
+ * we just load the two files that include
+ * these defines in the right order here and
+ * expect things to 'just work'. Don't change
+ * the contents of those files, ok?
+ */
ao_romconfig.o(.romconfig*)
ao_product.o(.romconfig*)
-
*(.text*) /* Executable code */
*(.rodata*) /* Constants */
diff --git a/src/stm/altos-loader.ld b/src/stm/altos-loader.ld
index 7184b96c..14b45351 100644
--- a/src/stm/altos-loader.ld
+++ b/src/stm/altos-loader.ld
@@ -35,9 +35,18 @@ SECTIONS {
. = ORIGIN(rom) + 0x100;
+ /* Ick. What I want is to specify the
+ * addresses of some global constants so
+ * that I can find them across versions
+ * of the application. I can't figure out
+ * how to make gnu ld do that, so instead
+ * we just load the two files that include
+ * these defines in the right order here and
+ * expect things to 'just work'. Don't change
+ * the contents of those files, ok?
+ */
ao_romconfig.o(.romconfig*)
ao_product.o(.romconfig*)
-
*(.text) /* Executable code */
*(.rodata) /* Constants */