HP UX Developer Tools manual Sections in 64-bit Mode

Page 44

HP-UX Architecture Conventions

Sections in 64-bit Mode

Space

Subspace

Sort Key

Use

 

 

 

 

 

$GLOBAL$

40

Global variable base address.

 

 

 

 

 

$PLT

6

Procedure linkage table.

 

 

 

 

 

$SHLIB_DATA$

12

Shared library data.

 

 

 

 

 

$SHORTBSS$

80

Uninitialized data and common.

 

 

 

 

 

$SHORTDATA$

24

Global scalar variables.

 

 

 

 

$THREAD_SPECIFIC$

 

16

 

 

 

 

 

 

$TBSS$

40

Thread local storage

 

 

 

 

Sections in 64-bit Mode

In 64-bit mode, the Executable and Linking Format (ELF) uses segments and sections rather than spaces and subspaces.

The concept of spaces maps to the ELF concept of segments, but segments do not apply to relocatable object files. Hence, the Assembler ignores the .SPACE directive for 64-bit assembly programs. Subspaces map directly to the ELF concept of sections, so the .SUBSPA directive switches to or creates a new section. The attributes of a subspace correspond to section attributes as follows:

Subspace names listed in the table are mapped to their corresponding section name. Names not in this table are unchanged.

SUBSPACE NAME

SECTION NAME

 

 

$BSS$

.bss

 

 

$CODE$

.text

 

 

$DATA$

.data

 

 

$FINI$

.fini

 

 

44

Chapter 3

Image 44
Contents HP 9000 Computers 92432-90012 JuneHanover Street Palo Alto, California Legal NoticesRestricted Rights Legend Contents Assembler Directives and Pseudo-Operations Contents Contents Contents Contents Pseudo-Instruction Set Assembling Your Program Index Diagnostic MessagesProgramming Examples Edition Date Software Version PrefacePrinting History Audience Related DocumentationTypographical Conventions This ManualSummary of Technical Changes for HP-UX Assembly Language Assembler FeaturesAssembler Features Summary of Changes for PA-RISC Summary of Changes for PA-RISC 2.0W Wide Mode, 64-bitSummary of Changes for PA-RISC ChapterSummary of Changes for PA-RISC 2.0W Wide Mode, 64-bit Program Structure Program Structure Label Opcode Operands CommentsSymbols and Constants Symbols and ConstantsInteger Constants Signed Unsigned Registers and Register Mnemonics Registers and Register MnemonicsRegisters by using an L or R suffix General Registers Single-Precision Floating-Point Registers Control Registers Synonyms Double-Precision Floating-Point RegistersSpace Registers Register Procedure Calling Conventions Register Synonyms DescriptionExpressions ExpressionsStandard Arithmetic Operators Operator OperationLegal Combinations For Relocatable Terms Operation Result Available Field Selectors Meaning Field Meaning Selector Multiple of 2048 allows a three-instruction sequence Parenthesized Subexpressions Operands and Completers Operands and CompletersAddi Macro Processing Macro ProcessingDefining New Instructions With Macros Contains general register 19, or binary 10011. These HP-UX Architecture Conventions SpacesSpaces Memory Layout on HP-UX Sr4 Sr5 Sr6 Subspaces SubspacesAttributes Space Subspace Sort Key Use DirectivesStandard Subspaces and Sort Keys Sections in 64-bit Mode Sections in 64-bit Mode$INIT$ Location Counters Location CountersCompiler Conventions Compiler ConventionsCompiler Conventions Global Symbol Usage Mfctl Shared Libraries Assembly ListingShared Libraries Assembly Listing Directive Function IntroductionAssembler Directives Requests common storage for a specified number Bytes Pseudo-Operations Directive Function Reserves 16 bits a half word of storage Align Directive SyntaxParameters ExampleAllow Directive Allow DirectiveDiscussion To the .LEVEL specified for the file Block and .BLOCKZ Pseudo-Operations Block and .BLOCKZ Pseudo-OperationsSpace $TEXT$ Subspa $CODE$ Block Byte initvalue , initvalue Byte Pseudo-OperationByte Pseudo-Operation Call argumentdescription argumentdescription Call DirectiveCall Directive Form of argument-description is Arg=location Where arg can Return value for a procedurefirst word in the argument list Second word in the argument listLIT Align Word Procend Export Callinfo parameter , parameter Callinfo DirectiveCallinfo Directive Register ENTRYSR= Unwound It restores the RP value when it encounters a .LEAVE Callinfo Directive Stack Frames Re-enter code subspace Comm Directive Comm DirectiveLabel .COMM numbytes Label Labels the location of the reserved storageCompany-name Copyright DirectiveCopyright Directive Proc Callinfo Enter Integer .fraction E power Fraction E powerDouble Pseudo-Operation Double Pseudo-OperationDword initvalue , initvalue Dword Pseudo-OperationDword Pseudo-Operation END Directive END DirectiveEndm Directive Endm DirectiveEnter and .LEAVE Pseudo-Operations Enter and .LEAVE Pseudo-OperationsSpace $TEXT$ Entry and .EXIT Directives Entry and .EXIT DirectivesSymbolicname .EQU value EQU DirectiveEQU Directive ValueExport Directive Export DirectiveArgument Export proc,ENTRY,ARGW0=GR Float Pseudo-Operation Float Pseudo-OperationHalf initvalue , initvalue Half Pseudo-OperationHalf Pseudo-Operation Import Directive Import DirectiveNOP END Label Directive Label DirectiveLabel labelid Labelid Names the label identifierLevel Directive Level DirectiveLevel Directive Listoff and .LISTON Directives Listoff and .LISTON DirectivesListon Code Space $TEXT$ SPNUM=0,SORT=0 Subspa $CODE$ Locct Directive Locct DirectiveLabel .MACRO formalparameter,formalparameter Macro DirectiveMacro Directive Examples 100 Chapter 101 Origin DirectiveOrigin Directive 102 Proc and .PROCEND DirectivesProc and .PROCEND Directives Chapter 103 REG Directive REG DirectiveLabel .REG typedregister Label User-defined register nameChapter 105 Shlibversion DirectiveShlibversion Directive 106 Space DirectiveSpace Directive Chapter 107 108 Spnum Pseudo-OperationSpnum Pseudo-Operation Chapter 109 String and .STRINGZ Pseudo-OperationsString and .STRINGZ Pseudo-Operations 110 Subspa Directive Subspa DirectiveName An identifier that names the current subspace Chapter 111112 Chapter 113 114 Version DirectiveVersion Directive Word Pseudo-Operation Word Pseudo-OperationWord initvalue , initvalue Chapter 115Directive Space Name Default Parameters Programming AidsProgramming Aids Predefined Subspace DirectivesShortdata Chapter 117Programming Aids 118 Pseudo-Instruction Set 119120 Chapter 121 Compare and Branch Conditions Comb and ComibCond Description Add and Branch Conditions Addb and Addib Description 122Invoking the Assembler 123Using the as Command Using the as CommandAssemble code for the architecture 124Chapter 125 filenameLevel Wnumber Tables, see HP-UX Linker and LibrariesOnline User Guide 126Using the cc Command Using the cc CommandPassing Arguments to the Assembler Wa, ,as-argument as-argumentCpp Preprocessor 128Programming Examples 129130 Binary Search for Highest Bit PositionBinary Search for Highest Bit Position Chapter 131 132 Copying a StringCopying a String Chapter 133 134 Dividing a Double-Word DividendDividing a Double-Word Dividend Programming Examples Chapter 135Demonstrating the Procedure Calling Convention Demonstrating the Procedure Calling ConventionProgram Listing 136Assembly Program Listing Chapter 137Output of the cc -S Command Assembly Program Listing From the C CompilerOutput of the cc -S Command 138Chapter 139 Output of the cc -S Command 140 141 Option operand 142Chapter 143 Reserve 144Chapter 145 Wrong register type usedUse a general register 146 Use a space registerUse a control register Chapter 147 148 Chapter 149 150 Chapter 151 Used to invoke the assembler 152Chapter 153 154 Error MessagesError Messages Chapter 155 156 Chapter 157 158 1027 10281029 10301031 10321033 10341035 10361037 1038162 Chapter 163 1054 10551056 1057Chapter 165 166 Chapter 167 168 Format keyword=value 10801081 1082170 1088 10891090 Chapter 1711091 10941095 10961097 10981099 11001101 11021103 11041105 Chapter 175176 Panic MessagesPanic Messages 2005 20062007 2008178 User Warning MessagesUser Warning Messages 7003 70047005 7006180 Chapter 181 182 Limit Error Messages Limit Error Messages7200 72017202 72037204 184Diagnostic Messages Chapter 185186 Chapter 187 Branching Error MessagesBranching Error Messages 188 Chapter 189 190 Chapter 191 192 7827 78287834 78357836 7837Expr 194Index Index 195196 NumericsIndex 197 Copyright198 HP C/HP-UX,49Index 199 Mfctl200 DoubleIndex 201 See also memory202
Related manuals
Manual 29 pages 37.9 Kb Manual 44 pages 5.6 Kb Manual 2 pages 37.54 Kb