Explains: Linux linux-gate.so.1 Library / Dynamic Shared Object [ vdso ]

last updated in Categories

I‘m using the ldd command to get information about /usr/local/nginx/sbin/nginx binary and I see linux-gate.so.1 library. However, I’m unable to find out this file anywhere on the system? What is linux-gate.so.1 and how do I copy this file?

linux-gate.so.1 is nothing but the Linux Virtual Dynamic Shared Object. This file only exists in each executables address space. In other words you don’t have to copy or worry about this file as it is a virtual library. According to this article:


This virtual library provides the necessary logic to allow user programs to access system functions through the fastest means available on the particular processor, either interrupt, or with most newer processors, fast system call.

This VDSO exposed by the kernel at a fixed address in every process’ memory:
cat /proc/self/maps
Sample outputs:

00400000-00405000 r-xp 00000000 08:03 917599                             /bin/cat
00604000-00606000 rw-p 00004000 08:03 917599                             /bin/cat
006b5000-006d6000 rw-p 006b5000 00:00 0                                  [heap]
2ac89a38d000-2ac89a3a9000 r-xp 00000000 08:03 13435115                   /lib64/ld-2.5.so
2ac89a3a9000-2ac89a3ab000 rw-p 2ac89a3a9000 00:00 0 
2ac89a5a8000-2ac89a5a9000 r--p 0001b000 08:03 13435115                   /lib64/ld-2.5.so
2ac89a5a9000-2ac89a5aa000 rw-p 0001c000 08:03 13435115                   /lib64/ld-2.5.so
2ac89a5aa000-2ac89a6f8000 r-xp 00000000 08:03 13434936                   /lib64/libc-2.5.so
2ac89a6f8000-2ac89a8f8000 ---p 0014e000 08:03 13434936                   /lib64/libc-2.5.so
2ac89a8f8000-2ac89a8fc000 r--p 0014e000 08:03 13434936                   /lib64/libc-2.5.so
2ac89a8fc000-2ac89a8fd000 rw-p 00152000 08:03 13434936                   /lib64/libc-2.5.so
2ac89a8fd000-2ac89a903000 rw-p 2ac89a8fd000 00:00 0 
2ac89a903000-2ac89dedc000 r--p 00000000 08:03 22135818                   /usr/lib/locale/locale-archive
7fffe69cf000-7fffe69e4000 rw-p 7ffffffe9000 00:00 0                      [stack]
7fffe69fc000-7fffe6a00000 r-xp 7fffe69fc000 00:00 0                      [vdso]
ffffffffff600000-ffffffffffe00000 ---p 00000000 00:00 0                  [vsyscall]

See this blog post which explains linux-gate.so.1 vdso in the details.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.


2 comment

  1. Judging by the Pwn2Own contest restlus (a contest at the cansecwest conference where operating systems are pitted against each other to see which can be hacked) Linux is safest. Why? The Mac was hacked within 10 seconds. Windows Vista fell on day 3 of the contest, and Ubuntu (Linux) remained unscathed. As for viruses, linux is still your safest bet, mostly because there are about 100 known viruses written for linux, vs over 100,000 for windows. There are only about 57 mac viruses, but as discussed earlier the higher level of linux security makes you a bit safer.

Leave a Comment