Code: Select all
.set noreorder
#include "pspimport.s"
IMPORT_START "sceSyscon_driver",0x00010000
IMPORT_FUNC "sceSyscon_driver",0x5EE92F3C,sceSysconSetDebugHandlers
I have only one LIBS in my app lpsppower_driver.
It just says cannot fixup imports and that I have to put the PSPSDK libs last. If I remove the lpsppower_driver and its functions, then it compiles. I can't change the order because there is only one lib!!
So I had to remove the stub and I used sctrlHENFindFunction to get the function address and assign it to my pointer prototype. Then it compiles.
This is the makefile in question.
Code: Select all
TARGET = hold
OBJS = main.o import.o sysconhk.o exports.o
INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
BUILD_PRX = 1
PRX_EXPORTS = exports.exp
USE_KERNEL_LIBC=1
USE_KERNEL_LIBS=1
PSP_FW_VERSION = 390
LIBDIR =
LIBS = -lpsppower_driver
LDFLAGS = -nostdlib -nodefaultlibs
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build_prx.mak