sysklogd

Robert Connolly robert at linuxfromscratch.org
Fri Jun 1 12:25:04 PDT 2007


On Tuesday May 29 2007 12:14:59 am George Boudreau wrote:
> Robert Connolly wrote:
> > Cool, thanks. Btw, does nasm generally make smaller programs? The nasm
> > version, with the extra options, is only about 7 bytes larger.
>
>   When I built dd.asm with the following
> 	nasm -o dd.o -f aout dd.asm -l dd.lst
>
> 	ld -o dd dd.o
>
> 	strip dd
> the final size was 976 so I see a 92 byte difference. How did you build
> yours?
>
>    The attachment is a commented version with a different build method.
> 	m4 dd.m4 > tmp.s
>
> 	gcc -c tmp.s
>
> 	ld -o dd tmp.o
>
> 	strip dd
>    output is the same 884b
>
> > robert

The asmutils Makefile uses:
nasm -w+orphan-labels -w+macro-params -i../inc/ -O99v -f 
bin -D__LINUX__ -D__KERNEL__=24 -D__SYSCALL__=__S_KERNEL__ -D__OPTIMIZE__=__O_SIZE__ -D__ELF__ -D__ELF_MACROS__ 
dd.asm

This makes a 871 byte 'dd'.

I build yours with:
gcc -nostdlib dd.s -o dd-gnu
strip dd-gnu

And it's 916 bytes. A 45 byte difference. I'm not sure how I got a 7 byte 
difference before. The size is the same if I use 'as' and 'ld', instead 
of 'gcc'.

robert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/hlfs-dev/attachments/20070601/80283ad7/attachment.sig>


More information about the hlfs-dev mailing list