It's because the imports.lst has I_iop_dbg_get_reg_frames listed as an imported symbol which isn't prepared as an imported symbol in "iopdebug.h" using DECLARE_IMPORT. Instead the name is treated as a variable definition with no type which wrecks the import table.
Code: Select all
static struct irx_import_table _imp_iopdebug __attribute__((section(".text\n\t#"), unused))= { magic: 0x41e00000, version: ((((1) & 0xff) << 8) + ((1) & 0xff)), name: "iopdebug", };
__asm__ (".section\t.text\n\t" ".globl\t""iop_dbg_set_handler""\n\t""iop_dbg_set_handler"":\n\t" ".word 0x3e00008\n\t" ".word ""0x24000000|8");
I_iop_dbg_get_reg_frames
__asm__ (".section\t.text\n\t.word\t0, 0");
which produces
Code: Select all
.comm .section .text
.word 0, 0,4,4
The END_IMPORT_TABLE macro is inserted within the variable's definition, though.
Here's what it kind of should come out as. I left the symbol name blank, but the .comm directive's attributes are name,size,alignment. A single integer is 4 bytes with a 4 byte alignment.
Code: Select all
.comm 4,4
.section .text
.word 0, 0
The last two statements are inserted by END_IMPORT_TABLE.
I'm not sure why cheriff had his original problem, though. Perhaps a whitespace problem or something specific with his code.