All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christopher R. Johnson" <cjohnson@gcctech.com>
To: Sergey Urvanov <abs@dts.ru>
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: ioperm
Date: Tue, 27 Apr 2004 11:59:02 -0400	[thread overview]
Message-ID: <408E8346.9070202@gcctech.com> (raw)
In-Reply-To: 466383553.20040427132502@dts.ru


I've seen that also - if I remember correctly, it was an issue with the
toolchain.  I don't use eldk however, I roll my own.  Check your include
paths and the linker.  Also, in my environment its #include <sys/io.h>
for ioperm stuff.

Sergey Urvanov wrote:

>Hi
>Anybody seen this error?
>I'm getting it while trying to compile  for a ppc405EP based board,
>using the ELDK 2.1 toolchain (ppc_4xx).
>
>I have a problem with next test code:
>
>#include <stdlib.h>
>#include <stdio.h>
>#include <unistd.h>
>#include <errno.h>
>#include <asm/io.h>
>
>#define BASEPORT 0x378
>
>
>int main (int   argc,
>          char  *argv[])
>{
>        int kz=0;
>        if (ioperm(BASEPORT, 3, 1))
>         {
>                perror ("ioperm");
>                exit (1);
>         }
>        outb(0, BASEPORT);
>        printf ("status 1 %d\n", kz);
>        usleep (100000);
>        kz=inb(BASEPORT+1);
>        printf ("status 2 %d\n", kz);
>        if (ioperm(BASEPORT, 3, 0))
>         {
>                perror ("ioperm");
>                exit (1);
>         }
>        printf ("Stop \n");
>        return 0;
>}
>
>
>I try to make:
>
>/opt/eldk/usr/ppc-linux/bin/gcc -c -O2 test.c
>/opt/eldk/usr/ppc-linux/bin/gcc -o test test.o
>
>And in the answer:
>
>test.o: In function `main':
>test.o(.text+0x2c): undefined reference to `ioperm'
>test.o(.text+0x2c): relocation truncated to fit: R_PPC_REL24 ioperm
>test.o(.text+0x54): undefined reference to `outb'
>test.o(.text+0x54): relocation truncated to fit: R_PPC_REL24 outb
>test.o(.text+0x78): undefined reference to `inb'
>test.o(.text+0x78): relocation truncated to fit: R_PPC_REL24 inb
>test.o(.text+0x98): undefined reference to `ioperm'
>test.o(.text+0x98): relocation truncated to fit: R_PPC_REL24 ioperm
>collect2: ld returned 1 exit status
>
>Any help would be appreciated.
>
>Thanx and regards
>Sergey Urvanov
>
>
>

--
Christopher R. Johnson
Principal Software Engineer
GCC Printers
(781)276-8763


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2004-04-27 15:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-27  9:25 ioperm Sergey Urvanov
2004-04-27 15:59 ` Christopher R. Johnson [this message]
2004-04-27 16:44   ` ioperm Wolfgang Denk
2004-04-27 18:55     ` ioperm Christopher R. Johnson
2004-04-27 19:33       ` ioperm Tom Rini
2004-04-27 19:50       ` ioperm Wolfgang Denk
2004-04-28 16:04         ` ioperm Christopher R. Johnson
  -- strict thread matches above, loose matches on Subject: below --
2004-04-27  9:49 ioperm Fillod Stephane
2004-04-27  7:51 ioperm Sergey Urvanov

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=408E8346.9070202@gcctech.com \
    --to=cjohnson@gcctech.com \
    --cc=abs@dts.ru \
    --cc=linuxppc-embedded@lists.linuxppc.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.