|
|
GNU tools for NeXTSTEP 3.3
/* next.c: Functions for NeXT as target machine for GNU C compiler. */
/* Note that the include below means that we can't debug routines in
i386.c when running on a COFF system. */
#include "i386/i386.c"
#include "nextstep.c"
void
machopic_output_stub (file, symb, stub)
FILE *file;
const char *symb, *stub;
{
static int label = 0;
label += 1;
if (MACHOPIC_PURE)
machopic_picsymbol_stub_section ();
else
machopic_symbol_stub_section ();
fprintf (file, "%s:\n", stub);
fprintf (file, "\t.indirect_symbol %s\n", symb);
if (MACHOPIC_PURE)
{
fprintf (file, "\tcall LPC$%d\nLPC$%d:\tpopl %%eax\n", label, label);
fprintf (file, "\tmovl L%s$lazy_ptr-LPC$%d(%%eax),%%edx\n", symb, label);
fprintf (file, "\tjmp %%edx\n");
}
else
{
fprintf (file, "\tjmp *L%s$lazy_ptr\n", symb);
}
fprintf (file, "%s_binder:\n", stub);
if (MACHOPIC_PURE)
{
fprintf (file, "\tlea L%s$lazy_ptr-LPC$%d(%%eax),%%eax\n", symb, label);
fprintf (file, "\tpushl %%eax\n");
}
else
{
fprintf (file, "\t pushl $L%s$lazy_ptr\n", symb);
}
fprintf (file, "\tjmp dyld_stub_binding_helper\n");
machopic_lazy_symbol_ptr_section ();
fprintf (file, "L%s$lazy_ptr:\n", symb);
fprintf (file, "\t.indirect_symbol %s\n", symb);
fprintf (file, "\t.long %s_binder\n", stub);
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.