• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

proot-me / PRoot / 176
77%
master: 0%

Build:
Build:
LAST BUILD BRANCH: travis
DEFAULT BRANCH: master
Ran 12 Dec 2014 02:00PM UTC
Jobs 1
Files 91
Run time 41s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
176

push

travis-ci

cedric-vincent
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>

2974 of 3908 relevant lines covered (76.1%)

88224.74 hits per line

Jobs
ID Job ID Ran Files Coverage
1 176.1 12 Dec 2014 02:00PM UTC 0
76.1
Travis Job 176.1
Source Files on build 176
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #176
  • d8cc2c43 on github
  • Prev Build on next (#175)
  • Next Build on next (#177)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc