Microchip Technology SW006021-1N ユーザーズマニュアル
Utilities
2012 Microchip Technology Inc.
DS52053B-page 293
The o key takes a list of module names and re-orders the matching modules in the
library file so that they have the same order as the one listed on the command line.
Modules that are not listed are left in their existing order, and will appear after the
re-ordered modules.
library file so that they have the same order as the one listed on the command line.
Modules that are not listed are left in their existing order, and will appear after the
re-ordered modules.
8.2.2.1
EXAMPLES
Here are some examples of usage of the librarian. The following command:
LIBR s pic-stdlib-d24.lpp ctime.p1
lists the global symbols in the modules ctime.p1, as shown here:
ctime.p1 D _moninit
D _localtime
D _gmtime
D _asctime
D _ctime
The D letter before each symbol indicates that these symbols are defined by the
module.
module.
Using the command above without specifying the module name will list all the symbols
defined (or undefined) in the library.
defined (or undefined) in the library.
The following command deletes the object modules a.obj, b.obj and c.obj from
the library lcd.lib:
the library lcd.lib:
LIBR d lcd.lib a.obj b.obj c.obj
8.2.3
Supplying Arguments
Since it is often necessary to supply many object file arguments to LIBR, arguments
will be read from standard input if no command-line arguments are given. If the
standard input is attached to the console, LIBR will prompt for input.
will be read from standard input if no command-line arguments are given. If the
standard input is attached to the console, LIBR will prompt for input.
Multiple line input may be given by using a backslash as a continuation character on
the end of a line. If standard input is redirected from a file, LIBR will take input from the
file, without prompting. For example:
the end of a line. If standard input is redirected from a file, LIBR will take input from the
file, without prompting. For example:
libr
libr> r file.lib 1.obj 2.obj 3.obj \
libr> 4.obj 5.obj 6.obj
will perform much the same as if the object files had been typed on the command line.
The libr> prompts were printed by LIBR itself, the remainder of the text was typed
as input.
The libr> prompts were printed by LIBR itself, the remainder of the text was typed
as input.
libr <lib.cmd
LIBR
will read input from lib.cmd, and execute the command found therein. This
allows a virtually unlimited length command to be given to LIBR.
8.2.4
Ordering of Libraries
The librarian creates libraries with the modules in the order in which they were given
on the command line. When updating a library the order of the modules is preserved.
Any new modules added to a library after it has been created will be appended to the
end.
on the command line. When updating a library the order of the modules is preserved.
Any new modules added to a library after it has been created will be appended to the
end.
The ordering of the modules in a library is significant to the linker. If a library contains
a module which references a symbol defined in another module in the same library, the
module defining the symbol should come after the module referencing the symbol.
a module which references a symbol defined in another module in the same library, the
module defining the symbol should come after the module referencing the symbol.