__RelocCode error
Chris Mahoney (1684) 2165 posts |
Hi everyone, I apologise in advance for the vagueness of this post; I’m not at my machine right now but I still wanted to get the question out there. I’m trying to build a Utility, so following some previous advice I’m using the CUtil makefile and am including UtilLib. Everything builds but it doesn’t link; the linker doesn’t like “__RelocCode” (which is referenced by the UtilLibAsm file). This article states that “The linker will automatically generate a special __RelocCode function which will perform pointer fixup on any pointers contained within the image.” However, this doesn’t seem to be happening. I’ve probably missed a step somewhere; any ideas? I’ll provide some code and verbatim AMU output once I’m home. |
Jeffrey Lee (213) 6048 posts |
Try this in your makefile: LDFLAGS = -RMF I think you’ll also need to set UTIL_LIBS to be empty to make sure the code isn’t linked with the C library. (See the ZLib decompression stub for compressed ROMs) I’ll update the wiki. |
Jeffrey Lee (213) 6048 posts |
Actually, the DDE manual suggests Possibly CUtil is also taking care of the shared C library problem, by making sure ANSILib is used instead (which is essentially a statically linked version of the SCL). Just that in my case (decompression stub) I didn’t want any C library code, since there’s no OS for the library to call into! |
Chris Mahoney (1684) 2165 posts |
I thought I saw an existing reference to -util in the makefile, but I’ll double-check. I’m using ANSILib at present (since the makefile uses it by default) but I don’t think I’m doing anything that depends on it. Getting rid of it will be “step 2” (which is really going to be about step 47 at this rate). |
Chris Mahoney (1684) 2165 posts |
That was it! Link was indeed missing Thanks :) |