Add test for patching a system call instruction

This tests patching a specific, fixed instruction sequence, whereas
the existing tests just test whatever is in the version of glibc on
the system.

Change library.cc to make the patching code easier to test: Split out
a patchSystemCallsInRange() method, since the existing methods assume
they are operating on a whole dynamically-loaded ELF object.  Change
maps_ to be per-instance so that creating Library objects with
different Maps objects works.

This doesn't try to cover the various corner cases in library.cc yet.

BUG=http://code.google.com/p/seccompsandbox/issues/detail?id=17
TEST=test_patching_syscall

Review URL: http://codereview.chromium.org/8596009

git-svn-id: http://seccompsandbox.googlecode.com/svn/trunk@177 55e79e8e-603c-11de-8c10-5fe6993ea61f
7 files changed