Browse Prior Art Database

Method and System for Resolving a Symbol at Link Time

IP.com Disclosure Number: IPCOM000197336D
Publication Date: 2010-Jul-02
Document File: 1 page(s) / 18K

Publishing Venue

The IP.com Prior Art Database

Abstract

A method and system for resolving a symbol at link time is disclosed. The method and system allows a user to specify which function from which library is to be linked to resolve a particular symbol.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 84% of the total text.

Page 1 of 1

Method and System for Resolving a Symbol at Link Time

Disclosed is a method and system for resolving a symbol at link time.

Assume that Function foo is implemented in libraries libA and libB.

Given any compiler, it orders all the libraries for symbol resolution purposes in a particular sequence, including specific libraries through the use of the link option -l. As an example, libA is put before libB. If the implementation of foo in libA is desired, no particular action is needed. However, if the implementation of libB is preferred, libB can be put before libA so that libB is resolved first and the implementation of foo by libB will be used in the compiled code.

However, a difficulty comes when Functions foo and bar are both implemented in libA and libB. In accordance with the method disclosed herein, foo is implemented from libA and bar is implemented from libB. Currently, no compiler is able to do so. Note that if libA is put before libB, "both" the implementations of foo and bar from libA will be used.

Disclosed is a method and system for resolving symbols at link time. The method and system provides a link option as follows:

pair=

,

[;

,

]

As shown above, a linker resolves the given function name against the given library name. If the given library implements the function, then the method terminates. However, if the given library does not implement the given function, the linker performs the normal linking procedure to resolve the symbol through the usual sequenc...