What is syscall-template.S?

9,958

It is a file that is necessary when you are compiling C code. Below you will see a snippet from building glibc-2.14.1

I was building a new LFS system today and just saw it fly by.

Guessing that it is related to C and provides system call info for building C programs with gcc

 echo '#define SYSCALL_SYMBOL __GI_mq_setattr'; \
 echo '#include <syscall-template.S>'; \     <========### syscall-template.S
 echo 'weak_alias (__GI_mq_setattr, mq_setattr)'; \
 echo 'libc_hidden_weak (mq_setattr)'; \
) | x86_64-lfs-linux-gnu-gcc -c  -I../include -I/mnt/lfs/sources/glibc-build/rt -I/mnt/lfs/sources/glibc-build -I../sysdeps/x86_64/elf -I../nptl/sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I..

EDIT:

You don't see it because it is part of the glibc source. located in:

glibc-2.14.1/sysdeps/unix/syscall-template.S

This directory is typically deleted when you are finished installing.

EDIT 2:

I just reread your initial post. You said that it is not in the glibc source I wanted to verify and just extracted the tar again and it is in the path I listed above.

Share:
9,958

Related videos on Youtube

HandyGandy
Author by

HandyGandy

Updated on September 18, 2022

Comments

  • HandyGandy
    HandyGandy over 1 year

    I've come across a file syscall-template.S more specifically its location is

    .../sysdeps/unix/syscall-template.S

    1. What is this file?
    2. Where is it. It is not on my system and I cannot find it in source packages, including linux-image and glibc.