0

I was looking through my root folders in my new ubuntu desktop, and noticed the standard c header files in my include folder(like stdio.h), so i tried to sudo locate stdio.c to no avail. Where are these files? If they are non existent, how do these headers work, what will happen if i were to edit them? Thank you.

FutureSci
  • 1,750
  • 1
  • 19
  • 27
  • They correspond to library files in de standard library. You could download the sources for libc, but you essentially don't need them, because you already have them, in compiled form. – wildplasser May 09 '13 at 22:07

1 Answers1

0

You can't find source files because you only get object files in the form of library. So you can't edit the source. The best you could do is to look at the object file(s) of standard files.

locate libc.a

then extract the object files:

ar x /path/to/libc.a

and then you can use objdump to read the interested object file.

However, if you are looking for source samples, you can look at this post for various online resources.

Where can I browse the sourcecode for libc online

Community
  • 1
  • 1
P.P
  • 117,907
  • 20
  • 175
  • 238