Re: C Linker/Compiler question

Bengt Farre <>
12 May 2000 22:33:12 -0400

          From comp.compilers

Related articles
C Linker/Compiler question (Francis Girard) (2000-04-20)
Re: C Linker/Compiler question (2000-04-25)
Re: C Linker/Compiler question (Arthur H. Gold) (2000-04-25)
Re: C Linker/Compiler question (Francis Girard) (2000-04-26)
Re: C Linker/Compiler question (Arthur H. Gold) (2000-04-30)
Re: C Linker/Compiler question (Greg Jaxon) (2000-04-30)
Re: C Linker/Compiler question (Eric Eide) (2000-05-04)
Re: C Linker/Compiler question (Bengt Farre) (2000-05-12)
| List of all articles for this month |

From: Bengt Farre <>
Newsgroups: comp.compilers
Date: 12 May 2000 22:33:12 -0400
Organization: A Customer of Tele2
References: 00-04-150 00-04-174 00-04-187 00-04-226
Keywords: linker

I guess that you are attempting to do private binding.
Some compilers linkers use this for data/method hiding.

This is also used with compilers/linkers for the embedded market
where you want to do bankswitching with as little overhead as possible.

Private Name Regions. (excerpt from our linker manual)

An explicit use for private name regions in an environment is in
building a paged program with duplication of the most used library
functions in each page, in order to avoid extra page commutation.

To avoid complaints when multiple copies of the same file redefine
symbols, each such contribution is placed in a private name region
accessible only to other files in the same page.

+new <public files> +pri <private libraries>

where <public files> contains symbols to be known outside this
private region, any symbols known in <private libraries> are known
only within this region.


This is also useful to provide a symbol with an alias and to hide
the original name.

you have a method "F" to call,
so you define your library function "F"
that calls the old "F" under another name like "HIDDEN_F"
This "F" may do some other things I guess.

+new // make a new name region
+def _HIDDEN_F=_F // makes the alias HIDDEN_F of F
+pri // start private area
func.o // contains a F, could also be a library.
+new // make a new region and
// closes the previous region which hides F!
newfunc.o // hey here is the F to be called instead.
// andthen calls HIDDEN_F

Bengt Farre
COSMIC Software Scandinavia

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.