home *** CD-ROM | disk | FTP | other *** search
/ AMIGA PD 1 / AMIGA-PD-1.iso / Programme_zum_Heft / Programmieren / Workshops / GNU-C / SOBJA.LHA / sobja.doc < prev   
Text File  |  1992-02-27  |  5KB  |  119 lines

  1.  
  2.           -------------  SObjA.doc for version 1.01 -------------
  3.  
  4.  
  5.   NAME
  6.  
  7.       SObjA - Convert object files from Sun to Amiga format.
  8.  
  9.  
  10.   SYNOPSIS
  11.  
  12.       SObjA [Options] Input-Filename [Output-Filename]
  13.  
  14.       SObjA -m [Options] [Output-Filename]
  15.  
  16.       MakeBSS Input-Filename Output-Filename
  17.  
  18.         Options:
  19.  
  20.           -C[Filename]  Omits the 'common' information from the output file
  21.                           and creates a temporary file to be read when the
  22.                           '-m' option is used.  The default name is
  23.                           'sobja-common'.  This option has a different
  24.                           meaning when '-m' is used.
  25.  
  26.           -c[Filename]  As above but appends to the temporary file.  This
  27.                           option has a different meaning when '-m' is used.
  28.  
  29.           -b            Replaces the 'common' information in the output file
  30.                           with a BSS hunk.  Useful for converting a program
  31.                           that is in a single object file or where none
  32.                           of object files in a program define the same
  33.                           global variable.
  34.  
  35.           -s            Include symbol information in the output file.
  36.  
  37.           -m            Make a file containing a BSS hunk from the temporary
  38.                           file generated by SObjA with the '-c' and '-C'
  39.                           options.  The input filename is 'sobja-common' by
  40.                           default, or it can be set using '-c' or '-C'
  41.                           followed by the filename.  The output filename is
  42.                           given by itself on the command line or
  43.                           'bss.o-amiga' by default.
  44.  
  45.           -v            Turns on some debugging code.
  46.  
  47.  
  48.   DESCRIPTION
  49.  
  50.           SObjA is a utility for converting object files generated by GCC
  51.       (The GNU C Compiler) on a Sun-2 or Sun-3 to Amiga's object file
  52.       format as input to The Software Distillery's Blink.  When converting
  53.       files it requires an input filename.  If the output filename is
  54.       omited, it will be the same as the input's with a '-amiga' appended
  55.       to it.
  56.           BLink does not support common blocks.  This support is needed for
  57.       GCC to compile programs that define any global variable in more than
  58.       one file.  This is common in programs written for UN*X.  SObjA has a
  59.       solution.  It isn't very pretty but it works.  SObjA can accumulate
  60.       common block information in a file called 'sobja-common' by default.
  61.       Once all the files in a program have been converted, it can read this
  62.       file and generate a file with a BSS hunk with definitions for the
  63.       common block references.  This file can then be linked with the other
  64.       output files using Blink to generate an executable program.
  65.           Another option allows SObjA to convert a file and output a BSS
  66.       hunk for the common block references as part of the output file.  This
  67.       option will probably work with programs written for other Amiga C
  68.       compilers.
  69.           The default case is for SObjA to output common block references
  70.       as specified in _The AmigaDOS Manual - 2nd Edition_.  At this time I
  71.       don't know of any freely redistributable linkers for the Amiga that
  72.       support this.  (BONUS: Write a good free Amiga linker.)
  73.           Note that each option must be preceded by a dash,  the order of
  74.       the options and other arguments doesn't matter, and options that take
  75.       an argument should not have a space before the argument.  If it
  76.       doesn't like the command line, it will give you a 'usage' message.
  77.           If this program is renamed to MakeBSS it acts differently.  It
  78.       does the same thing as the '-m' option except that the input and
  79.       output filename are the only thing allowed on the command line.
  80.  
  81.  
  82.   EXAMPLE
  83.  
  84.       You have three Sun format object files: main.c, brain.c, drain.c
  85.  
  86.         SObjA -s -C main.c    ; Notice the case of -C
  87.         SObjA -s -c brain.c
  88.         SObjA -s -c drain.c
  89.         SObjA -m              ; Make bss.o-amiga
  90.  
  91.         BLink main.o-amiga brain.o-amiga drain.o-amiga bss.o-amiga TO barf
  92.  
  93.           Assuming you don't need a startup library or scanned libraries,
  94.       this will produce an executible with symbol information.  The files
  95.       'sobja-common' and 'bss.o-amiga' will be in the current directory.
  96.  
  97.  
  98.   BUGS
  99.  
  100.       Lots of them I'm sure.
  101.  
  102.  
  103.   GRAFFITI
  104.  
  105.      "All the pumping's nearly over for my sweet heart,
  106.       This is the one for me,
  107.       Time to meet the chef,
  108.       O boy! running man is out of death.
  109.       Feel cold and old, it's getting hard to catch my breath.
  110.       's back to ash, now you've had your flash boy
  111.       The rocks, in time, compress
  112.       your blood to oil,
  113.       your flesh to coal,
  114.       enrich the soil,
  115.       not everybody's goal."
  116.  
  117.         - "Anyway", Genesis - _The Lamb Lies Down on Broadway_.
  118.  
  119.