binman: Allow symbols to be resolved inside sections

At present we only support symbols inside binaries which are at the top
level of an image. This restrictions seems unreasonable since more complex
images may want to group binaries within different sections.

Relax the restriction, adding a new _SetupTplElf() helper function.

Also fix a typo in the comment for testTpl().

Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/binman/test/149_symbols_tpl.dts b/tools/binman/test/149_symbols_tpl.dts
new file mode 100644
index 0000000..087e10f
--- /dev/null
+++ b/tools/binman/test/149_symbols_tpl.dts
@@ -0,0 +1,28 @@
+/dts-v1/;
+
+/ {
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	binman {
+		pad-byte = <0xff>;
+		u-boot-spl {
+			offset = <4>;
+		};
+
+		u-boot-spl2 {
+			offset = <0x18>;
+			type = "u-boot-spl";
+		};
+
+		u-boot {
+			offset = <0x30>;
+		};
+
+		section {
+			u-boot-tpl {
+				type = "u-boot-tpl";
+			};
+		};
+	};
+};