Resource: Fix backward compatibility issue
authorSam Nelson <sam.nelson@ti.com>
Mon, 20 Aug 2018 20:06:32 +0000 (16:06 -0400)
committerSam Nelson <sam.nelson@ti.com>
Tue, 21 Aug 2018 04:13:16 +0000 (00:13 -0400)
Need to still handle case where no load segment is defined and the
.resource table need to be created a noninit section

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
packages/ti/ipc/remoteproc/Resource.xs

index f4c41220e04452d95fe454ca84358a6c79f0ad84..8037c54534c21ada16372880a468634a09f4626e 100644 (file)
@@ -57,11 +57,12 @@ function module$use()
             this.$logError("Resource.loadSegment not found", this);
         }
         addr = segment.base;
-        /* The .resource_table section should always be at the segment base */
-        Program.sectMap[".resource_table"] = new Program.SectionSpec();
-        Program.sectMap[".resource_table"].type = "NOINIT";
-        Program.sectMap[".resource_table"].loadAddress = addr;
     }
+
+    /* The .resource_table section should always be at the segment base */
+    Program.sectMap[".resource_table"] = new Program.SectionSpec();
+    Program.sectMap[".resource_table"].type = "NOINIT";
+    Program.sectMap[".resource_table"].loadAddress = addr;
 }
 
 function module$static$init(obj, params)