From: | whsieh@cs.washington.edu |
Newsgroups: | comp.compilers |
Date: | 29 Jan 1997 11:17:30 -0500 |
Organization: | Compilers Central |
References: | 97-01-183 |
Summary: | selective symbol exposure during link |
Keywords: | linker, modula, comment |
SRC Modula-3 supports the notion of packages, which can be used to
limit the visibility of interfaces.
http://www.research.digital.com/SRC/modula-3/html/srcm3.html
- Wilson
Q: How does one link several object files into a single object file
or library, where symbols are resolved locally as much as possible,
and where only selected symbols are exported/exposed/made public?
Here is an example:
File b.c contains a function named b1() which does something simple.
File a.c contains a function named a1() which calls b1();
File main.c include main() which calls a1().
I'd like to create an object (or library) ab.o, composed of
a.o and b.o, which only exposes a1(). With this ab.o, I then
should be able to compile main.c and create an executable.
[Does it need linker support? -John]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.