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


  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.

1 Answer 1


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..


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


This directory is typically deleted when you are finished installing.


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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .