'C' libraries + ELF ??

William Case <[email protected]>
Newsgroups gmane.user-groups.linux.ottawa.general
Message-ID <1236440896.2950.11.camel@CASE>
Hi;

I am doing K&R for the second time through.  I am trying to clear up for
myself any misunderstandings and/or details I might have missed in using
the 'C' language.

I have a couple of questions regarding the creation and use of libraries
and their header files.  I have googled for info and practised building
rudimentary libraries and header files but that is a far cry from the
complexities of what I see when I look at something like 
/usr/include/stdio.h

Does anybody have a site they can suggest that teaches how to build
kernal level libraries like libc?

I had a site bookmarked 3 years ago that has now disappeared.  It showed
all the conventions for declaring and defining macro constants and
functions like the use of the underscore, double underscore, the length
of a constant and the proper use of capitalization.  Does anyone know of
a similar site?

ELF (executable and linked files)

I have found lots of material regarding ELF but there are a couple of
things I am not certain of.

Is ELF a separate file or simply added as a header to the main
(executable) file? If it is a header (which seems to be what my reading
is telling me), when in the compilation process does it get added?

Is there some magic to ELF, or does it just add addresses that a
programmer could add but its use guarantees that the correct start/link
addresses are always used and used in the same way thereby making
executable programs portable?

How would I (i.e. which tools would I use) see ELF headings in a
compiled file?

How does the compiler know a file is executable or linkable?  By the use
of main()?
____________________________________________________________

Short answers or suggests for further reading is all I need.
____________________________________________________________
-- 
Regards Bill
Fedora 10, Gnome 2.24.3
Evo.2.24.5, Emacs 22.3.1

-- 
OCLUG general discussion list
[email protected]
http://oclug.on.ca/mailman/listinfo/oclug
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.