View Single Post
Old 05 October 2018, 09:24   #945
pipper
Registered User
 
Join Date: Jul 2017
Location: San Jose
Posts: 664
I think I got it working

Two issues
1) I was a moron, producing essentially .o file (I had -c left over in the gcc commandline)
2) libnix seems to have a 14 year(!) old bug in libinit.c#L183 :
Code:
in LibInit() :
if (!__UserLibInit(&lib->LibNode,lib->DataSeg)) {
    FreeMem((UBYTE *)lib-lib->LibNode.lib_NegSize,lib->LibNode.lib_NegSize+lib->LibNode.lib_PosSize);
    lib = NULL;
  }
All sources and examples on the internet claim that __UserLibInit() needs to return 0 to indicate success. But libnix interprets it as failure. Returning !=0 from my __UserLibInit eventually got me past the initial hurdle (OpenLibrary claimed it couldn't open my library).
pipper is offline  
 
Page generated in 0.04377 seconds with 11 queries