Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.
share|improve this question
You've come across it, but it's not on your system. Where did you come across it? – Kyle Jones Mar 24 '12 at 15:24

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.