Re: Some (a.out) world breakage...

1999-02-28 Thread John Polstra

Chuck Robey wrote:
>> 
>> This problem can be solved easily.  Instead of ".align" the code
>> should use ".p2align 4", which behaves the same for a.out as it does
>> for ELF.
> 
> In test, this didn't work, so I misunderstood something.

Yes, you did. :-)

Get rid of ALIGN entirely.  Change all instances of ".align ALIGN" to
".p2align 4".

John
---
  John Polstra   j...@polstra.com
  John D. Polstra & Co., Inc.Seattle, Washington USA
  "Nobody ever went broke underestimating the taste of the American public."
-- H. L. Mencken


To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message



Re: Some (a.out) world breakage...

1999-02-28 Thread Zach Heilig
On Sun, Feb 28, 1999 at 01:18:50PM -0500, Chuck Robey wrote:
> cc -I/usr/src/lib/libmd -DSHA1_ASM -DELF -DRMD160_ASM -DELF  -c
> /usr/src/lib/libmd/i386/sha.S -o sha.o
> /usr/tmp/ccx85357.s: Assembler messages:
> /usr/tmp/ccx85357.s:57: Error: Alignment too large: 15 assumed
> *** Error code 1

...

> BTW, in the code, ALIGN is defined earlier to be 4.

No, because of the '-DELF', ALIGN is defined to be 16.

-- 
Zach Heilig 
"Americans are sensitive about their money, and since this was the first major
change in the greenback in nearly 70 years, a radical redesign might have been
too much for consumers to comprehend" -- John Iddings [COINage, Feb. 1999].


To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message



Re: Some (a.out) world breakage...

1999-02-28 Thread Chuck Robey
On Sun, 28 Feb 1999, John Polstra wrote:

> > I did look in the "broken" file, and noted that ALIGN was defined as 16
> > in the 'ELF' case, and 4 in the 'OUT' case.  It looks impossible (to me)
> > for 'OUT' to be defined while compiling that file
> > (/usr/src/lib/libmd/i386/sha.S).
> > 
> > I guess it's time to quit building a.out? :-)
> 
> This problem can be solved easily.  Instead of ".align" the code
> should use ".p2align 4", which behaves the same for a.out as it does
> for ELF.

In test, this didn't work, so I misunderstood something.  I'm going to
show a segment of file /usr/src/lib/libmd/i386/sha.S:

gcc2_compiled.:
.text
.align ALIGN
.globl sha1_block_x86
TYPE(sha1_block_x86,@function)
sha1_block_x86:

I tried changing the ".align" to ".p2align", and got this error:

cc -I/usr/src/lib/libmd -DSHA1_ASM -DELF -DRMD160_ASM -DELF  -c
/usr/src/lib/libmd/i386/sha.S -o sha.o
/usr/tmp/ccx85357.s: Assembler messages:
/usr/tmp/ccx85357.s:57: Error: Alignment too large: 15 assumed
*** Error code 1

I tried changing ".align" instead to ".p2align" (in case I didn't read
you literally enough) and it complained of extra arguments.

BTW, in the code, ALIGN is defined earlier to be 4.

Last notes:  It used to break before this, only in the aout setting.
Now it breaks for elf and aout.  Also, the other file in ./i386,
rmd160.S, has an identical problem.  All this is done with the libmd
Makefile as original (the fix I worked out with Garrett, to take the
assembler files completely out of the aout build, I removed for this
test).

+---
Chuck Robey | Interests include any kind of voice or data 
chu...@glue.umd.edu | communications topic, C programming, and Unix.
213 Lakeside Drive Apt T-1  |
Greenbelt, MD 20770 | I run picnic (FreeBSD-current)
(301) 220-2114  | and jaunt (Solaris7).
+---






To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message



Re: Some (a.out) world breakage...

1999-02-28 Thread John Polstra
In article <19990228103315.a37...@znh.org>,
Zach Heilig   wrote:
> Make world (with no -DNOAOUT or whatever that switch is), ends up like this:
> 
> --
> >>> Building legacy libraries
> --
> 
> 
> 
> (echo '#define LENGTH 20';  sed -e 's/mdX/sha/g' -e 's/MDX/SHA_/g' -e 
> 's/SHA__/SHA_/g'  /usr/src/lib/libmd/mdXhl.c) > sha0hl.c
> cc -O -pipe -I/usr/src/lib/libmd -DSHA1_ASM -DELF -DRMD160_ASM -DELF 
> -I/usr/obj/aout/usr/src/tmp/usr/include -c sha0hl.c -o sha0hl.o
> cc -O -pipe -I/usr/src/lib/libmd -DSHA1_ASM -DELF -DRMD160_ASM -DELF 
> -I/usr/obj/aout/usr/src/tmp/usr/include -c /usr/src/lib/libmd/sha1c.c -o 
> sha1c.o
> (echo '#define LENGTH 20';  sed -e 's/mdX/sha/g' -e 's/MDX/SHA1_/g' -e 
> 's/SHA1__/SHA1_/g'  /usr/src/lib/libmd/mdXhl.c) > sha1hl.c
> cc -O -pipe -I/usr/src/lib/libmd -DSHA1_ASM -DELF -DRMD160_ASM -DELF 
> -I/usr/obj/aout/usr/src/tmp/usr/include -c sha1hl.c -o sha1hl.o
> cc -I/usr/src/lib/libmd -DSHA1_ASM -DELF -DRMD160_ASM -DELF 
> -I/usr/obj/aout/usr/src/tmp/usr/include  -c /usr/src/lib/libmd/i386/sha.S -o 
> sha.o
> sha1-586.s: Assembler messages:
> sha1-586.s:56: Error: Alignment too large: 15. assumed.
> *** Error code 1
> 
> Stop.
> 
> Quite obviously defining ELF for the entire legacy library build, but
> waiting to really break in 'libmd'.
> 
> I did look in the "broken" file, and noted that ALIGN was defined as 16
> in the 'ELF' case, and 4 in the 'OUT' case.  It looks impossible (to me)
> for 'OUT' to be defined while compiling that file
> (/usr/src/lib/libmd/i386/sha.S).
> 
> I guess it's time to quit building a.out? :-)

This problem can be solved easily.  Instead of ".align" the code
should use ".p2align 4", which behaves the same for a.out as it does
for ELF.

John
-- 
  John Polstra   j...@polstra.com
  John D. Polstra & Co., Inc.Seattle, Washington USA
  "Nobody ever went broke underestimating the taste of the American public."
-- H. L. Mencken


To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message



Some (a.out) world breakage...

1999-02-28 Thread Zach Heilig
Make world (with no -DNOAOUT or whatever that switch is), ends up like this:

--
>>> Building legacy libraries
--



(echo '#define LENGTH 20';  sed -e 's/mdX/sha/g' -e 's/MDX/SHA_/g' -e 
's/SHA__/SHA_/g'  /usr/src/lib/libmd/mdXhl.c) > sha0hl.c
cc -O -pipe -I/usr/src/lib/libmd -DSHA1_ASM -DELF -DRMD160_ASM -DELF 
-I/usr/obj/aout/usr/src/tmp/usr/include -c sha0hl.c -o sha0hl.o
cc -O -pipe -I/usr/src/lib/libmd -DSHA1_ASM -DELF -DRMD160_ASM -DELF 
-I/usr/obj/aout/usr/src/tmp/usr/include -c /usr/src/lib/libmd/sha1c.c -o sha1c.o
(echo '#define LENGTH 20';  sed -e 's/mdX/sha/g' -e 's/MDX/SHA1_/g' -e 
's/SHA1__/SHA1_/g'  /usr/src/lib/libmd/mdXhl.c) > sha1hl.c
cc -O -pipe -I/usr/src/lib/libmd -DSHA1_ASM -DELF -DRMD160_ASM -DELF 
-I/usr/obj/aout/usr/src/tmp/usr/include -c sha1hl.c -o sha1hl.o
cc -I/usr/src/lib/libmd -DSHA1_ASM -DELF -DRMD160_ASM -DELF 
-I/usr/obj/aout/usr/src/tmp/usr/include  -c /usr/src/lib/libmd/i386/sha.S -o 
sha.o
sha1-586.s: Assembler messages:
sha1-586.s:56: Error: Alignment too large: 15. assumed.
*** Error code 1

Stop.

Quite obviously defining ELF for the entire legacy library build, but
waiting to really break in 'libmd'.

I did look in the "broken" file, and noted that ALIGN was defined as 16
in the 'ELF' case, and 4 in the 'OUT' case.  It looks impossible (to me)
for 'OUT' to be defined while compiling that file
(/usr/src/lib/libmd/i386/sha.S).

I guess it's time to quit building a.out? :-)

-- 
Zach Heilig 
"Americans are sensitive about their money, and since this was the first major
change in the greenback in nearly 70 years, a radical redesign might have been
too much for consumers to comprehend" -- John Iddings [COINage, Feb. 1999].


To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message