C/C++

C/C++

C/C++

Your one-stop destination to learn and collaborate about the latest innovations in IBM C/C++ for z/OS compilers to develop high-performing C/C++ applications and system programs on z/OS while maximizing hardware use and improving application performance.

 View Only
  • 1.  C DLL abend CEE3350S with EDCPRLG Assembler Routine

    Posted Wed July 19, 2023 03:44 PM

    I've got a bit of an interesting situation here. I have built a C DLL which is working just fine. Now I needed to add a couple of LE C Assembler routines to it in order to access a Log Stream service routine we've written. But as soon as I add the first assembler routine, which uses EDCPRLG for the entry code, trying to call any routine in the DLL results in a CEE3350S Abend. When looking at the DLL I can see that CEESTART is not set as the Entry Point, its set to the first of my EDCPRLG Assembler modules with the lowest name (according to standard collating sequence).

    CEE3550S DLL XXXUTILS does not contain a CEESTART CSECT.
    If I don't include any of my Assembler routines in the DLL then the binder sets the CEESTART as the entry point. When I do include any of the Assembler routines, which use EDCPRLG as its entry code, then the one that ends of first in the sort order of names becomes the entry point instead of CEESTART. For example, if I have the following routines: XXXCLOGR - Assembler with EDCPRLG entry code XXXCUTIL - LE C Code XXXLOGR - Assembler code - no EDCPRLG XXXCLOGR gets set as the entry point If the routines are XXXCUTIL - LE C Code XXXLOGR - Assembler code - no EDCPRLG then CEESTART gets set as the entry point. Obviously, I need all the routines, as the CLOGR is the interface between CUTIL and LOGR (CUTIL->CLOGR->LOGR) When I include the assembler routines that don't have EDCPRLOG then CEESTART gets set as the entry point.

    I tried adding an ENTRY CEESTART to the binder instructions and that sets the entry point, but does not resolve the CEE3350S abend on the first call.

    I can see that CEESTART is included in the load module, so I'm totally confused as to what is going on here.



    ------------------------------
    Eric Erickson
    ------------------------------


  • 2.  RE: C DLL abend CEE3350S with EDCPRLG Assembler Routine

    Posted Wed July 26, 2023 12:19 PM

    hi Eric,

    Could you help clarify, are you trying to create a DLL, but it also seems you want to have a startup routine in the DLL, which implies a main entry point ("main" in C/C++ terms). Those two are contradictory. If this is intended as a pure DLL (a library that is called from other modules or libraries), then CEESTART is not needed. If it is intended as a main program itself, then it should not be a DLL itself, though of course it use the DLL option to enable using DLL's.  Without the binder options, we can't tell if you are trying the latter or the former.

    thanks



    ------------------------------
    Linda Chui
    Compilation Technology & Enterprise Products
    IBM Canada
    ------------------------------



  • 3.  RE: C DLL abend CEE3350S with EDCPRLG Assembler Routine

    Posted Wed July 26, 2023 06:28 PM

    Linda, 

    I was trying to recreate my issue and now it seems to have gone away. I just rebuild everything and now I don't get the CEE3550S error anymore. Not sure what changed, but obviously something did. 

    Thanks 

                                                    
                                                                                                  



    ------------------------------
    Eric Erickson
    ------------------------------