Commit 62f09401 authored by Raymond Toy's avatar Raymond Toy
Browse files

Make all labels global and assign a section name.

Every label is now a global symbol.

Prepend each output file with a .section to name the section we're
creating.
parent 6072cf3f
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -415,7 +415,8 @@ static char* asmtab_types[256];
void
asm_label(lispobj* ptr, lispobj object, FILE* f) 
{
    fprintf(f, "L%lx:\n", (unsigned long) ptr);
    fprintf(f, "\t.global\tL%08lx\n", (unsigned long) ptr);
    fprintf(f, "L%08lx:\n", (unsigned long) ptr);
}

void
@@ -1366,6 +1367,9 @@ write_asm_object(const char *dir, int id, os_vm_address_t start, os_vm_address_t
    lispobj* ptr = (lispobj*) start;
    lispobj* end_ptr = (lispobj*) end;

    /* Set the section name */
    fprintf(f, "\t.section\t\"space%d\", \"wx\"\n", id);
    
    /*
     * If the id is the static space, we need special handling for
     * beginning which has NIL in a funny way to make NIL a symbol and