diff --git a/libElfDep/test/.gitignore b/libElfDep/test/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..6855a42d7a3b1ed434cd9b9a8b83ee5b74e3a04f
--- /dev/null
+++ b/libElfDep/test/.gitignore
@@ -0,0 +1,9 @@
+edt.exe
+edt.o
+edt.out
+edt_driver.o
+elf_dep_test.os
+libelf_dep_test.so
+peasoup_executable_directory.*
+tmp.out
+
diff --git a/libElfDep/test/SConscript b/libElfDep/test/SConscript
new file mode 100644
index 0000000000000000000000000000000000000000..46b24492b5cfd7c8c81a978d5452a73998253918
--- /dev/null
+++ b/libElfDep/test/SConscript
@@ -0,0 +1,43 @@
+import os
+
+
+
+Import('env')
+
+# import and create a copy of the environment so we don't screw up anyone elses env.
+myenv=env.Clone()
+myenv.Replace(SECURITY_TRANSFORMS_HOME=os.environ['SECURITY_TRANSFORMS_HOME'])
+myenv.Replace(ZIPR_HOME=os.environ['ZIPR_HOME'])
+myenv.Replace(ZIPR_SDK=os.environ['ZIPR_SDK'])
+myenv.Replace(ZIPR_INSTALL=os.environ['ZIPR_INSTALL'])
+myenv.Append(CXXFLAGS = " -std=c++11 -Wall ")
+
+cpppath=''' 
+	 $SECURITY_TRANSFORMS_HOME/include 
+	 $SECURITY_TRANSFORMS_HOME/libIRDB/include 
+	 $SECURITY_TRANSFORMS_HOME/libMEDSannotation/include 
+	 $SECURITY_TRANSFORMS_HOME/beaengine/include 
+	 $SECURITY_TRANSFORMS_HOME/libtransform/include
+	 $SECURITY_TRANSFORMS_HOME/libStructDiv/include
+	 $SECURITY_TRANSFORMS_HOME/libEXEIO/include
+	 $SECURITY_TRANSFORMS_HOME/libElfDep/include
+	 $SMPSA_HOME/include
+	 $ZIPR_HOME/include
+	 $ZIPR_SDK/include
+	'''
+
+
+files=Glob( Dir('.').srcnode().abspath+"/edt*.cpp")
+
+pgm="edt.exe"
+
+LIBPATH="$SECURITY_TRANSFORMS_HOME/lib"
+LIBS=Split("stars "+ myenv.subst('$BASE_IRDB_LIBS')+ " IRDB-core pqxx BeaEngine_s_d transform MEDSannotation EXEIO pebliss ElfDep") 
+myenv=myenv.Clone(CPPPATH=Split(cpppath))
+pgm=myenv.Program(pgm,  files,  LIBPATH=LIBPATH, LIBS=LIBS)
+install=myenv.Install("$SECURITY_TRANSFORMS_HOME/plugins_install/", pgm)
+Default(install)
+
+files=Glob( Dir('.').srcnode().abspath+"/elf_dep_test*.cpp")
+sharedLib=myenv.SharedLibrary("elf_dep_test",  files,  LIBPATH=LIBPATH, LIBS=LIBS)
+Default(sharedLib)
diff --git a/libElfDep/test/SConstruct b/libElfDep/test/SConstruct
new file mode 100644
index 0000000000000000000000000000000000000000..7fe41a3bcc605387c2eaafceaa7e944ab0d252fb
--- /dev/null
+++ b/libElfDep/test/SConstruct
@@ -0,0 +1,15 @@
+import os
+
+
+env=Environment()
+Export('env')
+lib=SConscript("SConscript")
+
+
+pedi = Command( target = "./testoutput",
+                source = "./SConscript",
+                action = "cd "+os.environ['SECURITY_TRANSFORMS_HOME']+" ; " + os.environ['PEDI_HOME']+"/pedi -m manifest.txt ; cd - " )
+
+Depends(pedi,lib);
+Default(pedi)
+
diff --git a/libElfDep/test/edt.cpp b/libElfDep/test/edt.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..dce737d0c65de94e62c123fc1cf025109803566a
--- /dev/null
+++ b/libElfDep/test/edt.cpp
@@ -0,0 +1,63 @@
+
+#include "edt.hpp"
+#include <libElfDep.hpp>
+#include "Rewrite_Utility.hpp"
+#include <algorithm> 
+
+using namespace libTransform;
+using namespace libIRDB;
+using namespace std;
+using namespace IRDBUtility;
+using namespace ElfDep_Tester;
+
+
+ElfDep_Tester_t::ElfDep_Tester_t(FileIR_t* firp)
+	: Transform (NULL, firp, NULL)
+{
+}
+
+
+#define ALLOF(a) begin(a),end(a)
+
+	
+int ElfDep_Tester_t::execute()
+{
+	// insert the PLT and GOT entries needed
+	auto ed=ElfDependencies_t(getFileIR());
+	(void)ed.appendLibraryDepedencies("libelf_dep_test.so");
+	auto edpcb=ed.appendPltEntry("elf_dep_test_callback");
+	auto edvar=ed.appendGotEntry("elf_dep_test_var");
+	auto edvar_scoop=edvar.first;
+	auto edvar_offset=edvar.second;
+
+
+	// find the insertion point.
+	const auto &all_funcs=getFileIR()->GetFunctions();
+	const auto main_func_it=find_if(ALLOF(all_funcs), [&](const Function_t* f) { return f->GetName()=="main";});
+	assert(main_func_it!=all_funcs.end());		
+	const auto main_func=*main_func_it;
+	auto insert_loc=main_func->GetEntryPoint();
+
+
+	// insert the instrumentation
+	auto tmp=(Instruction_t*)NULL;
+	auto old_entry=insertAssemblyBefore(getFileIR(), insert_loc," call 0 ", edpcb) ;
+	(void)old_entry; // avoid warning, but label the return value from insertAssemblyBefore
+	tmp=insert_loc;
+	tmp=insertAssemblyAfter(getFileIR(), tmp," mov rcx, [rel 0x0]");
+	auto got_insn=tmp;
+	tmp=insertAssemblyAfter(getFileIR(), tmp," inc [rcx]");
+	tmp=insertAssemblyAfter(getFileIR(), tmp," call 0", edpcb);
+
+
+	// map the load to point at the GOT entry.
+	auto got_reloc=new Relocation_t(BaseObj_t::NOT_IN_DATABASE, edvar_offset, "pcrel", edvar_scoop);
+	getFileIR()->GetRelocations().insert(got_reloc);
+	got_insn->GetRelocations().insert(got_reloc);
+
+
+	return 0;
+}
+	
+
+
diff --git a/libElfDep/test/edt.hpp b/libElfDep/test/edt.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..32ec207792084e2f003dbaa7c3b60e39b580bac0
--- /dev/null
+++ b/libElfDep/test/edt.hpp
@@ -0,0 +1,27 @@
+
+#include <string>
+#include <set>
+#include <libIRDB-core.hpp>
+#include <transform.hpp>
+
+namespace ElfDep_Tester
+{
+
+using namespace libTransform;
+using namespace libIRDB;
+using namespace std;
+
+
+typedef set<string> StringSet_t;
+class ElfDep_Tester_t : libTransform::Transform
+{
+	public:
+	ElfDep_Tester_t(FileIR_t* firp);
+	
+	int execute(); 
+
+	private:
+	
+};
+
+}
diff --git a/libElfDep/test/edt_driver.cpp b/libElfDep/test/edt_driver.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..6a9133c25be700afda2208e45fcdf23139f59d7e
--- /dev/null
+++ b/libElfDep/test/edt_driver.cpp
@@ -0,0 +1,136 @@
+#include <stdlib.h>
+#include <fstream>
+#include <string>
+#include "edt.hpp"
+#include <libIRDB-core.hpp>
+#include <getopt.h>
+
+using namespace std;
+using namespace libIRDB;
+using namespace ElfDep_Tester;
+
+void usage(string programName)
+{
+	cerr << "Usage: " << programName << " <variant id> " 	<<endl;
+	cout<<"--help,--usage,-?,-h		Display this message"<<endl;
+}
+
+int main(int argc, char **argv)
+{	
+	string programName(argv[0]);
+	char *strtolError = NULL;
+	int transformExitCode = 0;
+	int variantID = -1; 
+	VariantID_t *pidp = NULL;
+	pqxxDB_t pqxx_interface;
+	int exit_code=0;
+
+	/*
+	 * Check that we've been called correctly:
+	 * <program> <variant id> <annotation file>
+	 */
+	if(argc < 2)
+	{
+		usage(programName);
+		exit(1);
+	}
+	variantID = strtol(argv[1], &strtolError, 10);
+	if (*strtolError != '\0')
+	{
+		cerr << "Invalid variantID: " << argv[1] << endl;
+		exit(1);
+	}
+
+	// Parse some options for the transform
+	const static struct option long_options[] = {
+		{"help", no_argument, 0, 'h'},
+		{"usage", no_argument, 0, '?'},
+		{0,0,0,0}
+	};
+	auto short_opts="h?";
+
+	while(1) {
+		int index = 0;
+		int c = getopt_long(argc, argv,short_opts, long_options, &index);
+		if(c == -1)
+			break;
+		switch(c) {
+			case 0:
+				break;
+			case '?':
+			case 'h':
+				usage(argv[0]);
+				exit(1);
+				break;
+			default:
+				break;
+		}
+	}
+
+
+	/* setup the interface to the sql server */
+	BaseObj_t::SetInterface(&pqxx_interface);
+
+	pidp=new VariantID_t(variantID);
+	assert(pidp && pidp->IsRegistered()==true);
+
+	for(set<File_t*>::iterator it=pidp->GetFiles().begin();
+	    it!=pidp->GetFiles().end();
+		++it)
+	{
+		try 
+		{
+			/* read the IR from the DB */
+			File_t* this_file = *it;
+			FileIR_t *firp = new FileIR_t(*pidp, this_file);
+			cout<<"Transforming "<<this_file->GetURL()<<endl;
+			assert(firp && pidp);
+
+
+			/*
+			 * Create a transformation and then
+			 * invoke its execution.
+			 */
+				auto ed=ElfDep_Tester_t(firp);
+				transformExitCode = ed.execute();
+			/*
+			 * If everything about the transformation
+			 * went okay, then we will write the updated
+			 * set of instructions to the database.
+			 */
+			if (transformExitCode == 0)
+			{
+				if(getenv("MG_NOUPDATE")==NULL)
+				{
+					firp->WriteToDB();
+				}
+				delete firp;
+			}
+			else
+			{
+				cerr << programName << ": transform failed. Check logs." << endl;
+				exit_code=2;
+			}
+		}
+		catch (DatabaseError_t pnide)
+		{
+			cerr << programName << ": Unexpected database error: " << pnide << endl;
+			exit(1);
+		}
+		catch (const std::exception &exc)
+		{
+		    // catch anything thrown within try block that derives from std::exception
+			std::cerr << "Unexpected exception: " << exc.what();
+			exit(1);
+		}
+		catch (...)
+		{
+			cerr << programName << ": Unexpected error" << endl;
+			exit(1);
+		}
+	}
+	pqxx_interface.Commit();
+	delete pidp;
+
+	return exit_code;
+}
diff --git a/libElfDep/test/elf_dep_test.cpp b/libElfDep/test/elf_dep_test.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..fef1a6cd0549124216bc925993b29f9442513f4e
--- /dev/null
+++ b/libElfDep/test/elf_dep_test.cpp
@@ -0,0 +1,10 @@
+
+#include <stdio.h>
+
+int elf_dep_test_var=0;
+
+void elf_dep_test_callback()
+{
+	printf("Elf_dep_test var = %d\n", elf_dep_test_var);
+}
+
diff --git a/libElfDep/test/testit.sh b/libElfDep/test/testit.sh
new file mode 100755
index 0000000000000000000000000000000000000000..c8f526e49f3fe9c74df8a8d02ef4edd4246cf101
--- /dev/null
+++ b/libElfDep/test/testit.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+cleanup()
+{
+	echo test failed.
+	exit 1
+}
+	
+# make sure xforms are built
+scons || cleanup
+
+$PSZ /bin/ls ./xxx -c move_globals=on -o move_globals:--elftables -c edt=on || cleanup
+ 
+/bin/ls /tmp |tee tmp.out || cleanup
+./xxx /tmp |tee edt.out || cleanup
+
+echo test passed.