This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Fix invalid loader fixups from shared libobjc with hpux10.20
- To: shebs at apple dot com (Stan Shebs)
- Subject: Re: PATCH: Fix invalid loader fixups from shared libobjc with hpux10.20
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Thu, 14 Jun 2001 17:57:15 -0400 (EDT)
- Cc: law at redhat dot com, gcc-patches at gcc dot gnu dot org
>
> law@redhat.com wrote:
> >
> > > 2001-05-31 John David Anglin <dave@hiauly1.hia.nrc.ca>
> > >
> > > * objc/objc-act.c (handle_class_ref): Use rest_of_decl_compilation
> > > so that CHOOSE_SECTION gets used.
> > > (handle_impent): Use assemble_variable to put the global objc class
> > > and category name labels in the readonly data section.
> > It's certainly wrong for a front-end to blindly dump something into the
> > readonly_data_section. At the least it should be deferring to the routines
> > in varasm.c to select the proper section.
Regarding Jeff's comment, assemble_variable doesn't blindly dump into
the readonly_data_section section. It calls variable_section which
selects the correct section. It uses DECL_READONLY_SECTION to check
whether the decl is appropriate for the readonly_data_section when
SELECT_SECTION isn't defined. The PA uses DECL_READONLY_SECTION.
In this particular case, we have a char_type_node with
DECL_INITIAL (decl) = error_mark_node. On the PA, this in fact always
gets put into the readonly_data_section. The same happens in C++.
The ChangeLog entry doesn't fully reflect what happens and possibly
it should be changed.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)