So, I am advancing on the subject.
Had to change the environment variables I was setting before linker
invocation, because my caller program is AMODE64 and I was outputting
AMODE31 with the linker.
I did these declarations:
export _CC_L6SYSLIB="SYS1.CSSLIB:SSOP.TZ11.CEE.SCEEBND2"
export _CC_L6SYSIX="SSOP.TZ11.CEE.SCEELIB"
Compile:
cc -c -o GenChav.o -Wc,dll,LP64,exportall -I. -I/usr/lpp/java/J6.0_64/include
GenChav.c
--> Return OK
Linking:
cc -Wl,LP64 -o GenChav.so GenChav.o /usr/lpp/java/J6.0_64/bin/j9vm/libjvm.x
-->
IEW2456E 9207 SYMBOL printf UNRESOLVED. MEMBER COULD NOT BE
INCLUDED FROM THE
DESIGNATED CALL LIBRARY.
IEW2689W 4C40 DEFINITION SIDE FILE IS NOT DEFINED.
FSUM3065 The LINKEDIT step ended with return code 8.
So my guess I need to refer to the proper library containing the printf
function
signature and implementation. I tried pushing the libraries used for AMODE31:
export
_CC_L6SYSLIB="SYS1.CSSLIB:SSOP.TZ11.CEE.SCEEBND2:SSOP.TZ11.CEE.SCEE
LKEX:SSOP.TZ11.CEE.SCEELKED"
But then I got:
IEW2469E 9907 THE ATTRIBUTES OF A REFERENCE TO printf FROM SECTION
GenChav#C DO
NOT MATCH THE ATTRIBUTES OF THE TARGET SYMBOL. REASON 2
IEW2469E 9907 THE ATTRIBUTES OF A REFERENCE TO printf FROM SECTION
GenChav#C DO
NOT MATCH THE ATTRIBUTES OF THE TARGET SYMBOL. REASON 2
IEW2689W 4C40 DEFINITION SIDE FILE IS NOT DEFINED.
FSUM3065 The LINKEDIT step ended with return code 8.
Which is sort of obvius, AMODE31 and AMODE64 functions signatures do not
match...
So, which library contatins de AMODE64 version of printf() (and probably all
the rest of the C standard library) ?
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html