Robert McConnell
2013-09-22 02:32:56 UTC
While trying to track down a particularly elusive bug I found that the
bug disappeared when I forced a link to a certain otherwise unneeded
library I had created. The functions in the unneeded library were never
used but examination of the map showed that they in turn caused about 32
additional functions to be linked from the OW libraries.
In pursuit of the bug I'd like to see whether just the act of linking
the functions from the OW library without the unneeded library will
either cause the bug to disappear or show it is related to my own library.
According to the (1996) Watcom Linker User's Guide the REFERENCE
directive can force a library module to link. Since I am using the OW
1.9 IDE, I edited the corresponding automatically created .lk1 file
which was:
FIL dtsplot_d.obj
LIBR ..\dtsutil.lib,dtsplotlib.lib,dtsuilib.lib,numdatlib.lib
RES dtsplot_d.res
and added a line so it became
FIL dtsplot_d.obj
LIBR ..\dtsutil.lib,dtsplotlib.lib,dtsuilib.lib,numdatlib.lib
RES dtsplot_d.res
REF printf
The objective was to force printf, one of the additional functions
linked together with my extraneous library, to be linked without the use
of said extraneous library. If that worked, I planned to load about half
of the 32 OW functions at a time to start do a binary search to see
whether one particular function is responsible for the effect.
Unfortunately printf still does not appear in the map. Either I don't
understand what REF is supposed to do, I'm not using it properly, or it
does not work as specified since
Any help would be appreciated.
Thanks,
-rob
bug disappeared when I forced a link to a certain otherwise unneeded
library I had created. The functions in the unneeded library were never
used but examination of the map showed that they in turn caused about 32
additional functions to be linked from the OW libraries.
In pursuit of the bug I'd like to see whether just the act of linking
the functions from the OW library without the unneeded library will
either cause the bug to disappear or show it is related to my own library.
According to the (1996) Watcom Linker User's Guide the REFERENCE
directive can force a library module to link. Since I am using the OW
1.9 IDE, I edited the corresponding automatically created .lk1 file
which was:
FIL dtsplot_d.obj
LIBR ..\dtsutil.lib,dtsplotlib.lib,dtsuilib.lib,numdatlib.lib
RES dtsplot_d.res
and added a line so it became
FIL dtsplot_d.obj
LIBR ..\dtsutil.lib,dtsplotlib.lib,dtsuilib.lib,numdatlib.lib
RES dtsplot_d.res
REF printf
The objective was to force printf, one of the additional functions
linked together with my extraneous library, to be linked without the use
of said extraneous library. If that worked, I planned to load about half
of the 32 OW functions at a time to start do a binary search to see
whether one particular function is responsible for the effect.
Unfortunately printf still does not appear in the map. Either I don't
understand what REF is supposed to do, I'm not using it properly, or it
does not work as specified since
Any help would be appreciated.
Thanks,
-rob