From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Klein To: law@cygnus.com Cc: gcc@gcc.gnu.org Subject: Re: MPE Port Date: Sun, 31 Oct 1999 23:35:00 -0000 Message-ID: <4.2.0.58.19991014070452.00aecef0@209.60.244.235> References: <4.2.0.58.19991009200725.00c5a100@garfield.dis.com> <30257.939898754@upchuck.cygnus.com> X-SW-Source: 1999-10n/msg00293.html Message-ID: <19991031233500.-j8iaVASYZfHhTBgo4YaaUnBOjMpdhNuoYOXcKbYr94@z> At 04:59 AM 10/14/99 -0600, Jeffrey A Law wrote: ^^^^^ Late night, huh? :-) >I can't stress enough that it is totally wrong for us to try and do this >within GCC. I don't see how this is any different than the following code that is already in GCC: /* We want __gcc_plt_call to appear in every program built by gcc, so we make a reference to it out of __main. We use the asm statement to fool the optimizer into not removing the dead (but important) initialization of REFERENCE. */ #define DO_GLOBAL_DTORS_BODY \ do { \ extern void __gcc_plt_call (); \ void (*reference)() = &__gcc_plt_call; \ func_ptr *p; \ __asm__ ("" : : "r" (reference)); \ for (p = __DTOR_LIST__ + 1; *p; ) \ (*p++) (); \ } while (0) If you change "__gcc_plt_call" to "__MPE_arm_subsystem_break", what's the rationale for doing one, but not the other? gcc provides it's own __main and by so doing, eliminates certain functionality expected by the system __main. Why is it not appropriate for gcc to replace functionality that it eliminates? Regards, M. -- Mark Klein DIS International, Ltd. http://www.dis.com 415-892-8400 PGP Public Key Available --