Everything

-lib_rename [V3.01.00 or later]


< Optimizing Linkage Editor (rlink) Options / Other Options >

[Format]

-lib_rename = <name1>=<name2>[,...]
-lib_rename = <file>(<name1>=<name2>[,...])
-lib_rename = "<file>|<module>[|<module>...](<name1>=<name2>[,...])"

[Description]

-

This option changes the name of global symbol or section included in a module within the library that was specified by the -library option.

-

Specify the symbol name or section name to be changed as <name 1>. Specify the symbol name or section name after the change as <name 2>.

-

When a C variable name is specified, add prefix "_" to the definition name in the program.

-

If the specified name matches both section and symbol names, the symbol name is changed.

-

If there are two or more files or modules with the same name, the priority depends on the input order.

-

If this option is specified more than once, all specifications will be valid.

-

An error will occur in any of the following cases.

-

When the specified <name>, <file>, or <module> cannot be found

-

When the parameter is omitted

[Examples]

-

To change "_sym1" in b.lib and c.lib to "_data", describe as:

> rlink a.obj -lib=b.lib,c.lib  -lib_rename=(_sym1=_data)

-

To change "_sym1" in all modules in b.lib to "_data", describe as:

> rlink a.obj -lib=b.lib,c.lib  -lib_rename=b.lib(_sym1=_data)

-

To change "_sym1" in modules m1 and m2 in b.lib to "_data", describe as:

> rlink a.obj -lib=b.lib,c.lib  -lib_rename="b.lib|m1|m2(_sym1=_data)"

[Remarks]

-

If this option is specified together with the -form={object|library}, -extract, or -strip option, an error will occur.

-

When the -form={absolute|hexadecimal|stype|binary} option is specified, the -show=struct option cannot be specified together. Thus, the section name of the input library cannot be changed.

-

Correct operation is not guaranteed if this option is used in combination with the compiler option -merge_files.