The ghide Utility Program modifies the symbol table of an object file to convert all global symbols to local symbols, except for a specified retain list of global symbols which remain global.
-help Display information about all options.
retain_list File containing symbol names separated by white spaces, which are spaces, tabs, or new line characters.
object_file Output of an assembler or linker. It may be either relocatable or not relocatable, but it should contain a symbol table, otherwise ghide will have no effect.
The ghide Utility Program modifies the symbol table of file object_file so that all global symbols in object_file not listed in retain_list become local. The retain_list file contains the global symbols in object_file to be retained.
An embedded application system consists of a kernel and several application tasks, all developed independently. Some global functions in the kernel are for kernel use only. Other global kernel functions can be called from the application tasks. First the kernel is linked into a single file using the linker's -r option to retain relocation information. Then, ghide is run on the kernel using a list of the functions which should remain visible to the application tasks. Finally, the application tasks are linked with the kernel file, producing a complete executable file. The use of ghide ensures that only the desired global symbols in the kernel are visible to the application tasks. This also prevents duplicate symbol errors in the linker if any application should happen to have a global symbol with the same name as an internal kernel-only function.