| View previous topic :: View next topic |
| Author |
Message |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Wed Oct 15, 2008 4:51 am Post subject: fixup exports error... |
|
|
Hi,
I'm trying to integrate a 3.xx exception handler in a kernel prx, and export the function, but I got this error:
| Code: | Error, could not fixup imports, stubs out of order.
Ensure the SDK libraries are linked in last to correct this error
C:\pspsdk\bin\make.exe: *** [ne0h_sdk.elf] Error 1 |
What it means? _________________ Get Xplora! |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Wed Oct 15, 2008 5:47 am Post subject: |
|
|
| It means the link order is "wrong". You'll have to try shuffling things around and hoping you find the magic order that makes that error go away. Please note that sometimes it is just impossible to make that error go away. |
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
Posted: Wed Oct 15, 2008 2:33 pm Post subject: |
|
|
| Well it shouldn't be possible for that error not to go away as you can always ensure that the SDK libs are linked last :) |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Wed Oct 15, 2008 3:34 pm Post subject: |
|
|
| Not always! There was a music playing prx I was trying work on, and it WOULD NOT work without linking pspkernel FIRST, but then you'd get that error. Trying to move pspkernel in the link order made three or four other libs fail to link. I tried every possible order and nothing would work. I thought about looking into updating the program that does that linking (I even started a thread on it), but it was too much hassle and I had more pressing issues. The fact of the matter is that sometimes you get those import errors and nothing you can do will fix them. :( |
|
| Back to top |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Wed Oct 15, 2008 11:23 pm Post subject: |
|
|
I've tryied to change the order, but the results is the same!
But I have this error only if I link exception_asm.o...
Here is my makefile:
| Code: |
TARGET = name
OBJS = main.o exception_asm.o scePower_driver.o pspDecrypt_imports.o
BUILD_PRX = 1
PRX_EXPORTS = exports.exp
CFLAGS = -Os -G0 -Wall -nostartfiles
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR = lib
LIBS = -lpspmodulemgr_kernel -lpspdisplay_driver -lpspsemaphore -lpspmesgd_driver -lpsputilsforkernel -lpspsystemctrl_kernel -lpsploadexec_kernel
LDFLAGS = -mno-crt0 -nostartfiles
include $(PSPSDK)/lib/build.mak
all:
psp-build-exports -s exports.exp
rm -f *.o
rm -f $(TARGET).elf
makeall.bat $(TARGET)
|
_________________ Get Xplora! |
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
Posted: Sat Oct 18, 2008 4:56 am Post subject: |
|
|
J.F. trust me on this, there is _always_ a way of getting it to work. I just guess you didn't understand the ramifications of how the linker does its job. Of course it is a limitation on the import system (I take responsibility) and its mechanism to handle stripped down imports, but it is better to get that error (and then you can fix it, trust me, even if you have to play with link orders) then before when it didn't check and it just created broken elfs :)
As for why it isn't working for ne0h I would assume some of it is down to the fact that you are using scePower_driver.o pspDecrypt_imports.o which I assume are import libraries which can cause weirdness with the import linker. You could try adding those to the end of the LIBS link, although what is it in scePower_drive.o which you need which isn't in the one in the SDK? |
|
| Back to top |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Sat Oct 18, 2008 11:15 pm Post subject: |
|
|
The reboot function, I haven't found it in the SDK...
Anyway this is the function:
| Code: |
0x0442D852
scePower_driver_0442D852
|
And another question:
I'm using the sceDisplaySetHoldMode for fadeout effect when launching something, but I haven't found this function prototipe in a library header, why? Or where I can find it? _________________ Get Xplora!
Last edited by ne0h on Sun Oct 19, 2008 12:14 am; edited 1 time in total |
|
| Back to top |
|
 |
Pirata Nervo
Joined: 09 Oct 2007 Posts: 409
|
Posted: Sat Oct 18, 2008 11:55 pm Post subject: |
|
|
is the NID 0x0442D852 for 4.xx kernel?
Did it change from 4.xx to 5.xx or didn't you check?
sceDisplaySetHoldMode is not in the sdk probably because no one added it yet :P _________________
Upgrade your PSP |
|
| Back to top |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Sun Oct 19, 2008 12:18 am Post subject: |
|
|
I didn't check for the NID but a person have sent me an e-mail to inform me that Xplora works great on cfw 5.00, so I think that the NID is not changed!
| Pirata Nervo wrote: |
sceDisplaySetHoldMode is not in the sdk probably because no one added it yet :P
|
Oh, thanks! Very good explanation! :P _________________ Get Xplora! |
|
| Back to top |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Sun Oct 19, 2008 12:34 am Post subject: |
|
|
TyRaNiD, another new question:
I'm using psplink to debug apps, but when a try to exit ( type reset or exit with sceKernelExitGame for main app) PSPLink won't reset!
I've see that it is because there's a module ( started by the main app ) that won't be onloaded, or something like this, I've try to do it by the pspsh, but for all the op I've have error "0xDEADBEEF" or similar ( I don't remember )!
Can I resolve this "error"?
Is not very comfortable to have to shutdown the PSP everytime... _________________ Get Xplora! |
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
Posted: Sun Oct 19, 2008 2:01 am Post subject: |
|
|
Is the module it is starting a kernel one with its own thread? The usual cause of reset locking is down to some kernel thread which doesn't handle correctly a wait state returning an error and causing an infinite loop to occur.
If it is then about the only way to fix it is to try and suspend the thread, if it has its own unique name then thsusp @thread_name is good enough, if it doesn't then you might need to do it manually. |
|
| Back to top |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Sun Oct 19, 2008 2:21 am Post subject: |
|
|
Sorry, I haven't understand...
I've the main module ( PBP ) in VSH mode ( 0x800 ) linked without ctr0, so at the startup it create a user thread, so it load two module, only one give me problems!
This have to do nothing ( only export some functions ), so I've writed some initialization of variables, because I cannot leave module_start black, and finally return...
Anyway this is the code:
| Code: |
int module_start(SceSize args, void *argp)
{
KL3E_Function = 0;
KL4E_Function = 0;
LZR2_Function = 0;
return 0;
}
|
I've also tryed to launch a new thread and get it sleep ( sceKernelSleepThread ) but PSPlink will not reset correctly...
P.S: Sorry for my english _________________ Get Xplora! |
|
| Back to top |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Sun Oct 19, 2008 2:28 am Post subject: |
|
|
I've tryed to leave module start black ( only return 0; ) and I've no errors...
Anyway the module loaded have 0x1007 attrib _________________ Get Xplora! |
|
| Back to top |
|
 |
Pirata Nervo
Joined: 09 Oct 2007 Posts: 409
|
Posted: Sun Oct 19, 2008 3:27 am Post subject: |
|
|
| ne0h wrote: | I didn't check for the NID but a person have sent me an e-mail to inform me that Xplora works great on cfw 5.00, so I think that the NID is not changed!
| Pirata Nervo wrote: |
sceDisplaySetHoldMode is not in the sdk probably because no one added it yet :P
|
Oh, thanks! Very good explanation! :P |
Thanks, that's good to know :) _________________
Upgrade your PSP |
|
| Back to top |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Sun Oct 19, 2008 4:44 am Post subject: |
|
|
| ne0h wrote: | | Anyway the module loaded have 0x1007 attrib | 0x1007 means not allowed to be stopped and unloaded i think. |
|
| Back to top |
|
 |
Insert_witty_name
Joined: 10 May 2006 Posts: 376
|
Posted: Sun Oct 19, 2008 10:51 am Post subject: |
|
|
I committed some changes to revision 2434 that updated pspmoduleinfo.h.
The missing flags have been added and they can be OR'd together.
| Code: | enum PspModuleInfoAttr
{
PSP_MODULE_USER = 0,
PSP_MODULE_NO_STOP = 0x0001,
PSP_MODULE_SINGLE_LOAD = 0x0002,
PSP_MODULE_SINGLE_START = 0x0004,
PSP_MODULE_KERNEL = 0x1000,
}; |
0x1007 would be kernel mode, unable to stop, single load and single start (which just means that the module can only be loaded and started once). |
|
| Back to top |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Mon Oct 20, 2008 2:06 am Post subject: |
|
|
Thanks, I've resolved!
When I try to reset pspLink it doesn't do anything, I've to unload manually the prx, but is not a problem!
Thanks! _________________ Get Xplora! |
|
| Back to top |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Mon Oct 20, 2008 2:48 am Post subject: |
|
|
| Insert_witty_name wrote: | I committed some changes to revision 2434 that updated pspmoduleinfo.h.
The missing flags have been added and they can be OR'd together.
| Code: | enum PspModuleInfoAttr
{
PSP_MODULE_USER = 0,
PSP_MODULE_NO_STOP = 0x0001,
PSP_MODULE_SINGLE_LOAD = 0x0002,
PSP_MODULE_SINGLE_START = 0x0004,
PSP_MODULE_KERNEL = 0x1000,
}; |
0x1007 would be kernel mode, unable to stop, single load and single start (which just means that the module can only be loaded and started once). |
Is there some use in loading a module and not starting it? Suppose you give only SINGLE_START, then you can load, start and unload it, and then only load it a second time but not start it right? |
|
| Back to top |
|
 |
Onii
Joined: 05 Oct 2008 Posts: 40
|
Posted: Mon Oct 20, 2008 3:22 am Post subject: |
|
|
| If I were to guess, I would think that SINGLE_START refers to a singleton. i.e. Only one running in memory at one time. NOT only allowing the module to be run only one time. |
|
| Back to top |
|
 |
|