Is the vdso shared library (linux-vdso.so) the library that contains the kernel object code (system calls)?
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I noticed that all my programs compiled to gcc are linked to vdso library. Is this the library that contain the system calls to the kernel, like mmap() and fork() and other system calls?
I know that system calls are not functions of the GNU C standard library so their object code must be in some library that is linked with the application at the compilation?
So is the vdso that library?
kernel libraries dynamic-linking system-calls shared-library
add a comment |Â
up vote
1
down vote
favorite
I noticed that all my programs compiled to gcc are linked to vdso library. Is this the library that contain the system calls to the kernel, like mmap() and fork() and other system calls?
I know that system calls are not functions of the GNU C standard library so their object code must be in some library that is linked with the application at the compilation?
So is the vdso that library?
kernel libraries dynamic-linking system-calls shared-library
It may be. What issues are you trying to solve?
â Kusalananda
Oct 9 '17 at 11:24
@Kusalananda I do not have any issue whatsoever. I am trying to learn more about how the C compiler works how the linker works and to basically be a better programmer and computer scientist.
â yoyo_fun
Oct 9 '17 at 11:32
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I noticed that all my programs compiled to gcc are linked to vdso library. Is this the library that contain the system calls to the kernel, like mmap() and fork() and other system calls?
I know that system calls are not functions of the GNU C standard library so their object code must be in some library that is linked with the application at the compilation?
So is the vdso that library?
kernel libraries dynamic-linking system-calls shared-library
I noticed that all my programs compiled to gcc are linked to vdso library. Is this the library that contain the system calls to the kernel, like mmap() and fork() and other system calls?
I know that system calls are not functions of the GNU C standard library so their object code must be in some library that is linked with the application at the compilation?
So is the vdso that library?
kernel libraries dynamic-linking system-calls shared-library
kernel libraries dynamic-linking system-calls shared-library
asked Oct 9 '17 at 11:12
yoyo_fun
322412
322412
It may be. What issues are you trying to solve?
â Kusalananda
Oct 9 '17 at 11:24
@Kusalananda I do not have any issue whatsoever. I am trying to learn more about how the C compiler works how the linker works and to basically be a better programmer and computer scientist.
â yoyo_fun
Oct 9 '17 at 11:32
add a comment |Â
It may be. What issues are you trying to solve?
â Kusalananda
Oct 9 '17 at 11:24
@Kusalananda I do not have any issue whatsoever. I am trying to learn more about how the C compiler works how the linker works and to basically be a better programmer and computer scientist.
â yoyo_fun
Oct 9 '17 at 11:32
It may be. What issues are you trying to solve?
â Kusalananda
Oct 9 '17 at 11:24
It may be. What issues are you trying to solve?
â Kusalananda
Oct 9 '17 at 11:24
@Kusalananda I do not have any issue whatsoever. I am trying to learn more about how the C compiler works how the linker works and to basically be a better programmer and computer scientist.
â yoyo_fun
Oct 9 '17 at 11:32
@Kusalananda I do not have any issue whatsoever. I am trying to learn more about how the C compiler works how the linker works and to basically be a better programmer and computer scientist.
â yoyo_fun
Oct 9 '17 at 11:32
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
3
down vote
System calls are implemented in the kernel, as mentioned in the answer to your followup question. vDSO, the virtual dynamic shared object, is a small virtual library, also implemented by the kernel, which the kernel maps into all processes. Like syscalls it is wrapped by the C library.
The main difference between syscalls and the vDSO is one of privilege. System calls are executed in kernel space, and switching between user space and kernel space is expensive. As an optimisation, some system calls which donâÂÂt actually need to run in kernel space are provided in the vDSO, which runs in user space. An example is gettimeofday
which tends to be called quite often and can be implemented by the kernel without switching to kernel space.
The vdso
manpage has more details. For a detailed discussion of system calls on Linux in general, including vDSO, see Anatomy of a system call part 1 and part 2.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
System calls are implemented in the kernel, as mentioned in the answer to your followup question. vDSO, the virtual dynamic shared object, is a small virtual library, also implemented by the kernel, which the kernel maps into all processes. Like syscalls it is wrapped by the C library.
The main difference between syscalls and the vDSO is one of privilege. System calls are executed in kernel space, and switching between user space and kernel space is expensive. As an optimisation, some system calls which donâÂÂt actually need to run in kernel space are provided in the vDSO, which runs in user space. An example is gettimeofday
which tends to be called quite often and can be implemented by the kernel without switching to kernel space.
The vdso
manpage has more details. For a detailed discussion of system calls on Linux in general, including vDSO, see Anatomy of a system call part 1 and part 2.
add a comment |Â
up vote
3
down vote
System calls are implemented in the kernel, as mentioned in the answer to your followup question. vDSO, the virtual dynamic shared object, is a small virtual library, also implemented by the kernel, which the kernel maps into all processes. Like syscalls it is wrapped by the C library.
The main difference between syscalls and the vDSO is one of privilege. System calls are executed in kernel space, and switching between user space and kernel space is expensive. As an optimisation, some system calls which donâÂÂt actually need to run in kernel space are provided in the vDSO, which runs in user space. An example is gettimeofday
which tends to be called quite often and can be implemented by the kernel without switching to kernel space.
The vdso
manpage has more details. For a detailed discussion of system calls on Linux in general, including vDSO, see Anatomy of a system call part 1 and part 2.
add a comment |Â
up vote
3
down vote
up vote
3
down vote
System calls are implemented in the kernel, as mentioned in the answer to your followup question. vDSO, the virtual dynamic shared object, is a small virtual library, also implemented by the kernel, which the kernel maps into all processes. Like syscalls it is wrapped by the C library.
The main difference between syscalls and the vDSO is one of privilege. System calls are executed in kernel space, and switching between user space and kernel space is expensive. As an optimisation, some system calls which donâÂÂt actually need to run in kernel space are provided in the vDSO, which runs in user space. An example is gettimeofday
which tends to be called quite often and can be implemented by the kernel without switching to kernel space.
The vdso
manpage has more details. For a detailed discussion of system calls on Linux in general, including vDSO, see Anatomy of a system call part 1 and part 2.
System calls are implemented in the kernel, as mentioned in the answer to your followup question. vDSO, the virtual dynamic shared object, is a small virtual library, also implemented by the kernel, which the kernel maps into all processes. Like syscalls it is wrapped by the C library.
The main difference between syscalls and the vDSO is one of privilege. System calls are executed in kernel space, and switching between user space and kernel space is expensive. As an optimisation, some system calls which donâÂÂt actually need to run in kernel space are provided in the vDSO, which runs in user space. An example is gettimeofday
which tends to be called quite often and can be implemented by the kernel without switching to kernel space.
The vdso
manpage has more details. For a detailed discussion of system calls on Linux in general, including vDSO, see Anatomy of a system call part 1 and part 2.
edited Oct 9 '17 at 14:00
answered Oct 9 '17 at 12:48
Stephen Kitt
144k22317382
144k22317382
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f396987%2fis-the-vdso-shared-library-linux-vdso-so-the-library-that-contains-the-kernel%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
It may be. What issues are you trying to solve?
â Kusalananda
Oct 9 '17 at 11:24
@Kusalananda I do not have any issue whatsoever. I am trying to learn more about how the C compiler works how the linker works and to basically be a better programmer and computer scientist.
â yoyo_fun
Oct 9 '17 at 11:32