Loading ...
Sorry, an error occurred while loading the content.

Tool Chain Help. PLease.

Expand Messages
  • guerrerosonny
    Hi, I am a novice in Linux. I am able to get to the telnet prompt. I installed NativeNSLU2Toolchain from http://n.ethz.ch/student/gullc/download/toolchain.html
    Message 1 of 8 , Nov 1, 2004
    • 0 Attachment
      Hi, I am a novice in Linux.

      I am able to get to the telnet prompt. I installed
      NativeNSLU2Toolchain from
      http://n.ethz.ch/student/gullc/download/toolchain.html


      I added the folder having the file "armv5b-softfloat-linux-gcc" in
      the PATH.

      I wrote a simple helloworld.c, tried to generate the executable

      armv5b-softfloat-linux-gcc helloworld.c

      I don't get any errors. But I don't see the a.out file.

      I tried giving the command:
      armv5b-softfloat-linux-gcc helloworld.c -o xxx

      I don't see the output file xxx

      I think I am missing something very basic. Please HELP.

      Thanks,
      sonny
    • Kai Steinbach
      Hello ... I am really not sure what that is, but I followed the instructions here: http://www.nslu2-linux.org/wiki/HowTo/CompileCrossTool When I do a
      Message 2 of 8 , Nov 1, 2004
      • 0 Attachment
        Hello

        On Mon, 01 Nov 2004 17:48:33 -0000, guerrerosonny wrote:
        > I am able to get to the telnet prompt. I installed
        > NativeNSLU2Toolchain from
        > http://n.ethz.ch/student/gullc/download/toolchain.html
        >
        > I added the folder having the file "armv5b-softfloat-linux-gcc" in
        > the PATH.
        >
        > I wrote a simple helloworld.c, tried to generate the executable
        >
        > armv5b-softfloat-linux-gcc helloworld.c
        >
        > I don't get any errors. But I don't see the a.out file.
        >
        > I tried giving the command:
        > armv5b-softfloat-linux-gcc helloworld.c -o xxx
        >
        > I don't see the output file xxx
        >
        > I think I am missing something very basic. Please HELP.

        I am really not sure what that is, but I followed the instructions here:
        http://www.nslu2-linux.org/wiki/HowTo/CompileCrossTool

        When I do a
        armv5b-softfloat-linux-gcc hello.c -o hello
        than the file hello is created and it is indeed a ARM binary.

        Kai
      • zyglyf
        Hi I have the same native toolchain running on my NSLU2 and it works fine. I did the following to get it working after I unpacked it. I added gcc/bin to my
        Message 3 of 8 , Nov 2, 2004
        • 0 Attachment
          Hi

          I have the same native toolchain running on my NSLU2 and it works
          fine. I did the following to get it working after I unpacked it.

          I added gcc/bin to my PATH

          PATH=/opt/bin:/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin:/opt/us
          r/bin:/opt/usr/sbin:/share/hdd/data/gcc/bin

          I made a LD_LIBRARY_PATH so the compiled programs could find the
          shared libraries (remember to have the /lib first in the
          LD_LIBRARY_PATH)

          LD_LIBRARY_PATH=/lib:/opt/lib:/share/hdd/data/gcc/armv5b-softfloat-
          linux/lib

          I made symlinks gcc/bin to the executables to avoid the armv5b-
          softfloat-linux- prefix (this is probably not necessary, but it make
          things easier)

          Then it worked for me, I have compiled several standard packages with
          it without problems.

          my installation gives the following output:

          ~ $ gcc --version
          gcc (GCC) 3.3.4
          Copyright (C) 2003 Free Software Foundation, Inc.
          This is free software; see the source for copying conditions. There
          is NO
          warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
          PURPOSE.

          ~ $ gcc helloworld.c -o hello
          ~ $ ./hello
          Hello world!
          ~ $

          Hope this can help you

          /Shorty


          --- In nslu2-linux@yahoogroups.com, "guerrerosonny"
          <guerrerosonny@y...> wrote:
          >
          > Hi, I am a novice in Linux.
          >
          > I am able to get to the telnet prompt. I installed
          > NativeNSLU2Toolchain from
          > http://n.ethz.ch/student/gullc/download/toolchain.html
          >
          >
          > I added the folder having the file "armv5b-softfloat-linux-gcc" in
          > the PATH.
          >
          > I wrote a simple helloworld.c, tried to generate the executable
          >
          > armv5b-softfloat-linux-gcc helloworld.c
          >
          > I don't get any errors. But I don't see the a.out file.
          >
          > I tried giving the command:
          > armv5b-softfloat-linux-gcc helloworld.c -o xxx
          >
          > I don't see the output file xxx
          >
          > I think I am missing something very basic. Please HELP.
          >
          > Thanks,
          > sonny
        • guerrerosonny
          Hi, I followed your instructions. Set the PATH, LIBRARY Include PATH, Links etc. when I issue the command: gcc -c helloworld.c it compiles and I can see
          Message 4 of 8 , Nov 2, 2004
          • 0 Attachment
            Hi,

            I followed your instructions.

            Set the PATH, LIBRARY Include PATH, Links etc.

            when I issue the command:

            gcc -c helloworld.c

            it compiles and I can see helloworld.o file

            when I issue the command

            gcc helloworld.c -o hello

            it does not generate the o/p file hello

            I am wondering if the linker is bad or something, can you send me
            the linker you have please?

            Or can you tell me how to execute linker directly using helloworld.o
            file?

            Thanks,
            Sonny
            --- In nslu2-linux@yahoogroups.com, "zyglyf" <peter.shorty@j...>
            wrote:
            >
            > Hi
            >
            > I have the same native toolchain running on my NSLU2 and it works
            > fine. I did the following to get it working after I unpacked it.
            >
            > I added gcc/bin to my PATH
            >
            >
            PATH=/opt/bin:/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin:/opt/u
            s
            > r/bin:/opt/usr/sbin:/share/hdd/data/gcc/bin
            >
            > I made a LD_LIBRARY_PATH so the compiled programs could find the
            > shared libraries (remember to have the /lib first in the
            > LD_LIBRARY_PATH)
            >
            > LD_LIBRARY_PATH=/lib:/opt/lib:/share/hdd/data/gcc/armv5b-softfloat-
            > linux/lib
            >
            > I made symlinks gcc/bin to the executables to avoid the armv5b-
            > softfloat-linux- prefix (this is probably not necessary, but it
            make
            > things easier)
            >
            > Then it worked for me, I have compiled several standard packages
            with
            > it without problems.
            >
            > my installation gives the following output:
            >
            > ~ $ gcc --version
            > gcc (GCC) 3.3.4
            > Copyright (C) 2003 Free Software Foundation, Inc.
            > This is free software; see the source for copying conditions.
            There
            > is NO
            > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
            > PURPOSE.
            >
            > ~ $ gcc helloworld.c -o hello
            > ~ $ ./hello
            > Hello world!
            > ~ $
            >
            > Hope this can help you
            >
            > /Shorty
            >
            >
            > --- In nslu2-linux@yahoogroups.com, "guerrerosonny"
            > <guerrerosonny@y...> wrote:
            > >
            > > Hi, I am a novice in Linux.
            > >
            > > I am able to get to the telnet prompt. I installed
            > > NativeNSLU2Toolchain from
            > > http://n.ethz.ch/student/gullc/download/toolchain.html
            > >
            > >
            > > I added the folder having the file "armv5b-softfloat-linux-gcc"
            in
            > > the PATH.
            > >
            > > I wrote a simple helloworld.c, tried to generate the executable
            > >
            > > armv5b-softfloat-linux-gcc helloworld.c
            > >
            > > I don't get any errors. But I don't see the a.out file.
            > >
            > > I tried giving the command:
            > > armv5b-softfloat-linux-gcc helloworld.c -o xxx
            > >
            > > I don't see the output file xxx
            > >
            > > I think I am missing something very basic. Please HELP.
            > >
            > > Thanks,
            > > sonny
          • zyglyf
            ... helloworld.o ... You can link the object file by doing gcc helloworld.o -o helloworld Let me know if it doesnt work then I can try to send you my
            Message 5 of 8 , Nov 3, 2004
            • 0 Attachment
              --- In nslu2-linux@yahoogroups.com, "guerrerosonny"
              <guerrerosonny@y...> wrote:
              >
              > Hi,
              >
              > I followed your instructions.
              >
              > Set the PATH, LIBRARY Include PATH, Links etc.
              >
              > when I issue the command:
              >
              > gcc -c helloworld.c
              >
              > it compiles and I can see helloworld.o file
              >
              > when I issue the command
              >
              > gcc helloworld.c -o hello
              >
              > it does not generate the o/p file hello
              >
              > I am wondering if the linker is bad or something, can you send me
              > the linker you have please?
              >
              > Or can you tell me how to execute linker directly using
              helloworld.o
              > file?

              You can link the object file by doing gcc helloworld.o -o helloworld

              Let me know if it doesnt work then I can try to send you my
              executables.

              /Shorty


              >
              > Thanks,
              > Sonny
              > --- In nslu2-linux@yahoogroups.com, "zyglyf" <peter.shorty@j...>
              > wrote:
              > >
              > > Hi
              > >
              > > I have the same native toolchain running on my NSLU2 and it works
              > > fine. I did the following to get it working after I unpacked it.
              > >
              > > I added gcc/bin to my PATH
              > >
              > >
              >
              PATH=/opt/bin:/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin:/opt/u
              > s
              > > r/bin:/opt/usr/sbin:/share/hdd/data/gcc/bin
              > >
              > > I made a LD_LIBRARY_PATH so the compiled programs could find the
              > > shared libraries (remember to have the /lib first in the
              > > LD_LIBRARY_PATH)
              > >
              > > LD_LIBRARY_PATH=/lib:/opt/lib:/share/hdd/data/gcc/armv5b-
              softfloat-
              > > linux/lib
              > >
              > > I made symlinks gcc/bin to the executables to avoid the armv5b-
              > > softfloat-linux- prefix (this is probably not necessary, but it
              > make
              > > things easier)
              > >
              > > Then it worked for me, I have compiled several standard packages
              > with
              > > it without problems.
              > >
              > > my installation gives the following output:
              > >
              > > ~ $ gcc --version
              > > gcc (GCC) 3.3.4
              > > Copyright (C) 2003 Free Software Foundation, Inc.
              > > This is free software; see the source for copying conditions.
              > There
              > > is NO
              > > warranty; not even for MERCHANTABILITY or FITNESS FOR A
              PARTICULAR
              > > PURPOSE.
              > >
              > > ~ $ gcc helloworld.c -o hello
              > > ~ $ ./hello
              > > Hello world!
              > > ~ $
              > >
              > > Hope this can help you
              > >
              > > /Shorty
              > >
              > >
              > > --- In nslu2-linux@yahoogroups.com, "guerrerosonny"
              > > <guerrerosonny@y...> wrote:
              > > >
              > > > Hi, I am a novice in Linux.
              > > >
              > > > I am able to get to the telnet prompt. I installed
              > > > NativeNSLU2Toolchain from
              > > > http://n.ethz.ch/student/gullc/download/toolchain.html
              > > >
              > > >
              > > > I added the folder having the file "armv5b-softfloat-linux-gcc"
              > in
              > > > the PATH.
              > > >
              > > > I wrote a simple helloworld.c, tried to generate the executable
              > > >
              > > > armv5b-softfloat-linux-gcc helloworld.c
              > > >
              > > > I don't get any errors. But I don't see the a.out file.
              > > >
              > > > I tried giving the command:
              > > > armv5b-softfloat-linux-gcc helloworld.c -o xxx
              > > >
              > > > I don't see the output file xxx
              > > >
              > > > I think I am missing something very basic. Please HELP.
              > > >
              > > > Thanks,
              > > > sonny
            • guerrerosonny
              Hi, I tried it gcc -o hello helloworld.o did not help I tried to ececute the linker directly looks like a number of files in the lib folder have file size of 0
              Message 6 of 8 , Nov 4, 2004
              • 0 Attachment
                Hi,

                I tried it

                gcc -o hello helloworld.o

                did not help

                I tried to ececute the linker directly

                looks like a number of files in the lib folder have file size of 0

                Please zip the entire gcc folder and send me a link if you don't
                mind.

                thanks,
                sonny.


                # pwd
                /share/hdd/data/gcc/armv5b-softfloat-linux/lib
                # ls -alS
                -rwxrw---- 1 sanjay everyone 8272090 Sep 28 05:57 libstdc++.a
                -rwxrw---- 1 sanjay everyone 2626378 Sep 28 05:50 libc.a
                -rwxrw---- 1 sanjay everyone 1335581 Sep 28 05:51 libc-2.2.5.so
                -rwxrw---- 1 sanjay everyone 831436 Sep 28 05:57 libiberty.a
                -rwxrw---- 1 sanjay everyone 755342 Sep 28 05:51 libm.a
                -rwxrw---- 1 sanjay everyone 530611 Sep 28 05:51 libm-2.2.5.so
                -rwxrw---- 1 sanjay everyone 454206 Sep 28 05:57 libsupc++.a
                -rwxrw---- 1 sanjay everyone 121946 Sep 28 05:51 libnsl.a
                -rwxrw---- 1 sanjay everyone 120054 Sep 28 05:51 libpthread.a
                -rwxrw---- 1 sanjay everyone 105457 Sep 28 05:51 ld-2.2.5.so
                -rwxrw---- 1 sanjay everyone 100935 Sep 28 05:51 libpthread-
                0.9.so
                -rwxrw---- 1 sanjay everyone 90021 Sep 28 05:51 libnsl-
                2.2.5.so
                -rwxrw---- 1 sanjay everyone 87366 Sep 28 05:51 libresolv.a
                -rwxrw---- 1 sanjay everyone 76863 Sep 28 05:51 libresolv-
                2.2.5.so
                -rwxrw---- 1 sanjay everyone 54570 Sep 28 05:51
                libnss_nisplus-2.2.5.so
                -rwxrw---- 1 sanjay everyone 52588 Sep 28 05:51
                libnss_compat-2.2.5.so
                -rwxrw---- 1 sanjay everyone 52369 Sep 28 05:51 libnss_files-
                2.2.5.so
                -rwxrw---- 1 sanjay everyone 49986 Sep 28 05:51 librt.a
                -rwxrw---- 1 sanjay everyone 49592 Sep 28 05:51 libnss_nis-
                2.2.5.so
                -rwxrw---- 1 sanjay everyone 37619 Sep 28 05:51 librt-
                2.2.5.so
                -rwxrw---- 1 sanjay everyone 28415 Sep 28 05:51 libthread_db-
                1.0.so
                -rwxrw---- 1 sanjay everyone 26510 Sep 28 05:51 libcrypt-
                2.2.5.so
                -rwxrw---- 1 sanjay everyone 23642 Sep 28 05:51 libcrypt.a
                -rwxrw---- 1 sanjay everyone 22005 Sep 28 05:51
                libnss_hesiod-2.2.5.so
                -rwxrw---- 1 sanjay everyone 18154 Sep 28 05:51 libnss_dns-
                2.2.5.so
                -rwxrw---- 1 sanjay everyone 18075 Sep 28 05:51
                libSegFault.so
                -rwxrw---- 1 sanjay everyone 18008 Sep 28 05:51
                libmemusage.so
                -rwxrw---- 1 sanjay everyone 16232 Sep 28 05:51 libanl-
                2.2.5.so
                -rwxrw---- 1 sanjay everyone 15236 Sep 28 05:51 libdl-
                2.2.5.so
                -rwxrw---- 1 sanjay everyone 13655 Sep 28 05:51 libutil-
                2.2.5.so
                -rwxrw---- 1 sanjay everyone 12394 Sep 28 05:51 libanl.a
                -rwxrw---- 1 sanjay everyone 9384 Sep 28 05:51
                libpcprofile.so
                -rwxrw---- 1 sanjay everyone 8628 Sep 28 05:51 libutil.a
                -rwxrw---- 1 sanjay everyone 8141 Sep 28 05:50
                libBrokenLocale-2.2.5.so
                -rwxrw---- 1 sanjay everyone 7440 Sep 28 05:51 libdl.a
                -rwxrw---- 1 sanjay everyone 6516 Sep 28 05:50
                libc_nonshared.a
                drwxrwxr-x 6 sanjay everyone 4096 Oct 28 10:13 .
                drwxrwxr-x 12 sanjay everyone 4096 Oct 28 10:18 ..
                drwxrwxr-x 2 sanjay everyone 4096 Oct 28 10:12 gconv
                drwxrwxr-x 2 sanjay everyone 4096 Oct 28 10:12 ldscripts
                drwxrwxr-x 2 sanjay everyone 4096 Oct 28 10:12
                libgcc_s.so.1.dir
                drwxrwxr-x 2 sanjay everyone 4096 Oct 28 10:12
                libstdc++.so.5.0.6.dir
                -rwxrw---- 1 sanjay everyone 2516 Sep 28 05:50 crti.o
                -rwxrw---- 1 sanjay everyone 2511 Sep 28 05:57 libstdc++.la
                -rwxrw---- 1 sanjay everyone 2303 Sep 28 05:57 libsupc++.la
                -rwxrw---- 1 sanjay everyone 2128 Sep 28 05:50 crtn.o
                -rwxrw---- 1 sanjay everyone 2076 Sep 28 05:50 gcrt1.o
                -rwxrw---- 1 sanjay everyone 1731 Sep 28 05:50 crt1.o
                -rwxrw---- 1 sanjay everyone 1150 Sep 28 05:50
                libBrokenLocale.a
                -rwxrw---- 1 sanjay everyone 812 Sep 28 05:51 libmcheck.a
                -rwxrw---- 1 sanjay everyone 744 Sep 28 05:51 libbsd-
                compat.a
                -rwxrw---- 1 sanjay everyone 744 Sep 28 05:51 libg.a
                -rwxrw---- 1 sanjay everyone 605 Sep 28 05:51 libieee.a
                -rwxrw---- 1 sanjay everyone 549 Sep 28 05:50 Mcrt1.o
                -rwxrw---- 1 sanjay everyone 174 Sep 28 05:50 libc.so_orig
                -rwxrw---- 1 sanjay everyone 164 Sep 28 05:51 libc.so
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51 ld-linux.so.2
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:50
                libBrokenLocale.so
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:50
                libBrokenLocale.so.1
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51 libanl.so
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51 libanl.so.1
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:50 libc.so.6
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51 libcrypt.so
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51 libcrypt.so.1
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51 libdl.so
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51 libdl.so.2
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:57 libgcc_s.so
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:57 libgcc_s.so.1
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51 libm.so
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51 libm.so.6
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51 libnsl.so
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51 libnsl.so.1
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51
                libnss_compat.so
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51
                libnss_compat.so.2
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51 libnss_dns.so
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51
                libnss_dns.so.2
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51
                libnss_files.so
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51
                libnss_files.so.2
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51
                libnss_hesiod.so
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51
                libnss_hesiod.so.2
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51 libnss_nis.so
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51
                libnss_nis.so.2
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51
                libnss_nisplus.so
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51
                libnss_nisplus.so.2
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51 libpthread.so
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51
                libpthread.so.0
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51 libresolv.so
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51
                libresolv.so.2
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51 librt.so
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51 librt.so.1
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:57 libstdc++.so
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:57
                libstdc++.so.5
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:57
                libstdc++.so.5.0.6
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51
                libthread_db.so
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51
                libthread_db.so.1
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51 libutil.so
                -rwxrw---- 1 sanjay everyone 0 Sep 28 05:51 libutil.so.1
                #




                # ld -o output /share/hdd/data/gcc/armv5b-softfloat-linux/lib/crt1.o
                helloworld.o -lc --verbose >err
                /share/hdd/data/gcc/bin/../armv5b-softfloat-linux/lib/libc.so.6:
                file not recognized: File truncated
                #cat err

                # cat err
                GNU ld version 2.15
                Supported emulations:
                armelfb_linux
                armelfb
                using internal linker script:
                ==================================================
                /* Script for -z combreloc: combine and sort reloc sections */
                OUTPUT_FORMAT("elf32-bigarm", "elf32-bigarm",
                "elf32-littlearm")
                OUTPUT_ARCH(arm)
                ENTRY(_start)
                SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR
                ("=/usr/lib");
                /* Do we need any of these for elf?
                __DYNAMIC = 0; */
                SECTIONS
                {
                /* Read-only sections, merged into text segment: */
                PROVIDE (__executable_start = 0x00008000); . = 0x00008000 +
                SIZEOF_HEADERS;
                .interp : { *(.interp) }
                .hash : { *(.hash) }
                .dynsym : { *(.dynsym) }
                .dynstr : { *(.dynstr) }
                .gnu.version : { *(.gnu.version) }
                .gnu.version_d : { *(.gnu.version_d) }
                .gnu.version_r : { *(.gnu.version_r) }
                .rel.dyn :
                {
                *(.rel.init)
                *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
                *(.rel.fini)
                *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
                *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
                *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
                *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
                *(.rel.ctors)
                *(.rel.dtors)
                *(.rel.got)
                *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
                }
                .rela.dyn :
                {
                *(.rela.init)
                *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
                *(.rela.fini)
                *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
                *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
                *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
                *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
                *(.rela.ctors)
                *(.rela.dtors)
                *(.rela.got)
                *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
                }
                .rel.plt : { *(.rel.plt) }
                .rela.plt : { *(.rela.plt) }
                .init :
                {
                KEEP (*(.init))
                } =0
                .plt : { *(.plt) }
                .text :
                {
                *(.text .stub .text.* .gnu.linkonce.t.*)
                /* .gnu.warning sections are handled specially by elf32.em. */
                *(.gnu.warning)
                *(.glue_7t) *(.glue_7)
                } =0
                .fini :
                {
                KEEP (*(.fini))
                } =0
                PROVIDE (__etext = .);
                PROVIDE (_etext = .);
                PROVIDE (etext = .);
                .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
                .rodata1 : { *(.rodata1) }
                .eh_frame_hdr : { *(.eh_frame_hdr) }
                /* Adjust the address for the data segment. We want to adjust up
                to
                the same address within the page on the next page up. */
                . = ALIGN (0x8000) - ((0x8000 - .) & (0x8000 - 1)); . =
                DATA_SEGMENT_ALIGN (0x8000, 0x1000);
                /* Ensure the __preinit_array_start label is properly aligned. We
                could instead move the label definition inside the section, but
                the linker would then create the section even if it turns out to
                be empty, which isn't pretty. */
                . = ALIGN(32 / 8);
                PROVIDE (__preinit_array_start = .);
                .preinit_array : { *(.preinit_array) }
                PROVIDE (__preinit_array_end = .);
                PROVIDE (__init_array_start = .);
                .init_array : { *(.init_array) }
                PROVIDE (__init_array_end = .);
                PROVIDE (__fini_array_start = .);
                .fini_array : { *(.fini_array) }
                PROVIDE (__fini_array_end = .);
                .data :
                {
                __data_start = . ;
                *(.data .data.* .gnu.linkonce.d.*)
                SORT(CONSTRUCTORS)
                }
                .data1 : { *(.data1) }
                .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
                .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *
                (.tcommon) }
                .eh_frame : { KEEP (*(.eh_frame)) }
                .gcc_except_table : { *(.gcc_except_table) }
                .dynamic : { *(.dynamic) }
                .ctors :
                {
                /* gcc uses crtbegin.o to find the start of
                the constructors, so we make sure it is
                first. Because this is a wildcard, it
                doesn't matter if the user does not
                actually link against crtbegin.o; the
                linker won't look for a file to match a
                wildcard. The wildcard also means that it
                doesn't matter which directory crtbegin.o
                is in. */
                KEEP (*crtbegin*.o(.ctors))
                /* We don't want to include the .ctor section from
                from the crtend.o file until after the sorted ctors.
                The .ctor section from the crtend file contains the
                end of ctors marker and it must be last */
                KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
                KEEP (*(SORT(.ctors.*)))
                KEEP (*(.ctors))
                }
                .dtors :
                {
                KEEP (*crtbegin*.o(.dtors))
                KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
                KEEP (*(SORT(.dtors.*)))
                KEEP (*(.dtors))
                }
                .jcr : { KEEP (*(.jcr)) }
                .got : { *(.got.plt) *(.got) }
                _edata = .;
                PROVIDE (edata = .);
                __bss_start = .;
                __bss_start__ = .;
                .bss :
                {
                *(.dynbss)
                *(.bss .bss.* .gnu.linkonce.b.*)
                *(COMMON)
                /* Align here to ensure that the .bss section occupies space up to
                _end. Align after .bss to ensure correct alignment even if the
                .bss section disappears because there are no input sections.
                */
                . = ALIGN(32 / 8);
                }
                . = ALIGN(32 / 8);
                _end = .;
                _bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
                PROVIDE (end = .);
                . = DATA_SEGMENT_END (.);
                /* Stabs debugging sections. */
                .stab 0 : { *(.stab) }
                .stabstr 0 : { *(.stabstr) }
                .stab.excl 0 : { *(.stab.excl) }
                .stab.exclstr 0 : { *(.stab.exclstr) }
                .stab.index 0 : { *(.stab.index) }
                .stab.indexstr 0 : { *(.stab.indexstr) }
                .comment 0 : { *(.comment) }
                /* DWARF debug sections.
                Symbols in the DWARF debugging sections are relative to the
                beginning
                of the section so we begin them at 0. */
                /* DWARF 1 */
                .debug 0 : { *(.debug) }
                .line 0 : { *(.line) }
                /* GNU DWARF 1 extensions */
                .debug_srcinfo 0 : { *(.debug_srcinfo) }
                .debug_sfnames 0 : { *(.debug_sfnames) }
                /* DWARF 1.1 and DWARF 2 */
                .debug_aranges 0 : { *(.debug_aranges) }
                .debug_pubnames 0 : { *(.debug_pubnames) }
                /* DWARF 2 */
                .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
                .debug_abbrev 0 : { *(.debug_abbrev) }
                .debug_line 0 : { *(.debug_line) }
                .debug_frame 0 : { *(.debug_frame) }
                .debug_str 0 : { *(.debug_str) }
                .debug_loc 0 : { *(.debug_loc) }
                .debug_macinfo 0 : { *(.debug_macinfo) }
                /* SGI/MIPS DWARF 2 extensions */
                .debug_weaknames 0 : { *(.debug_weaknames) }
                .debug_funcnames 0 : { *(.debug_funcnames) }
                .debug_typenames 0 : { *(.debug_typenames) }
                .debug_varnames 0 : { *(.debug_varnames) }
                .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
                /DISCARD/ : { *(.note.GNU-stack) }
                }


                ==================================================
                attempt to open /share/hdd/data/gcc/armv5b-softfloat-
                linux/lib/crt1.o succeeded
                /share/hdd/data/gcc/armv5b-softfloat-linux/lib/crt1.o
                attempt to open helloworld.o succeeded
                helloworld.o
                attempt to open /share/hdd/data/gcc/bin/../armv5b-softfloat-
                linux/lib/libc.so succeeded
                opened script file /share/hdd/data/gcc/bin/../armv5b-softfloat-
                linux/lib/libc.so
                opened script file /share/hdd/data/gcc/bin/../armv5b-softfloat-
                linux/lib/libc.so
                attempt to open libc.so.6 failed
                attempt to open /share/hdd/data/gcc/bin/../armv5b-softfloat-
                linux/lib/libc.so.6 succeeded
                # cat err
                GNU ld version 2.15
                Supported emulations:
                armelfb_linux
                armelfb
                using internal linker script:
                ==================================================
                /* Script for -z combreloc: combine and sort reloc sections */
                OUTPUT_FORMAT("elf32-bigarm", "elf32-bigarm",
                "elf32-littlearm")
                OUTPUT_ARCH(arm)
                ENTRY(_start)
                SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR
                ("=/usr/lib");
                /* Do we need any of these for elf?
                __DYNAMIC = 0; */
                SECTIONS
                {
                /* Read-only sections, merged into text segment: */
                PROVIDE (__executable_start = 0x00008000); . = 0x00008000 +
                SIZEOF_HEADERS;
                .interp : { *(.interp) }
                .hash : { *(.hash) }
                .dynsym : { *(.dynsym) }
                .dynstr : { *(.dynstr) }
                .gnu.version : { *(.gnu.version) }
                .gnu.version_d : { *(.gnu.version_d) }
                .gnu.version_r : { *(.gnu.version_r) }
                .rel.dyn :
                {
                *(.rel.init)
                *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
                *(.rel.fini)
                *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
                *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
                *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
                *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
                *(.rel.ctors)
                *(.rel.dtors)
                *(.rel.got)
                *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
                }
                .rela.dyn :
                {
                *(.rela.init)
                *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
                *(.rela.fini)
                *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
                *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
                *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
                *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
                *(.rela.ctors)
                *(.rela.dtors)
                *(.rela.got)
                *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
                }
                .rel.plt : { *(.rel.plt) }
                .rela.plt : { *(.rela.plt) }
                .init :
                {
                KEEP (*(.init))
                } =0
                .plt : { *(.plt) }
                .text :
                {
                *(.text .stub .text.* .gnu.linkonce.t.*)
                /* .gnu.warning sections are handled specially by elf32.em. */
                *(.gnu.warning)
                *(.glue_7t) *(.glue_7)
                } =0
                .fini :
                {
                KEEP (*(.fini))
                } =0
                PROVIDE (__etext = .);
                PROVIDE (_etext = .);
                PROVIDE (etext = .);
                .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
                .rodata1 : { *(.rodata1) }
                .eh_frame_hdr : { *(.eh_frame_hdr) }
                /* Adjust the address for the data segment. We want to adjust up
                to
                the same address within the page on the next page up. */
                . = ALIGN (0x8000) - ((0x8000 - .) & (0x8000 - 1)); . =
                DATA_SEGMENT_ALIGN (0x8000, 0x1000);
                /* Ensure the __preinit_array_start label is properly aligned. We
                could instead move the label definition inside the section, but
                the linker would then create the section even if it turns out to
                be empty, which isn't pretty. */
                . = ALIGN(32 / 8);
                PROVIDE (__preinit_array_start = .);
                .preinit_array : { *(.preinit_array) }
                PROVIDE (__preinit_array_end = .);
                PROVIDE (__init_array_start = .);
                .init_array : { *(.init_array) }
                PROVIDE (__init_array_end = .);
                PROVIDE (__fini_array_start = .);
                .fini_array : { *(.fini_array) }
                PROVIDE (__fini_array_end = .);
                .data :
                {
                __data_start = . ;
                *(.data .data.* .gnu.linkonce.d.*)
                SORT(CONSTRUCTORS)
                }
                .data1 : { *(.data1) }
                .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
                .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *
                (.tcommon) }
                .eh_frame : { KEEP (*(.eh_frame)) }
                .gcc_except_table : { *(.gcc_except_table) }
                .dynamic : { *(.dynamic) }
                .ctors :
                {
                /* gcc uses crtbegin.o to find the start of
                the constructors, so we make sure it is
                first. Because this is a wildcard, it
                doesn't matter if the user does not
                actually link against crtbegin.o; the
                linker won't look for a file to match a
                wildcard. The wildcard also means that it
                doesn't matter which directory crtbegin.o
                is in. */
                KEEP (*crtbegin*.o(.ctors))
                /* We don't want to include the .ctor section from
                from the crtend.o file until after the sorted ctors.
                The .ctor section from the crtend file contains the
                end of ctors marker and it must be last */
                KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
                KEEP (*(SORT(.ctors.*)))
                KEEP (*(.ctors))
                }
                .dtors :
                {
                KEEP (*crtbegin*.o(.dtors))
                KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
                KEEP (*(SORT(.dtors.*)))
                KEEP (*(.dtors))
                }
                .jcr : { KEEP (*(.jcr)) }
                .got : { *(.got.plt) *(.got) }
                _edata = .;
                PROVIDE (edata = .);
                __bss_start = .;
                __bss_start__ = .;
                .bss :
                {
                *(.dynbss)
                *(.bss .bss.* .gnu.linkonce.b.*)
                *(COMMON)
                /* Align here to ensure that the .bss section occupies space up to
                _end. Align after .bss to ensure correct alignment even if the
                .bss section disappears because there are no input sections.
                */
                . = ALIGN(32 / 8);
                }
                . = ALIGN(32 / 8);
                _end = .;
                _bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
                PROVIDE (end = .);
                . = DATA_SEGMENT_END (.);
                /* Stabs debugging sections. */
                .stab 0 : { *(.stab) }
                .stabstr 0 : { *(.stabstr) }
                .stab.excl 0 : { *(.stab.excl) }
                .stab.exclstr 0 : { *(.stab.exclstr) }
                .stab.index 0 : { *(.stab.index) }
                .stab.indexstr 0 : { *(.stab.indexstr) }
                .comment 0 : { *(.comment) }
                /* DWARF debug sections.
                Symbols in the DWARF debugging sections are relative to the
                beginning
                of the section so we begin them at 0. */
                /* DWARF 1 */
                .debug 0 : { *(.debug) }
                .line 0 : { *(.line) }
                /* GNU DWARF 1 extensions */
                .debug_srcinfo 0 : { *(.debug_srcinfo) }
                .debug_sfnames 0 : { *(.debug_sfnames) }
                /* DWARF 1.1 and DWARF 2 */
                .debug_aranges 0 : { *(.debug_aranges) }
                .debug_pubnames 0 : { *(.debug_pubnames) }
                /* DWARF 2 */
                .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
                .debug_abbrev 0 : { *(.debug_abbrev) }
                .debug_line 0 : { *(.debug_line) }
                .debug_frame 0 : { *(.debug_frame) }
                .debug_str 0 : { *(.debug_str) }
                .debug_loc 0 : { *(.debug_loc) }
                .debug_macinfo 0 : { *(.debug_macinfo) }
                /* SGI/MIPS DWARF 2 extensions */
                .debug_weaknames 0 : { *(.debug_weaknames) }
                .debug_funcnames 0 : { *(.debug_funcnames) }
                .debug_typenames 0 : { *(.debug_typenames) }
                .debug_varnames 0 : { *(.debug_varnames) }
                .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
                /DISCARD/ : { *(.note.GNU-stack) }
                }


                ==================================================
                attempt to open /share/hdd/data/gcc/armv5b-softfloat-
                linux/lib/crt1.o succeeded
                /share/hdd/data/gcc/armv5b-softfloat-linux/lib/crt1.o
                attempt to open helloworld.o succeeded
                helloworld.o
                attempt to open /share/hdd/data/gcc/bin/../armv5b-softfloat-
                linux/lib/libc.so succeeded
                opened script file /share/hdd/data/gcc/bin/../armv5b-softfloat-
                linux/lib/libc.so
                opened script file /share/hdd/data/gcc/bin/../armv5b-softfloat-
                linux/lib/libc.so
                attempt to open libc.so.6 failed
                attempt to open /share/hdd/data/gcc/bin/../armv5b-softfloat-
                linux/lib/libc.so.6 succeeded
                #










                --- In nslu2-linux@yahoogroups.com, "zyglyf" <peter.shorty@j...>
                wrote:
                >
                > --- In nslu2-linux@yahoogroups.com, "guerrerosonny"
                > <guerrerosonny@y...> wrote:
                > >
                > > Hi,
                > >
                > > I followed your instructions.
                > >
                > > Set the PATH, LIBRARY Include PATH, Links etc.
                > >
                > > when I issue the command:
                > >
                > > gcc -c helloworld.c
                > >
                > > it compiles and I can see helloworld.o file
                > >
                > > when I issue the command
                > >
                > > gcc helloworld.c -o hello
                > >
                > > it does not generate the o/p file hello
                > >
                > > I am wondering if the linker is bad or something, can you send
                me
                > > the linker you have please?
                > >
                > > Or can you tell me how to execute linker directly using
                > helloworld.o
                > > file?
                >
                > You can link the object file by doing gcc helloworld.o -o
                helloworld
                >
                > Let me know if it doesnt work then I can try to send you my
                > executables.
                >
                > /Shorty
                >
                >
                > >
                > > Thanks,
                > > Sonny
                > > --- In nslu2-linux@yahoogroups.com, "zyglyf" <peter.shorty@j...>
                > > wrote:
                > > >
                > > > Hi
                > > >
                > > > I have the same native toolchain running on my NSLU2 and it
                works
                > > > fine. I did the following to get it working after I unpacked
                it.
                > > >
                > > > I added gcc/bin to my PATH
                > > >
                > > >
                > >
                >
                PATH=/opt/bin:/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin:/opt/u
                > > s
                > > > r/bin:/opt/usr/sbin:/share/hdd/data/gcc/bin
                > > >
                > > > I made a LD_LIBRARY_PATH so the compiled programs could find
                the
                > > > shared libraries (remember to have the /lib first in the
                > > > LD_LIBRARY_PATH)
                > > >
                > > > LD_LIBRARY_PATH=/lib:/opt/lib:/share/hdd/data/gcc/armv5b-
                > softfloat-
                > > > linux/lib
                > > >
                > > > I made symlinks gcc/bin to the executables to avoid the armv5b-
                > > > softfloat-linux- prefix (this is probably not necessary, but
                it
                > > make
                > > > things easier)
                > > >
                > > > Then it worked for me, I have compiled several standard
                packages
                > > with
                > > > it without problems.
                > > >
                > > > my installation gives the following output:
                > > >
                > > > ~ $ gcc --version
                > > > gcc (GCC) 3.3.4
                > > > Copyright (C) 2003 Free Software Foundation, Inc.
                > > > This is free software; see the source for copying conditions.
                > > There
                > > > is NO
                > > > warranty; not even for MERCHANTABILITY or FITNESS FOR A
                > PARTICULAR
                > > > PURPOSE.
                > > >
                > > > ~ $ gcc helloworld.c -o hello
                > > > ~ $ ./hello
                > > > Hello world!
                > > > ~ $
                > > >
                > > > Hope this can help you
                > > >
                > > > /Shorty
                > > >
                > > >
                > > > --- In nslu2-linux@yahoogroups.com, "guerrerosonny"
                > > > <guerrerosonny@y...> wrote:
                > > > >
                > > > > Hi, I am a novice in Linux.
                > > > >
                > > > > I am able to get to the telnet prompt. I installed
                > > > > NativeNSLU2Toolchain from
                > > > > http://n.ethz.ch/student/gullc/download/toolchain.html
                > > > >
                > > > >
                > > > > I added the folder having the file "armv5b-softfloat-linux-
                gcc"
                > > in
                > > > > the PATH.
                > > > >
                > > > > I wrote a simple helloworld.c, tried to generate the
                executable
                > > > >
                > > > > armv5b-softfloat-linux-gcc helloworld.c
                > > > >
                > > > > I don't get any errors. But I don't see the a.out file.
                > > > >
                > > > > I tried giving the command:
                > > > > armv5b-softfloat-linux-gcc helloworld.c -o xxx
                > > > >
                > > > > I don't see the output file xxx
                > > > >
                > > > > I think I am missing something very basic. Please HELP.
                > > > >
                > > > > Thanks,
                > > > > sonny
              • rwhitby
                On Thu, 04 Nov 2004 15:11:16 -0000, guerrerosonny ... Looks like you unpacked the file with something that does not understand symbolic links. All those zero
                Message 7 of 8 , Nov 4, 2004
                • 0 Attachment
                  On Thu, 04 Nov 2004 15:11:16 -0000, guerrerosonny
                  <guerrerosonny@...> wrote:
                  > looks like a number of files in the lib folder have file size of 0

                  Looks like you unpacked the file with something that does not
                  understand symbolic links. All those zero length files should be
                  symolic links to the other files with the same base name.

                  -- Rod
                • guerrerosonny
                  Hi, Ok, good. I fixed the problem. Now I get the following: # gcc helloworld.c /share/hdd/data/gcc/bin/../lib/gcc-lib/armv5b-softfloat-
                  Message 8 of 8 , Nov 4, 2004
                  • 0 Attachment
                    Hi,

                    Ok, good. I fixed the problem.

                    Now I get the following:

                    # gcc helloworld.c
                    /share/hdd/data/gcc/bin/../lib/gcc-lib/armv5b-softfloat-
                    linux/3.3.4/../../../../armv5b-softfloat-linux/bin/ld: cannot find -
                    lgcc_s
                    collect2: ld returned 1 exit status
                    #
                    #
                    #
                    #gcc --static helloworld.c
                    # ./a.out
                    hello
                    #


                    what is this option --static?
                    ------------------------------

                    The good news is that the toolchain works!!!

                    Thanks,
                    Sonny.


                    --- In nslu2-linux@yahoogroups.com, rwhitby <unslung@g...> wrote:
                    > On Thu, 04 Nov 2004 15:11:16 -0000, guerrerosonny
                    > <guerrerosonny@y...> wrote:
                    > > looks like a number of files in the lib folder have file size of
                    0
                    >
                    > Looks like you unpacked the file with something that does not
                    > understand symbolic links. All those zero length files should be
                    > symolic links to the other files with the same base name.
                    >
                    > -- Rod
                  Your message has been successfully submitted and would be delivered to recipients shortly.