#pragma REALLOC_OBJ: Object Reallocation

Scope

Compilation Unit

Syntax
  #pragma REALLOC_OBJ "segment" ["objfile"] object qualifier 
  
Arguments

segment: Name of an already existing segment. This name must have been previously used by a segment pragma ( DATA_SEG, CODE_SEG, CONST_SEG, or STRING_SEG).

objfile: Name of a object file. If specified, the object is assumed to have static linkage and to be defined in objfile. The name must be specified without alteration by the qualifier __namemangle.

object: Name of the object to be reallocated. Here the name as known to the Linker has to be specified.

qualifier: One of the following:

Some of the qualifiers are only allowed to backends not supporting a specified qualifier generating this message. With the special __namemangle qualifier, the link name is changed so that the name of the reallocated object does not match the usual name. This feature detects when a REALLOC_OBJ pragma is not applied to all uses of one object.

Default

None

Description

This pragma reallocates an object (e.g., affecting its calling convention). This is used by the linker if the linker has to distribute objects over banks or segments in an automatic way (code distribution). The linker is able to generate an include file containing #pragma REALLOC_OBJ to tell the compiler how to change calling conventions for each object. See the Linker manual for details.

Example

The following listing uses the REALLOC_OBJ pragma to reallocate the evaluate.o object file.

Listing: Using the REALLOC_OBJ pragma to reallocate an object


#pragma REALLOC_OBJ "DISTRIBUTE1" ("evaluate.o") Eval_Plus __near 
 __namemangle 
See also

Message C420 in the Online Help

Linker section of the Build Tools manual