From: G Anna <drguruolai@eth.net>
To: linux-assembly@vger.kernel.org
Subject: ld error
Date: 27 May 2002 12:49:44 +0530 [thread overview]
Message-ID: <m3r8jygir3.fsf@wobble.eth.net> (raw)
Dear All,
I am working through 'Linux Assembly "Hello World" Tutorial, CS 200'
by Bjorn Chambless. But I am unable to compile the program given in
that. Kindly help me.
For your convenience I have included the assembly program at the end
of this mail.
average.s is the relevant assembly program file.
$ as -a --gstabs -o average.o average.s
$ ld -m elf_i386 -static /usr/lib/crt1.o /usr/lib/crti.o -lc average.o
/usr/lib/crtn.o
/usr/lib/libc.a(strtoll.o): In function `__strtoll_internal':
/usr/src/bs/BUILD/glibc-2.2.2/stdlib/../sysdeps/generic/strtol.c:386: undefined reference to `__udivdi3'
/usr/src/bs/BUILD/glibc-2.2.2/stdlib/../sysdeps/generic/strtol.c:387: undefined reference to `__umoddi3'
/usr/lib/libc.a(strtoull.o): In function `__strtoull_internal':
/usr/src/bs/BUILD/glibc-2.2.2/stdlib/../sysdeps/generic/strtol.c:386: undefined reference to `__udivdi3'
/usr/src/bs/BUILD/glibc-2.2.2/stdlib/../sysdeps/generic/strtol.c:387: undefined reference to `__umoddi3'
$ cat average.s
.data
.type hi_temp,@object
.size hi_temp,1
hi_temp:
.byte 0x92
.type lo_temp,@object
.size lo_temp,1
lo_temp:
.byte 0x52
.type av_temp,@object
.size av_temp,1
av_temp:
.byte 0
.text
.align 4
.globl main
.type main,@function
main:
pushl %ebp
movl %esp,%ebp
movb hi_temp,%al
addb lo_temp,%al
movb $0,%ah
adcb $0,%ah
movb $2,%bl
idivb %bl
movb %al,av_temp
leave
ret
$ as --version
GNU assembler 2.10.91
Copyright 2001 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
This assembler was configured for a target of `i386-redhat-linux'.
$ ld --version
GNU ld 2.10.91
Copyright 2001 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
Supported emulations:
elf_i386
i386linux
elf_i386_glibc21
$ gcc --version
2.96
$ uname -a
Linux wobble 2.4.16 #8 Tue May 14 14:15:58 IST 2002 i686 unknown
$ cat /etc/issue
Red Hat Linux release 7.1 (Seawolf)
Kernel 2.4.16 on an i686
Hope somebody will help me with this.
Thank you.
Cheers,
anna
--
(15) I will never employ any device with a digital countdown. If I find
that such a device is absolutely unavoidable, I will set it to
activate when the counter reaches 117 and the hero is just putting
his plan into operation. - Peter Anspach in "The Top 100 Things
I'd Do If I Ever Became An Evil Overlord"
http://www.eviloverlord.com
next reply other threads:[~2002-05-27 7:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-27 7:19 G Anna [this message]
2002-05-27 18:27 ` ld error Alfred Cleve
2002-05-28 5:27 ` G Anna
2002-05-28 11:26 ` Brian Raiter
2002-05-28 14:32 ` Robert Plantz
2002-05-28 12:54 ` J.S.Souza
-- strict thread matches above, loose matches on Subject: below --
2002-05-27 18:58 Emmet Ford
2002-05-28 1:51 ` Brian Raiter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3r8jygir3.fsf@wobble.eth.net \
--to=drguruolai@eth.net \
--cc=linux-assembly@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.