Prepare PRoot release v5.1.0.
Use "-sh" instead of "-" as the default command name, this is less confusing.
Load dynamic shared objects to their explicit base address if any.

Usually, dynamic shared objects are mapped to the beginning of the
virtual memory.  For example:

    $ readelf -aW /lib/ld-linux.so.2
    [...]
    Program Headers:
      Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
      LOAD           0x000000 0x00000000 0x00000000 0x1ec58 0x1ec58 R E 0x1000
      LOAD           0x01ec80 0x0001fc80 0x0001fc80 0x00bb8 0x00c78 RW  0x1000
    [...]

However, it appears that some versions of Fedora-20/i686 ship an ELF
interpreter with a non-null base address:

    $ readelf -aW /lib/ld-linux.so.2
    [...]
    Program Headers:
      Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
      LOAD           0x000000 0x43acf000 0x43acf000 0x1ec58 0x1ec58 R E 0x1000
      LOAD           0x01ec80 0x43aeec80 0x43aeec80 0x00bb8 0x00c78 RW  0x1000
    [...]

In such cases, PRoot should not add a base address to the load
address, otherwise this ELF interpreter might get mapped to an
unexpected location:

    proot info: translate("/" + "/lib/ld-linux.so.2")
    proot info:          -> "/usr/lib/ld-2.18.so"
    proot info: sysenter end: open(0xbfa63970, 0x0, 0x0, 0xbfa63a18, 0x0, 0x3) = 0xffffffda [0xbfa63970, 0]
    proot info: sysexit start: open(0xbfa63970, 0x0, 0x0, 0xbfa63a18, 0x0, 0x3) = 0x3 [0xbfa63970, 0]
    proot info: sysexit end: open(0xbfa63a7a, 0x0, 0x0, 0xbfa63a18, 0x0, 0x3) = 0x3 [0xbfa63984, 0]
    proot info: sysenter start: mmap2(0xf2acf000, 0x1f000, 0x5, 0x12, 0x3, 0x0) = 0xffffffda [0xbfa63978, 0]
    proot info: sysenter end: mmap2(0xf2acf000, 0x1f000, 0x5, 0x12, 0x3, 0x0) = 0xffffffda [0xbfa63978, 0]
    proot info: sysexit start: mmap2(0xf2acf000, 0x1f000, 0x5, 0x12, 0x3, 0x0) = 0xfffffff4 [0xbfa63978, 0]
    proot info: sysexit end: mmap2(0xf2acf000, 0x1f000, 0x5, 0x12, 0x3, 0x0) = 0xfffffff4 [0xbfa63978, 0]
    proot info: sysenter start: exit(0xb6, 0x1f000, 0xb6, 0xbfa63a20, 0x1, 0x3) = 0xffffffda [0xbfa63984, 0]
    proot info: sysenter end: exit(0xb6, 0x1f000, 0xb6, 0xbfa63a20, 0x1, 0x3) = 0xffffffda [0xbfa63984, 0]
    proot info: exited with status 182

I verified that the Linux kernel behaves the same:

        else if (loc->elf_ex.e_type == ET_DYN) {
    #ifdef CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE
            if (current->flags & PF_RANDOMIZE)
                load_bias = 0;
            else
                load_bias = ELF_PAGESTART(ELF_ET_DYN_BASE - vaddr);
    #else
            load_bias = ELF_PAGESTART(ELF_ET_DYN_BASE - vaddr);
    #endif
        }

Reported-by: Frank TEO <frank.teo@st.com>