This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Fri, Jul 09, 2004 at 01:54:29PM -0700, Richard Henderson wrote: > On Fri, Jul 09, 2004 at 11:31:28AM -0700, H. J. Lu wrote: > > - if (!(flags & SECTION_DEBUG)) > > - *f++ = 'a'; > > - if (flags & SECTION_WRITE) > > - *f++ = 'w'; > > - if (flags & SECTION_CODE) > > - *f++ = 'x'; > > - if (flags & SECTION_SMALL) > > - *f++ = 's'; > > - if (flags & SECTION_MERGE) > > - *f++ = 'M'; > > - if (flags & SECTION_STRINGS) > > - *f++ = 'S'; > > - if (flags & SECTION_TLS) > > - *f++ = 'T'; > > - *f = '\0'; > > I think you most certainly do not want to be pulling out the flags > as a string into the caller. They do not line up 100% between the > targets. I changed readonly_data_section_in_function_group to call named_section_flags instead. > > > +#ifdef HAVE_GAS_COMDAT_GROUP > > +#define PUT_JUMP_TABLES_IN_TEXT_SECTION JUMP_TABLES_IN_TEXT_SECTION > > +#else > > +#define PUT_JUMP_TABLES_IN_TEXT_SECTION \ > > + (JUMP_TABLES_IN_TEXT_SECTION || DECL_ONE_ONLY (current_function_decl)) > > +#endif > > I think the !COMDAT case is wrong. > > Suppose SUPPORTS_ONE_ONLY is false, but SUPPORTS_WEAK is true. In that > case we don't actually have to worry about what section jump tables go in. > > Suppose it's a strict harvard architecture machine. In which case you > can't go putting *any* data in the text section. > > I think the only workable solution is to put all the private read-only > data for a function in an rodata linkonce section for the function. OK. > > > +#ifdef READONLY_DATA_SECTION_IN_FUNCTION_GROUP > > + READONLY_DATA_SECTION_IN_FUNCTION_GROUP (decl); > > +#else > > Now I think you're inventing macros that no one will ever use. Removed. Here is the new patch. H.J.
Attachment:
gcc-3.4-comdat-9.patch
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |