how to fix linker message with shared libobjc library?

H . J . Lu hjl@lucon.org
Sun Aug 6 23:23:00 GMT 2000


On Sun, Aug 06, 2000 at 12:35:05PM -0700, Ovidiu Predescu wrote:
> 
> Hi,
> 
> I get the following warning from the linker whenever I try linking a program 
> against the shared version of libobjc:
> 
> /usr/bin/ld: warning: type and size of dynamic symbol 
> `__objc_class_name_NXConstantString' are not defined
> 
> Such a warning is issued by the linker when compiling string{1,2}.m in the
> testsuite directory for Objective-C.
> 
> This message doesn't appear when I link against the static version of the
> library. Does anybody know how to eliminate the warning message?

I think it is a bug in the Objective-C compiler. For ABIs with the
copy relocation, like ia32, a dynamic data symbol may have to have
size and type to work correctly. The Objective-C compiler should
either don't generate __objc_class_name_NXConstantString or output

	.type	__objc_class_name_NXConstantString,@object
__objc_class_name_NXConstantString:
.L???:
	....
	.size	__objc_class_name_NXConstantString,.L???-__objc_class_name_NXConstantString


H.J.


More information about the Gcc mailing list