Fix the translation of symlink*: the last component shouldn't be dereferenced.

Change-Id: I5945ba4ab987b2849e9545337ff3386980e40b55
Reported-by: Christophe GUILLON <christophe.guillon@st.com>
Added support for architectures with no misalignment support.

The functions in mem.c to read from tracee and write to tracee
memory use word_t access size for copying memory buffers
through the ptrace interface.
This may cause misaligned accesses on architecture where
read/write of word_t size from a misaligned pointer is not
supported. This is the case on sh4 architecture.
The change uses memory accesor function supporting misaligned
access.
To be noted, the ptrace interface seems to allow misaligned
read/write to tracee process through PEEK/POKE, thus no change
was necessary there.

For instance in exit.c a call to copy_from_tracee() is done
for getting the result utsname buffer from the tracee into a
local utsname buffer. This buffer is a char-aligned structure
which may be not aligned on a word boundary.

Reproduce it on sh4 for instance with:
$ make CFLAGS=-O2 -C src
$ src/proot -k 2.6.18 / uname -m
$ dmesg | tail
Unaligned userspace access in "proot" pid=xxxx pc=xxxx ins=0x07ee

Change-Id: I9302781f1fd6bd5eaf13eca27aab3166acddea5f
Signed-off-by: Christophe Guillon <christophe.guillon@st.com>
Simplify unaligned memory load/store mechanism + s/unsigned char/uint8_t/.

The built-in memcpy() is inlined by the SH4 compiler.  This built-in
will detect dynamically and optimize aligned memory access in a futur
version (this year?).

Change-Id: I3ea23df8b09c3db3785f75a9b101094ad2b6ab24
Print "started" and "exited" status information for the sake of clarity.

Most users -- including myself -- aren't sure when PRoot has started
and/or has exited.  This is especially true since "/" is now the
default guest rootfs.
Stay in the current working directory if it is still accessible.

This simplifies the command-line interface:

    proot <...> ./configure

insted of:

    proot <...> -w . ./configure
Use the ELF interpreter as a loader when it's necessary only.

Now the ELF interpreter is ignored if the host one is compatible or if
there's no need for RPATH inhibition in mixed-mode.  Actually the
compatibility test is only "guest rootfs == host rootfs", it could be
refined later.
Fix a portability issue in the test-suite.

Change-Id: Ibfe8765096a2d77771a3cad61b542535cec036cd
Fix symbols resolution by moving LDFLAGS at the end of the linker command-line.

For instance, we can now use gcov:

    make -C src/ CFLAGS='-fprofile-arcs -ftest-coverage' LDFLAGS=-lgcov

Change-Id: Ib5ee1250116e00489208cca69b7bf72bf6434998
Fix the translation of link*: the last components shouldn't be dereferenced.

Change-Id: I7edc77bbbd835b68bcdbfb15ce5a3ec1432e407c
Emulate syscalls available in the kernel specified by -k, if necessary.

PRoot can now emulate some of the syscalls that are available in the
kernel release specified by -k but that are missing in the host
kernel.  This allows the execution of guest programs expecting a
kernel newer than the actual one, if you encountered the famous
"FATAL: kernel too old" or "qemu: Unsupported syscall" messages.

Change-Id: Id955838ca4c6bf931736b5a8a91f2fae39278c9c
Prepare release v2.1.

Change-Id: If61ebaeb9f877c1973de88013813380d0beb40ba