Go to the first, previous, next, last section, table of contents.
(The AIX/RS6000 native object file format is xcoff with stabs)
-
Instead of .stabs, xcoff uses .stabx.
-
The data fields of an xcoff .stabx are in a different order than an
a.out .stabs. The order is: string, value, type. The desc and null
fields present in a.out stabs are missing in xcoff stabs. For N_GSYM
the value field is the name of the symbol.
-
BSD a.out stab types correspond to AIX xcoff storage classes. In general the
mapping is N_STABTYPE becomes C_STABTYPE. Some stab types in a.out
are not supported in xcoff. See Table E. for full mappings.
exception:
initialised static N_STSYM and un-initialized static N_LCSYM both map
to the C_STSYM storage class. But the destinction is preserved
because in xcoff N_STSYM and N_LCSYM must be emited in a named static
block. Begin the block with .bs s[RW] data_section_name for N_STSYM
or .bs s bss_section_name for N_LCSYM. End the block with .es
-
xcoff stabs describing tags and typedefs use the N_DECL (0x8c)instead
of N_LSYM stab type.
-
xcoff uses N_RPSYM (0x8e) instead of the N_RSYM stab type for register
variables. If the register variable is also a value parameter, then
use R instead of P for the symbol descriptor.
6.
xcoff uses negative numbers as type references to the basic types.
There are no boilerplate type definitions emited for these basic
types. << make table of basic types and type numbers for C >>
-
xcoff .stabx sometimes don't have the name part of the string field.
-
xcoff uses a .file stab type to represent the source file name. There
is no stab for the path to the source file.
-
xcoff uses a .line stab type to represent source lines. The format
is: .line line_number.
-
xcoff emits line numbers relative to the start of the current
function. The start of a function is marked by .bf. If a function
includes lines from a seperate file, then those line numbers are
absolute line numbers in the <<sub-?>> file being compiled.
-
The start of current include file is marked with: .bi "filename" and
the end marked with .ei "filename"
-
If the xcoff stab is a N_FUN (C_FUN) then follow the string field with
,. instead of just ,
-
The symbol descriptor for register parameters is P for a.out and R for
xcoff.
(I think that's it for .s file differences. They could stand to be
better presented. This is just a list of what I have noticed so far.
There are a *lot* of differences in the information in the symbol
tables of the executable and object files.)
Table E: mapping a.out stab types to xcoff storage classes
stab type storage class
-------------------------------
N_GSYM C_GSYM
N_FNAME unknown
N_FUN C_FUN
N_STSYM C_STSYM
N_LCSYM C_STSYM
N_MAIN unkown
N_PC unknown
N_RSYM C_RSYM
N_RPSYM (0x8e) C_RPSYM
N_M2C unknown
N_SLINE unknown
N_DSLINE unknown
N_BSLINE unknown
N_BROWSE unchanged
N_CATCH unknown
N_SSYM unknown
N_SO unknown
N_LSYM C_LSYM
N_DECL (0x8c) C_DECL
N_BINCL unknown
N_SOL unknown
N_PSYM C_PSYM
N_EINCL unknown
N_ENTRY C_ENTRY
N_LBRAC unknown
N_EXCL unknown
N_SCOPE unknown
N_RBRAC unknown
N_BCOMM C_BCOMM
N_ECOMM C_ECOMM
N_ECOML C_ECOML
N_LENG unknown
Go to the first, previous, next, last section, table of contents.