foo override patch for emit_library_call() in expand_main_function()

Jeffrey A Law law@cygnus.com
Wed Nov 10 23:08:00 GMT 1999


  In message < 19991110000656.V48063@relay.nuxi.com >you write:
  > Correct.  This is needed for our native dual ELF/a.out support.  With
  > "-aout" in affect, we need the call to emit_library_call(), else we
  > don't.  The definition we use is:
  > 
  > #define GEN_CALL__MAIN \
  >   do {                                                                  \
  >     if (!(TARGET_ELF))                                                  \
  >       emit_library_call (gen_rtx (SYMBOL_REF, Pmode, NAME__MAIN), 0,    \
  >                          VOIDmode, 0);                                  \
  >   } while (0)
  > 
  > 
  > Of course I'm open to other ways of controling this.  We must continue to
  > support a.out compliation for as long as Netscape for FreeBSD is in the
  > a.out format (for plug-in's etc.).  However I didn't consider most of our
  > hacks to support dual ELF/a.out to be of interest to the GCC development
  > team.
We're not generally interested in being able to have a single compiler
switch modes like that.  It's far easier for you to provide two compilers
and two drivers.  That's the standard way to deal with this kind of issue.

If you really want to be able to switch between ELF & a.out, the problem is
far more involved and you're just barely scratching the surface.

jeff



More information about the Gcc-patches mailing list