From: jesusc Date: Sun, 8 Feb 2004 19:13:51 +0000 (+0000) Subject: doc/sdccman.lyx: added section 3.14 about sdcclib X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=ac81da42b5f05c552a246c75910b68f8bd05b49c;p=fw%2Fsdcc doc/sdccman.lyx: added section 3.14 about sdcclib git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3181 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index 7f668b65..0859f0d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-02-08 Jesus Calvino-Fraga + + * doc/sdccman.lyx: added section 3.14: sdcclib. + 2004-02-08 Frieder Ferlemann * device/include/c8051f120.h, diff --git a/doc/sdccman.lyx b/doc/sdccman.lyx index 5e567b84..147338f1 100644 --- a/doc/sdccman.lyx +++ b/doc/sdccman.lyx @@ -1718,10 +1718,10 @@ Install paths \begin_inset Tabular - - - - + + + + \begin_inset Text @@ -4566,6 +4566,243 @@ The most efficient way to use libraries is to keep separate modules in separate libsdcc.lib \emph default in the directory /share/lib/small. +\layout Subsection + +Using sdcclib to Create and Manage Libraries +\begin_inset LatexCommand \index{sdcclib} + +\end_inset + + +\layout Standard + +Alternatively, instead of having a .rel file for each entry on the library + file as described in the preceding section, sdcclib can be used to embed + all the modules belonging to such library in the library file itself. + This results in a larger library file, but it greatly reduces the number + of disk files accessed by the linker. + Additionally, the packed library file contains an index of all include + modules and symbols that significantly speeds up the linking process. + To display a list of options supported by sdcclib type: +\newline + +\layout Standard + + +\family sans +\series bold +sdcclib -? +\begin_inset LatexCommand \index{sdcclib} + +\end_inset + + +\newline + +\newline + +\family default +\series default +To create a new library file, start by compiling all the required modules. + For example: +\newline + +\layout Standard + + +\series bold +sdcc -c _divsint.c +\layout Standard + + +\series bold +sdcc -c _divuint.c +\layout Standard + + +\series bold +sdcc -c _modsint.c +\layout Standard + + +\series bold +sdcc -c _moduint.c +\layout Standard + + +\series bold +sdcc -c _mulint.c +\newline + +\layout Standard + +This will create files _divsint.rel, _divuint.rel, _modsint.rel, _moduint.rel, + and _mulint.rel. + The next step is to add the .rel files to the library file: +\newline + +\layout Standard + + +\series bold +sdcclib libint.lib _divsint.rel +\begin_inset LatexCommand \index{sdcclib} + +\end_inset + + +\layout Standard + + +\series bold +sdcclib libint.lib _divuint.rel +\layout Standard + + +\series bold +sdcclib libint.lib _modsint.rel +\layout Standard + + +\series bold +sdcclib libint.lib _moduint.rel +\layout Standard + + +\series bold +sdcclib libint.lib _mulint.rel +\series default + +\newline + +\layout Standard + +If the file already exists in the library, it will be replaced. + To see what modules and symbols are included in the library, options -s + and -m are available. + For example: +\newline + +\newline + +\series bold +sdcclib -s libint.lib +\begin_inset LatexCommand \index{sdcclib} + +\end_inset + + +\newline +_divsint.rel: +\layout Standard + + +\series bold +__divsint_a_1_1 +\layout Standard + + +\series bold +__divsint_PARM_2 +\layout Standard + + +\series bold +__divsint +\newline +_divuint.rel: +\layout Standard + + +\series bold +__divuint_a_1_1 +\layout Standard + + +\series bold +__divuint_PARM_2 +\layout Standard + + +\series bold +__divuint_reste_1_1 +\layout Standard + + +\series bold +__divuint_count_1_1 +\layout Standard + + +\series bold +__divuint +\newline +_modsint.rel: +\layout Standard + + +\series bold +__modsint_a_1_1 +\layout Standard + + +\series bold +__modsint_PARM_2 +\layout Standard + + +\series bold +__modsint +\newline +_moduint.rel: +\layout Standard + + +\series bold +__moduint_a_1_1 +\layout Standard + + +\series bold +__moduint_PARM_2 +\layout Standard + + +\series bold +__moduint_count_1_1 +\layout Standard + + +\series bold +__moduint +\newline +_mulint.rel: +\layout Standard + + +\series bold +__mulint_PARM_2 +\layout Standard + + +\series bold +__mulint +\newline + +\layout Standard + +If the source files are compiled using --debug, the corresponding debug + information file .adb will be include in the library file as well. + The library files created with sdcclib are plain text files, so they can + be viewed with a text editor. + It is not recomended to modify a library file created with sdcclib using + a text editor, as there are file indexes numbers located accross the file + used by the linker to quickly locate the required module to link. + Once a .rel file (as well as a .adb file) is added to a library using sdcclib, + it can be safely deleted, since all the information required for linking + is embedded in the library file itself. + Library files created using sdcclib are used as described in the preceding + sections. \layout Section Command Line Options @@ -11957,8 +12194,8 @@ For signed & unsigned int (16 bit) and long (32 bit) variables, division, \begin_inset Tabular - - + + \begin_inset Text @@ -12251,8 +12488,8 @@ SDCC supports IEEE (single precision 4 bytes) floating point numbers.The \begin_inset Tabular - - + + \begin_inset Text @@ -13574,8 +13811,8 @@ The compiler creates the following #defines \begin_inset Tabular - - + + \begin_inset Text @@ -15649,7 +15886,7 @@ Documentation \begin_inset Tabular - +