Solaris, Objective-C, and shared libraries
Jeffrey A Law
law@cygnus.com
Mon Sep 15 10:45:00 GMT 1997
Just a note, bugs should be sent to egcs-bugs@cygnus.com
In message <Pine.NEB.3.96.970911162048.9074V-100000@water.waterw.com>you write:
> My question is whether or not this bug still exists in egcs
> for Solaris (I don't have free reign on a Solaris box to
> experiment).
Yes, this bug still exists in egcs.
> I think that ___objc_class_name_Object is put into the
> .text section in objc-act.c in the handle_class_ref function by
> code that looks like so:
>
> >>
> /* Make following constant read-only (why not)? */
> readonly_data_section ();
> <<
>
> which I think should be data_section() instead...
It certainly shouldn't be data_section!
Seems to me it should be calling one of the various other functions
in varasm instead of readonly_data_section directly.
Like variable_section or assemble_variable. It would take some tweaking
of the objc-act.c code, but it shouldn't be all that hard.
That code all looks pretty bogus to begin with; I think it should build
up a VAR_DECL for the constant itself, set TREE_READONLY to one, then
call into assemble_variable. You can then get rid of the gunk to align
the section, and output of the constant (you still need the assemble_external).
Can you do this, test it and send me the patch?
Jeff
More information about the Gcc-bugs
mailing list