5.1B bug/feature with ld?

From: Andrew Gallatin (gallatin@cs.duke.edu)
Date: Tue Feb 04 2003 - 13:56:44 EST


I'm trying to build a local kernel module which has worked fine with
all previous versions of osf/1.

5.1B's ld seem to have its own special idea of how to link things. If a
library is involved, it will make a reference to the following symbols:
__exc_add_gp_range
__exc_add_pc_range_table
__exc_remove_gp_range
__exc_remove_pc_range_table

All of these are defined in libc, which is not good if you're building
a kernel module. Eg:

% ld -dc -r -o my.mod drivers/gm_uc_k.o zlib/libz.a
% nm my.mod | grep __exc_add_gp
__exc_add_gp_range | 0000000000000000 | U | 0000000000000000

Using the old LD works fine:

% ~/ld.5.1 -dc -r -o my.mod drivers/gm_uc_k.o zlib/libz.a
% nm my.mod | grep __exc_add_gp
%

The symbols are NOT in the .o or library files:

% nm drivers/gm_uc_k.o zlib/libz.a | grep __exc
%

But that string does appear in ld:

% strings /usr/ccs/bin/ld | grep __exc
__exc_remove_gp_range
__exc_remove_pc_range_table
__exc_add_gp_range
__exc_add_pc_range_table

Does anybody know of any flags to ld to make it not reference those
extranious symbols?

Thanks,

Drew



This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 10:49:06 EDT