• z/Architecture Principles of Operation (SA22-7832-01, 2000), http://publibfp.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/dz9zr001.
For more on System z-specific parts of GCC, refer to:
• Gellerich et al. “The GNU 64-Bit PL8 Compiler …” (cited earlier)
• Hartmut Penner, Ulrich Weigand: “Porting GCC to the IBM S/390 Platform,” Proceedings of the GCC Developer’s Summit available from www.gccsummit.org/2003/
• D. Edelsohn, W. Gellerich, M. Hagog, D. Naishlos, M. Namolaru, E. Pasch, H. Penner, U. Weigand, A. Zaks, “Contributions to the GNU Compiler Collection,” IBM Systems Journal, 2005, volume 44, number 2, pages 259-278, www.research.ibm.com/journal/sj/442/edelsohn.pdf.
The cc1 or cc1plus compiler generates a text file containing the program code in Assembler. Assembler is heavily machine-specific but still isn’t executable by a CPU. To make this file CPU-consumable, it’s necessary to encode the mnemonic and operands into the machine opcode. This is the purpose of the Assembler (see Figure 4). The resulting byte stream will usually reside inside the .text section of the ELF object file.
In the Linux environment, the Assembler provided by the GNU Binutils suite can deal with many different architectures and object file formats. For System z, the Binutils suite was built to produce code for the s390-elf target.
Note that the Assembler code generated isn’t the same as High Level Assembler (HLASM) mainframers are used to seeing. It’s GNU Assembler Syntax (GAS). The mnemonics are the same, but specification of the operands aren’t.