Chapter 4Converting Files to the New Format
4.1 Introduction
This chapter discusses how to convert existing SunOS 4.1 SPARC assembly
files to the SunOS 5.x SPARC assembly file format.
4.2 Conversion Instructions
Remove the leading underscore ( _ ) from symbol
names. The Solaris 2.x SPARCompilers do not prepend a leading underscore to
symbol names in the users' programs as did the SPARCompilers that ran under
SunOS 4.1.
Prefix local symbol names with a dot (.). Local symbol names
in the SunOS 5.x SPARC assembly language begin with a dot (.) so that they
will not conflict with user programs' symbol names.
Change the usage of the pseudo-op .seg
to .section, for example, change .seg data to
.section .data. See Appendix A, Pseudo-Operations for more information.
Note - The above conversions can be automatically achieved by passing
the -T option to the assembler.
4.3 Examples
Figure 4-1 shows
how to convert an existing 4.1 file to the new format. The lines that are
different in the new format are marked with change bars.
Figure 4-1 Converting a 4.x File to the New Format
|