Link standalone programs at 0x80010000.
authorTim Newsome <tim@sifive.com>
Sun, 22 May 2016 04:22:22 +0000 (21:22 -0700)
committerTim Newsome <tim@sifive.com>
Mon, 23 May 2016 19:12:13 +0000 (12:12 -0700)
This leaves some memory for pk, where it keeps tohost/fromhost which we
cannot just write to.

tests/gdbserver.py
tests/standalone.lds

index 0cdd060ce299fde25319ce63c8cc6296ebd13a94..7edae58406cd9c224b23910e5c6fec9ca3b4d9ff 100755 (executable)
@@ -166,8 +166,8 @@ class DownloadTest(unittest.TestCase):
         fd.write("uint32_t length = %d;\n" % length)
         fd.write("uint8_t d[%d] = {\n" % length)
         self.crc = 0
-        for _ in range(length / 16):
-            fd.write("  ");
+        for i in range(length / 16):
+            fd.write("  /* 0x%04x */ " % (i * 16));
             for _ in range(16):
                 value = random.randrange(1<<8)
                 fd.write("%d, " % value)
index 9b1bab1f6ee9268e46ce74c7f3543763bc951cc4..330fa16bfe7ef32de64c68b2d7bc31bd8e3f47ac 100644 (file)
@@ -10,7 +10,9 @@ SECTIONS
   /*--------------------------------------------------------------------*/
 
   /* Begining of code and text segment */
-  . = 0x80000000;
+  /* Leave some space for pk's data structures, which includes tohost/fromhost
+   * which are special addresses we ought to leave alone.  */
+  . = 0x80010000;
   _ftext = .;
   PROVIDE( eprol = . );