prelink test

来源:互联网 发布:淄博seo推广优化 编辑:程序博客网 时间:2024/05/20 01:08

Test On x86 host

1.install prelink

user@vm-ubt:~$ sudo apt-get install prelink

[sudo] password for elvon: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  execstack
The following NEW packages will be installed:
  execstack prelink
0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.
Need to get 1,021 kB of archives.
After this operation, 2,189 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://cn.archive.ubuntu.com/ubuntu/ utopic/main execstack amd64 0.0.20130503-1 [71.5 kB]
Get:2 http://cn.archive.ubuntu.com/ubuntu/ utopic/universe prelink amd64 0.0.20130503-1 [950 kB]
Fetched 1,021 kB in 1s (523 kB/s)
Selecting previously unselected package execstack.
(Reading database ... 270680 files and directories currently installed.)
Preparing to unpack .../execstack_0.0.20130503-1_amd64.deb ...
Unpacking execstack (0.0.20130503-1) ...
Selecting previously unselected package prelink.
Preparing to unpack .../prelink_0.0.20130503-1_amd64.deb ...
Unpacking prelink (0.0.20130503-1) ...
Processing triggers for man-db (2.7.0.2-2) ...
Setting up execstack (0.0.20130503-1) ...

Setting up prelink (0.0.20130503-1) ...

2. Maps before prelink

 elvon@vm-ubt:~/repo_test/prelink_test/test_prog/host_elf$ ps
  PID TTY          TIME CMD
 5477 pts/11   00:00:02 bash
 6516 pts/11   00:00:00 tstProg
 6517 pts/11   00:00:00 tstProg
 6518 pts/11   00:00:00 ps
elvon@vm-ubt:~/repo_test/prelink_test/test_prog/host_elf$ cat /proc/6516/maps
00400000-00401000 r-xp 00000000 08:11 2025457                            /0101/repo_test/prelink_test/test_prog/host_elf/tstProg
00600000-00601000 r--p 00000000 08:11 2025457                            /0101/repo_test/prelink_test/test_prog/host_elf/tstProg
00601000-00602000 rw-p 00001000 08:11 2025457                            /0101/repo_test/prelink_test/test_prog/host_elf/tstProg
7f9582030000-7f95821ea000 r-xp 00000000 fc:00 810003                     /lib/x86_64-linux-gnu/libc-2.19.so
7f95821ea000-7f95823e9000 ---p 001ba000 fc:00 810003                     /lib/x86_64-linux-gnu/libc-2.19.so
7f95823e9000-7f95823ed000 r--p 001b9000 fc:00 810003                     /lib/x86_64-linux-gnu/libc-2.19.so
7f95823ed000-7f95823ef000 rw-p 001bd000 fc:00 810003                     /lib/x86_64-linux-gnu/libc-2.19.so
7f95823ef000-7f95823f4000 rw-p 00000000 00:00 0 
7f95823f4000-7f95823f5000 r-xp 00000000 fc:00 315421                     /usr/lib/libmyutlt.so
7f95823f5000-7f95825f4000 ---p 00001000 fc:00 315421                     /usr/lib/libmyutlt.so
7f95825f4000-7f95825f5000 r--p 00000000 fc:00 315421                     /usr/lib/libmyutlt.so
7f95825f5000-7f95825f6000 rw-p 00001000 fc:00 315421                     /usr/lib/libmyutlt.so
7f95825f6000-7f9582619000 r-xp 00000000 fc:00 809998                     /lib/x86_64-linux-gnu/ld-2.19.so
7f95827ef000-7f95827f2000 rw-p 00000000 00:00 0 
7f9582815000-7f9582818000 rw-p 00000000 00:00 0 
7f9582818000-7f9582819000 r--p 00022000 fc:00 809998                     /lib/x86_64-linux-gnu/ld-2.19.so
7f9582819000-7f958281a000 rw-p 00023000 fc:00 809998                     /lib/x86_64-linux-gnu/ld-2.19.so
7f958281a000-7f958281b000 rw-p 00000000 00:00 0 
7fffceae9000-7fffceb0a000 rw-p 00000000 00:00 0                          [stack]
7fffcebfc000-7fffcebfe000 r-xp 00000000 00:00 0                          [vdso]
7fffcebfe000-7fffcec00000 r--p 00000000 00:00 0                          [vvar]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
elvon@vm-ubt:~/repo_test/prelink_test/test_prog/host_elf$ cat /proc/6517/maps
00400000-00401000 r-xp 00000000 08:11 2025457                            /0101/repo_test/prelink_test/test_prog/host_elf/tstProg
00600000-00601000 r--p 00000000 08:11 2025457                            /0101/repo_test/prelink_test/test_prog/host_elf/tstProg
00601000-00602000 rw-p 00001000 08:11 2025457                            /0101/repo_test/prelink_test/test_prog/host_elf/tstProg
7ffa7f199000-7ffa7f353000 r-xp 00000000 fc:00 810003                     /lib/x86_64-linux-gnu/libc-2.19.so
7ffa7f353000-7ffa7f552000 ---p 001ba000 fc:00 810003                     /lib/x86_64-linux-gnu/libc-2.19.so
7ffa7f552000-7ffa7f556000 r--p 001b9000 fc:00 810003                     /lib/x86_64-linux-gnu/libc-2.19.so
7ffa7f556000-7ffa7f558000 rw-p 001bd000 fc:00 810003                     /lib/x86_64-linux-gnu/libc-2.19.so
7ffa7f558000-7ffa7f55d000 rw-p 00000000 00:00 0 
7ffa7f55d000-7ffa7f55e000 r-xp 00000000 fc:00 315421                     /usr/lib/libmyutlt.so
7ffa7f55e000-7ffa7f75d000 ---p 00001000 fc:00 315421                     /usr/lib/libmyutlt.so
7ffa7f75d000-7ffa7f75e000 r--p 00000000 fc:00 315421                     /usr/lib/libmyutlt.so
7ffa7f75e000-7ffa7f75f000 rw-p 00001000 fc:00 315421                     /usr/lib/libmyutlt.so
7ffa7f75f000-7ffa7f782000 r-xp 00000000 fc:00 809998                     /lib/x86_64-linux-gnu/ld-2.19.so
7ffa7f958000-7ffa7f95b000 rw-p 00000000 00:00 0 
7ffa7f97e000-7ffa7f981000 rw-p 00000000 00:00 0 
7ffa7f981000-7ffa7f982000 r--p 00022000 fc:00 809998                     /lib/x86_64-linux-gnu/ld-2.19.so
7ffa7f982000-7ffa7f983000 rw-p 00023000 fc:00 809998                     /lib/x86_64-linux-gnu/ld-2.19.so
7ffa7f983000-7ffa7f984000 rw-p 00000000 00:00 0 
7fff5c2c6000-7fff5c2e7000 rw-p 00000000 00:00 0                          [stack]
7fff5c3fc000-7fff5c3fe000 r-xp 00000000 00:00 0                          [vdso]
7fff5c3fe000-7fff5c400000 r--p 00000000 00:00 0                          [vvar]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

3 after use  prelink

elvon@vm-ubt:/data/repo_test/prelink_test/test_prog/host_elf$ cat /proc/12879/maps
00400000-00401000 r-xp 00000000 08:11 2025457                            /0101/repo_test/prelink_test/test_prog/host_elf/tstProg
00600000-00601000 r--p 00000000 08:11 2025457                            /0101/repo_test/prelink_test/test_prog/host_elf/tstProg
00601000-00602000 rw-p 00001000 08:11 2025457                            /0101/repo_test/prelink_test/test_prog/host_elf/tstProg
396aa00000-396aa23000 r-xp 00000000 fc:00 781922                         /lib/x86_64-linux-gnu/ld-2.19.so
396ac22000-396ac23000 r--p 00022000 fc:00 781922                         /lib/x86_64-linux-gnu/ld-2.19.so
396ac23000-396ac24000 rw-p 00023000 fc:00 781922                         /lib/x86_64-linux-gnu/ld-2.19.so
396ac24000-396ac25000 rw-p 00000000 00:00 0 
396ae00000-396afba000 r-xp 00000000 fc:00 813992                         /lib/x86_64-linux-gnu/libc-2.19.so
396afba000-396b1b9000 ---p 001ba000 fc:00 813992                         /lib/x86_64-linux-gnu/libc-2.19.so
396b1b9000-396b1bd000 r--p 001b9000 fc:00 813992                         /lib/x86_64-linux-gnu/libc-2.19.so
396b1bd000-396b1bf000 rw-p 001bd000 fc:00 813992                         /lib/x86_64-linux-gnu/libc-2.19.so
396b1bf000-396b1c4000 rw-p 00000000 00:00 0 
7fe6e1cf2000-7fe6e1cf5000 rw-p 00000000 00:00 0 
7fe6e1cf5000-7fe6e1cf6000 r-xp 00000000 fc:00 315421                     /usr/lib/libmyutlt.so
7fe6e1cf6000-7fe6e1ef5000 ---p 00001000 fc:00 315421                     /usr/lib/libmyutlt.so
7fe6e1ef5000-7fe6e1ef6000 r--p 00000000 fc:00 315421                     /usr/lib/libmyutlt.so
7fe6e1ef6000-7fe6e1ef7000 rw-p 00001000 fc:00 315421                     /usr/lib/libmyutlt.so
7fe6e1f1a000-7fe6e1f1d000 rw-p 00000000 00:00 0 
7fffff327000-7fffff348000 rw-p 00000000 00:00 0                          [stack]
7fffff38e000-7fffff390000 r-xp 00000000 00:00 0                          [vdso]
7fffff390000-7fffff392000 r--p 00000000 00:00 0                          [vvar]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
elvon@vm-ubt:/data/repo_test/prelink_test/test_prog/host_elf$ cat /proc/12880/maps
00400000-00401000 r-xp 00000000 08:11 2025457                            /0101/repo_test/prelink_test/test_prog/host_elf/tstProg
00600000-00601000 r--p 00000000 08:11 2025457                            /0101/repo_test/prelink_test/test_prog/host_elf/tstProg
00601000-00602000 rw-p 00001000 08:11 2025457                            /0101/repo_test/prelink_test/test_prog/host_elf/tstProg
396aa00000-396aa23000 r-xp 00000000 fc:00 781922                         /lib/x86_64-linux-gnu/ld-2.19.so
396ac22000-396ac23000 r--p 00022000 fc:00 781922                         /lib/x86_64-linux-gnu/ld-2.19.so
396ac23000-396ac24000 rw-p 00023000 fc:00 781922                         /lib/x86_64-linux-gnu/ld-2.19.so
396ac24000-396ac25000 rw-p 00000000 00:00 0 
396ae00000-396afba000 r-xp 00000000 fc:00 813992                         /lib/x86_64-linux-gnu/libc-2.19.so
396afba000-396b1b9000 ---p 001ba000 fc:00 813992                         /lib/x86_64-linux-gnu/libc-2.19.so
396b1b9000-396b1bd000 r--p 001b9000 fc:00 813992                         /lib/x86_64-linux-gnu/libc-2.19.so
396b1bd000-396b1bf000 rw-p 001bd000 fc:00 813992                         /lib/x86_64-linux-gnu/libc-2.19.so
396b1bf000-396b1c4000 rw-p 00000000 00:00 0 
7f60ccaab000-7f60ccaae000 rw-p 00000000 00:00 0 
7f60ccaae000-7f60ccaaf000 r-xp 00000000 fc:00 315421                     /usr/lib/libmyutlt.so
7f60ccaaf000-7f60cccae000 ---p 00001000 fc:00 315421                     /usr/lib/libmyutlt.so
7f60cccae000-7f60cccaf000 r--p 00000000 fc:00 315421                     /usr/lib/libmyutlt.so
7f60cccaf000-7f60cccb0000 rw-p 00001000 fc:00 315421                     /usr/lib/libmyutlt.so
7f60cccd3000-7f60cccd6000 rw-p 00000000 00:00 0 
7fff1170a000-7fff1172b000 rw-p 00000000 00:00 0                          [stack]
7fff117fc000-7fff117fe000 r-xp 00000000 00:00 0                          [vdso]
7fff117fe000-7fff11800000 r--p 00000000 00:00 0                          [vvar]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

0 0
原创粉丝点击