Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions iop/Rules.make
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ ifeq ($(IOP_LINKFILE),)
IOP_LINKFILE := $(PS2SDKSRC)/iop/startup/src/linkfile
endif

# If this build produces an exports.o, ensure it is linked first so the
# export-table object occupies .text offset 0 (helps srxfixup detection).
IOP_OBJS := $(filter exports.o,$(IOP_OBJS)) $(filter-out exports.o,$(IOP_OBJS))

IOP_OBJS := $(IOP_OBJS:%=$(IOP_OBJS_DIR)%)

IOP_BIN_ELF := $(IOP_BIN:.irx=.notiopmod.elf)
Expand Down
7 changes: 4 additions & 3 deletions iop/iLink/iLinkman/src/exports.tab
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
void _funcret(){};

DECLARE_EXPORT_TABLE(iLinkman, 1, 1)
DECLARE_EXPORT(_start) /* 000 */
DECLARE_EXPORT(_funcret)
DECLARE_EXPORT(_retonly)
DECLARE_EXPORT(_exit) /* 002 */
DECLARE_EXPORT(_funcret) /* 003 */
DECLARE_EXPORT(_retonly) /* 003 */
DECLARE_EXPORT(iLinkEnableSBus) /* 004 */
DECLARE_EXPORT(iLinkDisableSBus) /* 005 */
DECLARE_EXPORT(iLinkResetSBus) /* 006 */
Expand All @@ -28,3 +27,5 @@ DECLARE_EXPORT_TABLE(iLinkman, 1, 1)
DECLARE_EXPORT(iLinkReadCROM) /* 024 */
DECLARE_EXPORT(iLinkGetLocalNodeEUI64) /* 025 */
END_EXPORT_TABLE

void _retonly(){};
7 changes: 4 additions & 3 deletions iop/security/secrman/src/exports.tab
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
void _funcret(){};

// El_isra: this was 0x1, 0x3 originally. but the IRX_ID macro on source code has 0x1, 0x4. just like arcade SECRMAN...
DECLARE_EXPORT_TABLE(secrman, 0x01, 0x04)
DECLARE_EXPORT(_start)
DECLARE_EXPORT(_funcret)
DECLARE_EXPORT(_retonly)
DECLARE_EXPORT(_exit)
DECLARE_EXPORT(_funcret)
DECLARE_EXPORT(_retonly)
DECLARE_EXPORT(SecrSetMcCommandHandler) /* 004 */
DECLARE_EXPORT(SecrSetMcDevIDHandler) /* 005 */
DECLARE_EXPORT(SecrAuthCard) /* 006 */
Expand All @@ -26,3 +25,5 @@ DECLARE_EXPORT_TABLE(secrman, 0x01, 0x04)
DECLARE_EXPORT(SecrAuthDongle) /* 020 */
#endif
END_EXPORT_TABLE

void _retonly(){};
9 changes: 5 additions & 4 deletions iop/security/secrsif/src/exports.tab
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
void _funcret(){};

DECLARE_EXPORT_TABLE(secrsif, 1, 1)
DECLARE_EXPORT(_start)
DECLARE_EXPORT(_funcret)
DECLARE_EXPORT(_funcret)
DECLARE_EXPORT(_funcret)
DECLARE_EXPORT(_retonly)
DECLARE_EXPORT(_retonly)
DECLARE_EXPORT(_retonly)
END_EXPORT_TABLE

void _retonly(){};
11 changes: 5 additions & 6 deletions samples/Makefile.iopglobal_sample
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,12 @@ ifeq ($(IOP_LINKFILE),)
IOP_LINKFILE := $(PS2SDK)/iop/startup/linkfile
endif

# Populate object paths
IOP_OBJS := $(IOP_OBJS:%=$(IOP_OBJS_DIR)%)

# If this build produces an exports.o, ensure it is linked first so the
# export-table object occupies .text offset 0 (helps srxfixup detection).
ifneq (,$(filter $(IOP_OBJS_DIR)exports.o,$(IOP_OBJS)))
IOP_OBJS := $(IOP_OBJS_DIR)exports.o $(filter-out $(IOP_OBJS_DIR)exports.o,$(IOP_OBJS))
endif
IOP_OBJS := $(filter exports.o,$(IOP_OBJS)) $(filter-out exports.o,$(IOP_OBJS))

# Populate object paths
IOP_OBJS := $(IOP_OBJS:%=$(IOP_OBJS_DIR)%)

# srxfixup flags: default to `--rb --irx1`. If this module does not build an
# exports.o, add `--allow-zero-text` (modules without an export table may
Expand Down Expand Up @@ -132,6 +130,7 @@ $(IOP_OBJS_DIR)imports.o: $(IOP_OBJS_DIR)build-imports.c

# Rules to build exports.tab.
$(IOP_OBJS_DIR)build-exports.c: $(IOP_SRC_DIR)exports.tab
$(DIR_GUARD)
$(PRINTF) '%s\n' "#include \"irx.h\"" > $@
cat $< >> $@

Expand Down