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]

Re: Target hook for ASM_FILE_END


Zack Weinberg <zack@codesourcery.com> writes:
> I *think* that a suitable fix is to do the file switching in the
> section-switching routines, and only when necessary.  Such a change
> would be beyond me, however, since I am not deeply familiar with the
> MIPS back end.  Another possibility, perhaps less invasive, is to add
> a target hook to assemble_end_function.

FWIW, I'd prepared a patch to remove TARGET_FILE_SWITCHING as one
possible fix for target/10913.  At the time I thought that that was
going too far, but from what you say, it sounds like it might not
have been.  The code seems to be in such bad shape that I can't
believe it's in active use.

As I understand it:

  - The code is only used for assemblers other than gas.

  - The only assemblers we support are gas and SGI's.
    (Comments in the port refer to MIPS' assembler, but most
    non-irix configuration will uncerimoniously abort when
    passed -mmips-as -O[123].)

  - The code is only used for -non_shared.

  - The irix configurations don't build -non_shared libraries
    by default.  You would have to hack the config files to
    get a libgcc that was usable with -non_shared.

  - Now that we use explicit relocation operators for n32 & n64,
    the code would only be needed for o32.

  - gas works fine for o32 on irix.

The hack is still needed if you want to do gp optimisations on
-non_shared o32 code with SGI's assembler.  But given the above,
it's probably better not to try.

I'll dust off the patch and submit it later...

> I would like to go ahead and apply my patch anyway; this bug is
> clearly not caused by it, nor does it make it any worse (we'll now
> get assembler errors instead of a cc1 fatal error).  Objections?

None here. ;)

Richard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]