Can now rewrite shared libraries and static binaries on FreeBSD. All
authorDan McNulty <mcnulty@cs.wisc.edu>
Wed, 21 Apr 2010 19:24:12 +0000 (14:24 -0500)
committerDan McNulty <mcnulty@cs.wisc.edu>
Wed, 21 Apr 2010 19:24:12 +0000 (14:24 -0500)
commit26947f8dce9d1c0f27bab36974880da6da9c6a71
tree08e49cf333eeff578d6810aab27d0187a3e5c2da
parentf0bcbd5916dd6121ecf56f1544edb8760ecfd1a9
Can now rewrite shared libraries and static binaries on FreeBSD. All
rewriter tests pass except test5_6 on static binaries. The initial commit
of static binary support for the testsuite explains why this test is
failing.
==========================================================================
-- build system --
* renamed files in Makefiles

-- testsuite --
* added some support for FreeBSD to a few tests

-- common --
* Modified addrtranslate-static.C to work in common -- this is
  just used as a stub until process control is ported to FreeBSD

-- dyninstAPI_RT --
* Renamed some files because they are no longer specific to Linux

-- dyninstAPI --
* Added support for rewriting static binaries -- needed the special
  cases

-- symtabAPI --
* added FreeBSD to a bunch of ifdefs
* emitElf
  -- can now add a TLS program segment if it already doesn't exist
     when rewriting static binaries
  -- library_adjust approach to rewriting shared libraries now works.
     Required a few small fixes.
  -- when rewriting static binaries on FreeBSD, need to update a few
     variables that point to the heap -- uses the variables symbols
     to find their location in the data section.
29 files changed:
common/i386-unknown-freebsd8.0/Makefile
common/src/addrtranslate-static.C
dyninstAPI/src/freebsd-x86.C
dyninstAPI/src/freebsd.C
dyninstAPI_RT/i386-unknown-freebsd8.0/Makefile
dyninstAPI_RT/i386-unknown-linux2.4/Makefile
dyninstAPI_RT/src/RTcommon.c
dyninstAPI_RT/src/RTstatic_ctors_dtors-x86.c [moved from dyninstAPI_RT/src/RTstatic_ctors_dtors-linux-x86.c with 100% similarity]
dyninstAPI_RT/src/RTtlsgetaddr-x86.S [moved from dyninstAPI_RT/src/RTtlsgetaddr-linux-x86.S with 100% similarity]
dyninstAPI_RT/src/RTtlsgetaddr-x86_64.S [moved from dyninstAPI_RT/src/RTtlsgetaddr-linux-x86_64.S with 100% similarity]
dyninstAPI_RT/x86_64-unknown-linux2.4/Makefile
symtabAPI/i386-unknown-freebsd8.0/Makefile
symtabAPI/i386-unknown-linux2.4/Makefile
symtabAPI/src/Object-elf.C
symtabAPI/src/Symtab.C
symtabAPI/src/emitElf.C
symtabAPI/src/emitElf.h
symtabAPI/src/emitElfStatic-x86.C [moved from symtabAPI/src/emitElfStatic-linux-x86.C with 99% similarity]
symtabAPI/src/relocationEntry-elf-x86.C
symtabAPI/x86_64-unknown-linux2.4/Makefile
testsuite/i386-unknown-freebsd8.0/make.mutators.gen
testsuite/i386-unknown-freebsd8.0/make.solo_mutatee.gen
testsuite/i386-unknown-freebsd8.0/test_info_new.gen.C
testsuite/i386-unknown-freebsd8.0/tuples
testsuite/ppc64_linux/test_info_new.gen.C
testsuite/src/dyninst/test1_22.C
testsuite/src/dyninst/test1_22_mutatee.c
testsuite/src/instruction/test_instruction_profile.C
testsuite/src/specification/spec-grouped.pl