SPARC Assembly Language Reference Manual
只搜寻这本书
以 PDF 格式下载本书

Converting Files to the New Format

4

Introduction

This chapter discusses how to convert existing SunOS 4.1 SPARC assembly files to the SunOS 5.x SPARC assembly file format.

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, like 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 e.g. 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.

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