[comp.os.minix] Packed versus unpacked assembly: How do you tell?

knutson@marconi.sw.mcc.com (Jim Knutson) (03/01/89)

I have become a little uncomfortable with the packed and unpacked
assembly files looking the same (externally).  My latest bout with
this ended up with my building a libc.a with an unpacked setjmp.s.

I would like to suggest that we strongly consider a different file
extension for packed and unpacked assembly.  Perhaps .s and .S or .s
and .us.  I'm not particular about the choice for the extension.
Keeping the file extensions seperate would make dealing with these
files without worrying about destroying the source version much
easier.

Is this reasonable or have I missed something?
-- 
Jim Knutson
knutson@mcc.com
cs.utexas.edu!milano!knutson

ast@cs.vu.nl (Andy Tanenbaum) (03/02/89)

In article <2046@marconi.sw.mcc.com> knutson@marconi.sw.mcc.com (Jim Knutson) writes:
>I have become a little uncomfortable with the packed and unpacked
>assembly files looking the same (externally).  My latest bout with
>this ended up with my building a libc.a with an unpacked setjmp.s.

There is nothing wrong with mixing them.  Asld will accept both.
All packing does is it replaces about 120 predefined strings with the
ASCII codes above 128.  This reduces library size and speeds up linking.
If you want a list of which strings are replaced, look at the source of
libupack.c.  The table there gives them in numerical order.  These were
chosen by compiling a vast amount of C with the MINIX compiler, then
running the collected assembly code through sort| uniq -c to see which
ones occurred most.

Someday there ought to be a proper assembler and linker.  Someday ...

Andy Tanenbaum (ast@cs.vu.nl)

allbery@ncoast.ORG (Brandon S. Allbery) (03/10/89)

As quoted from <2046@marconi.sw.mcc.com> by knutson@marconi.sw.mcc.com (Jim Knutson):
+---------------
| I have become a little uncomfortable with the packed and unpacked
| assembly files looking the same (externally).  My latest bout with
| this ended up with my building a libc.a with an unpacked setjmp.s.
+---------------

Seeing as how it's doubtful that we'll ever have a real object file format
for PC Minix, why not just give packed assembler files a ".o" extension?

++Brandon
-- 
Brandon S. Allbery, moderator of comp.sources.misc	     allbery@ncoast.org
uunet!hal.cwru.edu!ncoast!allbery		    ncoast!allbery@hal.cwru.edu
      Send comp.sources.misc submissions to comp-sources-misc@<backbone>
NCoast Public Access UN*X - (216) 781-6201, 300/1200/2400 baud, login: makeuser

allbery@NCOAST.ORG (Brandon S. Allbery) (03/10/89)

As quoted from <2046@marconi.sw.mcc.com> by knutson@marconi.sw.mcc.com (Jim
 Knutson):
+---------------
| I have become a little uncomfortable with the packed and unpacked
| assembly files looking the same (externally).  My latest bout with
| this ended up with my building a libc.a with an unpacked setjmp.s.
+---------------

Seeing as how it's doubtful that we'll ever have a real object file format
for PC Minix, why not just give packed assembler files a ".o" extension?

++Brandon
--
Brandon S. Allbery, moderator of comp.sources.misc	     allbery@ncoast.org
uunet!hal.cwru.edu!ncoast!allbery		    ncoast!allbery@hal.cwru.edu
      Send comp.sources.misc submissions to comp-sources-misc@<backbone>
NCoast Public Access UN*X - (216) 781-6201, 300/1200/2400 baud, login: makeuser

HELMER%SDNET.BITNET@vm1.nodak.edu (Guy Helmer) (03/11/89)

In a recent article, <allbery@NCOAST.ORG> writes:
>As quoted from <2046@marconi.sw.mcc.com> by knutson@marconi.sw.mcc.com (Jim
> Knutson):
>+---------------
>| I have become a little uncomfortable with the packed and unpacked
>| assembly files looking the same (externally).  My latest bout with
>| this ended up with my building a libc.a with an unpacked setjmp.s.
>+---------------
>
>Seeing as how it's doubtful that we'll ever have a real object file format
>for PC Minix, why not just give packed assembler files a ".o" extension?
>
>++Brandon
Forgive me if I'm missing something obvious, but why aren't as and
ld separate in this first place?

- Guy Helmer
  BITNET: HELMER@SDNET
  uucp:   ghelmer@loft386       ...!texbell!loft386!ghelmer

ast@cs.vu.nl (Andy Tanenbaum) (03/13/89)

In article <10580@louie.udel.EDU> HELMER%SDNET.BITNET@vm1.nodak.edu (Guy Helmer) writes:
>Forgive me if I'm missing something obvious, but why aren't as and
>ld separate in this first place?

Historical reasons.  We had a combined asld around for reasons that have 
nothing to do with MINIX, but a lot to do with other circumstances at the
time.  It worked fine so it seemed expedient to use it.  ACK now has a real
loader.  Maybe someday I'll get this fixed.

Andy Tanenbaum (ast@cs.vu.nl)