binman: Add a new 'image-pos' property
[oweals/u-boot.git] / tools / binman / etype / section.py
index 1d27301ae9238831bc92cad6720b96f9f5b08467..b90b80e4ce75b3bb1e3c294fcc22af7e3e549322 100644 (file)
@@ -46,6 +46,10 @@ class Entry_section(Entry):
         self.size = self._section.GetSize()
         return super(Entry_section, self).Pack(offset)
 
+    def SetImagePos(self, image_pos):
+        Entry.SetImagePos(self, image_pos)
+        self._section.SetImagePos(image_pos + self.offset)
+
     def WriteSymbols(self, section):
         """Write symbol values into binary files for access at run time"""
         self._section.WriteSymbols()