Anda di halaman 1dari 7

IAR Systems AB

Page

1(7)
Prepared By

Date

Revision

2005-04-15

Object File Comparison and Record Types in UBROF


Files from IAR C/C++ Compilers
Technical Note

IAR Systems AB

Page

2(7)
Prepared By

Date

Revision

2005-04-15

1 Introduction
1.1

Revision History

Revision
A

1.2

Date
2005-04-07

Author

Modification
Initial revision

Purpose

It is sometimes necessary to compare the contents of two object files in order to determine if there are
any significant differences between them. For various reasons, differences occur that do not affect the
actual application code. This document describes which record types in a UBROF file that can affect
the actual application code, and which record types that only give supplementary information used for
debugging or other purposes.

1.3

Assumptions

Output from the list-object-code command in XLIB is used as a basis for the comparison.

1.4
-

Open Issues

IAR Systems AB

Page

3(7)
Prepared By

Date

Revision

2005-04-15

2 Categorization
UBROF record types can be divided into two main categories:

Record types that carry information that can affect the final code of the application
Record types that carry supplementary information, such as debug information or information
about the build process.

This document provides a list of all record types in each category, with a brief comment about the
purpose for which the record type is used.
Note that some debug information (in particular, call frame information) is considered essential,
because it is needed to provide basic debugging support in a application that mixes modules with debug
information and modules without debug information. This kind of debug information is output by the
compiler even when it is not configured to include debug information.

2.1

Record Types Affecting the Application

Many of these record types cannot occur in current versions of UBROF, but they are all listed here for
completeness.
The record types marked Static overlay can also occur in UBROF files for products that are not using
the static overlay features. In that case they only carry debug information.
Some symbols in a UBROF file exist only to carry debug information. In that case differences in, for
instance, T_SYMBOL_DEF records for those symbols have no effect on the final application. One
example of this is that symbols for a fully inlined function can be present in a UBROF file to provide a
point of reference for debug information about that function. This only occurs when the compiler is
configured to produce debug information.
T_SCOPED_NAME and T_TYPE records carry information about names and types in UBROF,
starting with version 8. Whenever particular T_SCOPED_NAME records are referenced from
T_SYMBOL_DEFx records, they can affect the final application. In the case of some C++ names, like
overloaded functions, T_SCOPED_NAME records can refer to T_TYPE records. In that case these
records too can affect the final application.
The contents and order of the following record types can affect the final application code:
Record Type
T_ABS_16
T_ABS_24
T_ABS_32
T_ABS_8
T_ABS_BLOCK
T_ABS_VAR
T_AND
T_BNOT
T_CHECK
T_CHECK_LIBRARY
T_CHECK2
T_COPY
T_DATE
T_delete_tos
T_DIV
T_END_ABS
T_END_REL
T_END_REL1

Purpose
Code or data bytes
Code or data bytes
Code or data bytes
Code or data bytes
Code or data bytes
Code or data bytes
Relocation
Relocation
Relocation
Link-time checking
Relocation
Relocation
Relocation
Relocation
Relocation
Program start address
Program start address
Program start address

IAR Systems AB

Page

4(7)
Prepared By

T_EQ
T_ERROR
T_EXT_24
T_EXT_32
T_EXT_DEF
T_EXT_FI_8
T_EXT_N16
T_EXT_N8
T_EXT_NPCREL
T_EXT_P16
T_EXT_P8
T_EXT_PPCREL
T_EXT_S86
T_GE
T_get_byte
T_GT
T_HWRD
T_IOR
T_KEY_VALUE
T_LAND
T_LDEF_FN_51
T_LE
T_LI0_16
T_LI0_8
T_LI1_16
T_LI1_8
T_LI2_16
T_LI2_8
T_LI3_16
T_LI3_8
T_LI4_16
T_LI4_8
T_LI5_16
T_LI5_8
T_LOAD_IND
T_LOC_ABS
T_LOC_REL
T_LOR
T_LSL
T_LSR
T_LT
T_LTEST
T_LWRD
T_LXOR
T_MINUS
T_MOD
T_MUL
T_NE
T_NEG
T_NOT
T_ORG
T_ORG_ABS
T_ORG_REL
T_ORG_REL1
T_PLUS
T_POP_16

Date

Revision

2005-04-15

Relocation
Relocation
Relocation
Relocation
Symbol handling
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Link time checking
Relocation
Static overlay
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Symbol handling
Symbol handling
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Segment part handling
Segment part handling
Segment part handling
Segment part handling
Relocation
Relocation

IAR Systems AB

Page

5(7)
Prepared By

T_POP_24
T_POP_32
T_POP_8
T_PRM_ARG_BL
T_PRM_ARG_BL51
T_PUB_ABS
T_PUB_REL
T_PUSH_ABS
T_push_DAY
T_PUSH_EXT
T_push_HOUR
T_PUSH_IFN
T_PUSH_IFN51
T_push_MINUTE
T_push_MONTH
T_PUSH_PCR
T_PUSH_PRM_ARG_BL
T_PUSH_REL
T_push_SECOND
T_PUSH_SFB
T_PUSH_SFE
T_push_YEAR
T_QUEST
T_QUEST_VAR
T_REF_FN
T_REF_FN51
T_REF_FNT
T_REL_24
T_REL_32
T_REL_FI_8
T_REL_N16
T_REL_N8
T_REL_NPCREL
T_REL_P16
T_REL_P8
T_REL_PPCREL
T_REL_S86
T_SCOPED_NAME
T_SEG
T_SEG_ABS
T_SEG_COM
T_SEG_INFO
T_SEG_REL
T_SEG_STK
T_SFB_24
T_SFB_32
T_SFB_N16
T_SFB_N8
T_SFB_NPCREL
T_SFB_P16
T_SFB_P8
T_SFB_PPCREL
T_SFE_24
T_SFE_32
T_SFE_N16
T_SFE_N8

Date

Revision

2005-04-15

Relocation
Relocation
Relocation
Relocation
Relocation
Symbol handling
Symbol handling
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Symbol handling (and type information)
Segment part handling
Segment part handling
Segment part handling
Segment part handling
Segment part handling
Segment part handling
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Relocation

IAR Systems AB

Page

6(7)
Prepared By

T_SFE_NPCREL
T_SFE_P16
T_SFE_P8
T_SFE_PPCREL
T_SHL
T_SHR
T_SRC_CALL
T_stack_error
T_STORE_IND
T_SUB_DEF_FRAME_SIZE
T_SUB_DEF_FRAME_SIZE1
T_SUB_DEF_FUNC
T_SUB_DEF_STAT_ARGS
T_SUB_DEF_STAT_LOCS
T_SUB_DEF_USEAGE
T_SUB_DEF_XFUNC
T_SWAP
T_SYMBOL_DEF
T_SYMBOL_DEF1
T_SYMBOL_DEF2
T_TYPE
T_UGE
T_UGT
T_ULE
T_ULT
T_XDEF_FN_51
T_XOR

2.2

Date

Revision

2005-04-15

Relocation
Relocation
Relocation
Relocation
Relocation
Relocation
Static overlay
Relocation
Relocation
Static overlay
Static overlay
Static overlay
Static overlay
Static overlay
Static overlay
Static overlay
Relocation
Symbol handling
Symbol handling
Symbol handling
Symbol handling for some C++ symbols and type information
Relocation
Relocation
Relocation
Relocation
Static overlay
Relocation

Supplementary Record Types

The content and order of the following record types cannot affect the final application code:
Record Type
T_ATTR_NAME
T_AUX
T_AUX_1
T_BEG_FILE
T_BEG_FILE1
T_BEG_LIB
T_BEG_PGM
T_BLOCK_BEGIN
T_BLOCK_BEGIN1
T_BLOCK_BEGIN2
T_BLOCK_BEGIN3
T_BLOCK_END
T_CALL_FRAME_INFO
T_COUNT
T_DEBUG
T_DEF_PTR_TYPES
T_END
T_FILE
T_FILE_REF
T_FUNC_BEGIN
T_FUNC_BEGIN1
T_FUNC_BEGIN2

Purpose
Type information
Build information
Build information
File structure
File structure
File structure
File structure
Debug information
Debug information
Debug information
Debug information
Debug information
Call stack information
File structure
Build information
Type information
File structure
Debug information
Debug information
Debug information
Debug information
Debug information

IAR Systems AB

Page

7(7)
Prepared By

T_GRP
T_GRP_REF
T_MACRO
T_MEM_INFO
T_NEW_FILE
T_RESOURCE_TUPLE
T_SIZE_TYPE
T_SOURCE_LINE_SEQUENCE
T_SOURCE_RANGE
T_SOURCE_RANGE1
T_SRC_STAT
T_STATEMENT_INFO
T_SUB_DEF_OBJ_ATTR
T_UBROF_EOF
T_VERSION

Date

Revision

2005-04-15

Debug information
Debug information
Debug information
Type information
Debug information
Debug information
Type information
Debug information
Debug information
Debug information
Debug information
Debug information
Debug information
File structure
Build information

Anda mungkin juga menyukai