Browse Prior Art Database

Table of Content Relocation Support of DATA/BSS Sections for a RISC System IPL Read Only Storage

IP.com Disclosure Number: IPCOM000114061D
Original Publication Date: 1994-Nov-01
Included in the Prior Art Database: 2005-Mar-27
Document File: 2 page(s) / 97K

Publishing Venue

IBM

Related People

Lee, VH: AUTHOR

Abstract

Disclosed is a mechanism to allow a RISC System/6000* IPL ROS to contain DATA section and BSS section which enable the usage of static variables, global variables, and function pointers.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 53% of the total text.

Table of Content Relocation Support of DATA/BSS Sections for a RISC
System IPL Read Only Storage

      Disclosed is a mechanism to allow a RISC System/6000* IPL ROS
to contain DATA section and BSS section which enable the usage of
static variables, global variables, and function pointers.

      When RAM-based programs are loaded and executed under the
existing operating system, the loader of the operating system is
responsible for any relocaiton items within the code and data of the
programs before it gives control to the program images in the system
memory.  Most executable programs are stored in the media under
certain formats such as EXE-format for IBM PC-DOS, or XCOFF-format
for IBM AIX*, ROM-based programs are also developed under the same
environment as RAM-based programs in their existing operating system
However, ROM-based programs normally have headers and relocation
information stripped from the file to produce the final ROM images.
The ROM image will be executing without an operating system unless
the ROM-based program itself becomes the ROM-based version of an
operating system.

      Using the IPL ROS of an IBM RISC Systm/6000 machine as the
example, IPL ROS is normally developed in an IBM AIX operating system
environment and the absolute ROM image is produced by extracting the
TEXT section of the XCOFF file generated by the linkage editor.
During execution, IPL ROS will copy its code into system memory after
enough system memory has been checked as good.  IPL ROS then
continues its execution from system memory to gain performance in
terms of execution speed.  Because of the relocation of IPL ROS, it
is possible to have the DATA section and BSS section support by
saving this information in the IPL ROS and performing some
relocations to the XCOFF-file in advance before all headers and
relocation information are stripped off to produce the absolute ROM
image.

      Since most of the relcoation work has been done by the linkage
editor when it produces the XCOFF file, the steps required to add
DATA section and BSS section are as follows:
  1.  Expand the TEXT section to include the data section.  It means
       that the DATA section will be merged at the end of the TEXT
       section in terms of virtual address.  This saves the raw data
of
       the DATA section into the raw data of the TEXT section of the
       XCOFF file.
  2.  Modify the size of the TEXT section and the DATA section in the
       appropriate headers of the XCOFF file.  The DATA section size
       will now be zero, and the TEXT section size will be the sum of
       the original sizes of both the TEXT section and the DATA
section.
       Modify the file pointer of the DATA section in the header by
the
       amount of the original size of the DATA section.
  3.  Modify the value of the symbol used by IPL ROS to mark the end
of
       the code.  The new valu...