diff --git a/tools/binman/elf.py b/tools/binman/elf.py
index 6d440dd..fec2116 100644
--- a/tools/binman/elf.py
+++ b/tools/binman/elf.py
@@ -188,6 +188,28 @@
         return None
     return sym.address
 
+def GetPackString(sym, msg):
+    """Get the struct.pack/unpack string to use with a given symbol
+
+    Args:
+        sym (Symbol): Symbol to check. Only the size member is checked
+        @msg (str): String which indicates the entry being processed, used for
+            errors
+
+    Returns:
+        str: struct string to use, .e.g. '<I'
+
+    Raises:
+        ValueError: Symbol has an unexpected size
+    """
+    if sym.size == 4:
+        return '<I'
+    elif sym.size == 8:
+        return '<Q'
+    else:
+        raise ValueError('%s has size %d: only 4 and 8 are supported' %
+                         (msg, sym.size))
+
 def LookupAndWriteSymbols(elf_fname, entry, section):
     """Replace all symbols in an entry with their correct values
 
@@ -218,14 +240,7 @@
                 raise ValueError('%s has offset %x (size %x) but the contents '
                                  'size is %x' % (entry.GetPath(), offset,
                                                  sym.size, entry.contents_size))
-            if sym.size == 4:
-                pack_string = '<I'
-            elif sym.size == 8:
-                pack_string = '<Q'
-            else:
-                raise ValueError('%s has size %d: only 4 and 8 are supported' %
-                                 (msg, sym.size))
-
+            pack_string = GetPackString(sym, msg)
             if name == '_binman_sym_magic':
                 value = BINMAN_SYM_MAGIC_VALUE
             else:
@@ -241,6 +256,28 @@
             entry.data = (entry.data[:offset] + value_bytes +
                         entry.data[offset + sym.size:])
 
+def GetSymbolValue(sym, data, msg):
+    """Get the value of a symbol
+
+    This can only be used on symbols with an integer value.
+
+    Args:
+        sym (Symbol): Symbol to check
+        data (butes): Data for the ELF file - the symbol data appears at offset
+            sym.offset
+        @msg (str): String which indicates the entry being processed, used for
+            errors
+
+    Returns:
+        int: Value of the symbol
+
+    Raises:
+        ValueError: Symbol has an unexpected size
+    """
+    pack_string = GetPackString(sym, msg)
+    value = struct.unpack(pack_string, data[sym.offset:sym.offset + sym.size])
+    return value[0]
+
 def MakeElf(elf_fname, text, data):
     """Make an elf file with the given data in a single section
 
