Browse Prior Art Database

Link Edit With Symbols From Different Code Pages

IP.com Disclosure Number: IPCOM000108026D
Original Publication Date: 1992-Jan-01
Included in the Prior Art Database: 2005-Mar-22
Document File: 3 page(s) / 109K

Publishing Venue

IBM

Related People

Ackman, TD: AUTHOR [+2]

Abstract

A method for resolving symbolic names during a link edit process is disclosed. The names originate in different source files which may have different code pages. Thus, names with the same character representations may have different underlying hexadecimal representations.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Link Edit With Symbols From Different Code Pages

       A method for resolving symbolic names during a link edit
process is disclosed.  The names originate in different source files
which may have different code pages.  Thus, names with the same
character representations may have different underlying hexadecimal
representations.

      When a source file is compiled, the resulting module will
contain, among other things, the names of all procedures and
variables imported and exported by the module.  These names are
stored as character strings which have underlying hexadecimal
representations.

      When modules are bound together to create an executable
program, each of the imported names from every module must be
resolved to a corresponding exported name from another module.  Each
import is resolved by comparing its hexadecimal representation with
that of each export, until a match is found.

      In Fig. 1, module A imports the items represented by the
symbolic names XYZ and ABC.  These are resolved by exports from
modules B and C, respectively, because the bit patterns of their
underlying representations are identical to exported symbols from
those modules.

      This symbol resolution process works as long as the
representation for character data in all of the original source files
is the same.  Unfortunately, due to national language requirements,
some characters commonly used in names in programming languages, have
different representations for users in different countries.  On a
typical computer system, users can specify the code page to be used
for representing data in a source file.

      Fig. 2 shows data for two identical source files.  Both contain
the character string $XYZ, but because the files use different code
pages to represent the data, the underlying representations for $ are
different.  Obviously, any attempts to compare the two strings would
show them to be not equal, even though they would appear to be equal
when displayed on the user's workstation.

      The problem that is presented here can be solved by taking the
code page into consideration when comparing symbolic names.  At
compile time, the compiler determines the code page of the source
file provided by the user.  This code page will be associated with
the module produced by the compilation process.  In order to ensure
consistency, the compiler must check the code pages of any files
imbedded into the main source file.  If the code pages do not match,
any symbolic names from the imbedded f...