romfile_loader: utility to patch in-memory ROM files

Add ability for a ROM file to point to
it's image in memory. When file is in memory,
add utility that can patch it, storing
pointers to one file within another file.

This is not a lot of code: together with the follow-up patch to load
ACPI tables from ROM, it's about 1K extra.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
diff --git a/Makefile b/Makefile
index 8ee6ed4..855fdf4 100644
--- a/Makefile
+++ b/Makefile
@@ -41,7 +41,7 @@
     hw/ahci.c hw/usb-hub.c \
     fw/coreboot.c fw/lzmadecode.c fw/csm.c fw/biostables.c \
     fw/paravirt.c fw/shadow.c fw/pciinit.c fw/smm.c fw/mtrr.c fw/xen.c \
-    fw/acpi.c fw/mptable.c fw/pirtable.c fw/smbios.c
+    fw/acpi.c fw/mptable.c fw/pirtable.c fw/smbios.c fw/romfile_loader.c
 SRC32SEG=string.c output.c pcibios.c apm.c stacks.c hw/pci.c
 DIRS=src src/hw src/fw vgasrc