Is the vdso shared library (linux-vdso.so) the library that contains the kernel object code (system calls)?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite
2












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?










share|improve this question





















  • 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














up vote
1
down vote

favorite
2












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?










share|improve this question





















  • 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












up vote
1
down vote

favorite
2









up vote
1
down vote

favorite
2






2





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?










share|improve this question













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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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
















  • 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










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.






share|improve this answer






















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    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






























    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.






    share|improve this answer


























      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.






      share|improve this answer
























        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.






        share|improve this answer














        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.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Oct 9 '17 at 14:00

























        answered Oct 9 '17 at 12:48









        Stephen Kitt

        144k22317382




        144k22317382



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            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













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay