1. Is it possible to run s390x software on s390 Linux?
Never. There is no 64-bit compatibility mode library or
kernel support.
2. Do your paths need to point to specific places to develop s390
   software under s390x compatibility mode?
        No. BUT ... you may need to apply one or more -m command line
        options to your gcc/g++ compilation & link steps. I find that
        "-m31" is all that's needed.
3. Do you ever need to point to 32-bit (s390) libraries?
        Never.

The s390x kernel with compatibility mode makes all of the runtime
"which libraries do I need?" decisions for you with no intervention
on your part. It works for just about all binary distributed packages
(with one notable exception: UDB/DB2) I've ever tried to install.

For development purposes, if you seek to emit AMODE=31 code &
linkages, use the -m31 switch on all your compilation & linkage
steps. When linking, be certain any dynamic or static libraries
you want to link with were created with 32-bit word size. There
is no distinction made between AMODE and RMODE like there is on
z/OS: it's either all 32-bit words (and AMODE=31 addressing and
instructions, called ELF32 format), or 64-bit format, called
ELF64. The compiler knows which libraries to point at during its
link phase as long as compatibility mode is installed.

I suggest you have a look at "info gcc" for further details on
this subject. Most of what I've ever done with s390 software
development on an s390x platform has only required the -m31
switch to emit perfect s390 ELF32 executables. You may find some
exceptions to this rule if you try to port other people's code,
and you cannot write s390x kernel modules as ELF32 objects. The
gdb (debugger) I run on my s390x machine will not recognize ELF32
modules ... for that reason alone, if I were developing applications
for ELF32 deployment, I'd do so on an s390 machine, unless you're
really comfortable with your code :-) Maybe you could build a
"cross-debugger" like you can a cross-compiler (???); but I've never
been desperate enough to try it.

Welcome to the list. Your questions make perfect sense.

Regards,
--Jim--
James S. Tison
Senior Software Engineer
TPF Laboratory / Architecture
IBM Corporation
"If dogs don't go to heaven, then, when I die, I want to go where
 they do." -- Will Rogers



Taraka Srinivas Kumar <[EMAIL PROTECTED]>
Sent by: Linux on 390 Port <[EMAIL PROTECTED]>
04/28/2004 09:55
Please respond to
Linux on 390 Port


To
[EMAIL PROTECTED]
cc

Subject
Linux for zSeries 31 bit/ 64 bit





Hi,

Am new to the group. Hope to have some good discussions.

We are using 64 bit SuSE Linux for zSeries.
Is it possible to run 64-bit linux developed applications on a 31-bit
Linux for zSeries ?
Do we need to make sure that the correct libraries are used in the 64-bit
Linux environment while application development , so that application can
be run on 31 bit linux later?
64-bit SuSE linux provides s390(31 bit)  as well as s390x(64 bit)
packages. ................. So do i need to set my path or any other env
variables to point to 31 bit libraries ?

Finally, Are my questions making any sense ?


Regards,
Srinivas.

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to