* RE: [ECOS] Target.ld
@ 2004-09-17 9:49 Meulendijks, J.
2004-09-17 10:14 ` Andrew Lunn
2004-09-17 10:37 ` Nick Garnett
0 siblings, 2 replies; 7+ messages in thread
From: Meulendijks, J. @ 2004-09-17 9:49 UTC (permalink / raw)
To: 'Andrew Lunn'; +Cc: 'ecos-discuss@sources.redhat.com'
Okee thanks. Now it works fine!
I have one athor question. When eCos configtool builds a configuration it builds
3 directories. One of them is _install, in this directory there's a map called
include and lib. In the lib map there's the file libtarget.a this contains the
eCos you just configured. But if you compile something like this:
powerpc-eabi-gcc -I/ecos-c/ecos-work/kernel_install/include twothreads.c
-L/ecos-c/ecos-work/kernel_install/lib/ -Ttarget.ld -nostdlib -o twothreads.exe
you also need the include directory. Why is this? The library file contains all
the functions needed, right?! Or am I confused here.
Thanks.
-----Original Message-----
From: Andrew Lunn [mailto:andrew@lunn.ch]
Sent: vrijdag 17 september 2004 11:37
To: Meulendijks, J.
Cc: 'ecos-discuss@sources.redhat.com'
Subject: Re: [ECOS] Target.ld
On Fri, Sep 17, 2004 at 11:02:25AM +0200, Meulendijks, J. wrote:
> When I use the following command:
> powerpc-eabi-gcc -I/ecos-c/ecos-work/kernel_install/include twothreads.c
> -L/ecos-c/ecos-work/kernel_install/lib/ -Ttarget.ld -nostdlib -o
twothreads.exe
>
> I get the following output:
> /ecos-c/DOCUME~1/MeulenJ/LOCALS~1/Temp/cc50FydW.o: In function
`cyg_user_start':
>
> /ecos-c/DOCUME~1/MeulenJ/LOCALS~1/Temp/cc50FydW.o(.text+0x20): undefined
referen
> ce to `printf'
> /ecos-c/DOCUME~1/MeulenJ/LOCALS~1/Temp/cc50FydW.o: In function
`simple_program':
>
> /ecos-c/DOCUME~1/MeulenJ/LOCALS~1/Temp/cc50FydW.o(.text+0x100): undefined
refere
> nce to `printf'
> /ecos-c/DOCUME~1/MeulenJ/LOCALS~1/Temp/cc50FydW.o(.text+0x110): undefined
refere
> nce to `rand'
> /ecos-c/DOCUME~1/MeulenJ/LOCALS~1/Temp/cc50FydW.o(.text+0x160): undefined
refere
> nce to `printf'
> collect2: ld returned 1 exit status
>
> Did I miss something?! The directory listed is not supposed to be used...
Its just a tempory directory gcc has placed the object file in.
You are missing printf and rand. rand is part of CYGPKG_LIBC_STDLIB
and printf is in CYGPKG_LIBC_STDIO. Do you have these packages in your
configuration?
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ECOS] Target.ld
2004-09-17 9:49 [ECOS] Target.ld Meulendijks, J.
@ 2004-09-17 10:14 ` Andrew Lunn
2004-09-17 10:37 ` Nick Garnett
1 sibling, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2004-09-17 10:14 UTC (permalink / raw)
To: Meulendijks, J.; +Cc: 'ecos-discuss@sources.redhat.com'
On Fri, Sep 17, 2004 at 11:45:27AM +0200, Meulendijks, J. wrote:
> Okee thanks. Now it works fine!
>
> I have one athor question. When eCos configtool builds a
> configuration it builds 3 directories. One of them is _install, in
> this directory there's a map called include and lib. In the lib map
> there's the file libtarget.a this contains the eCos you just
> configured. But if you compile something like this:
> powerpc-eabi-gcc -I/ecos-c/ecos-work/kernel_install/include twothreads.c
> -L/ecos-c/ecos-work/kernel_install/lib/ -Ttarget.ld -nostdlib -o twothreads.exe
> you also need the include directory. Why is this? The library file
> contains all the functions needed, right?! Or am I confused here.
This is a beginners C question. How does the compiler know that rand()
takes no parameters and return an int? How does it know that the
function time() takes one paramter of type time_t and returns a
time_t. What is a time_t anyway?
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ECOS] Target.ld
2004-09-17 9:49 [ECOS] Target.ld Meulendijks, J.
2004-09-17 10:14 ` Andrew Lunn
@ 2004-09-17 10:37 ` Nick Garnett
1 sibling, 0 replies; 7+ messages in thread
From: Nick Garnett @ 2004-09-17 10:37 UTC (permalink / raw)
To: Meulendijks, J.
Cc: 'Andrew Lunn', 'ecos-discuss@sources.redhat.com'
"Meulendijks, J." <Meulendijks@WT.TNO.NL> writes:
> Okee thanks. Now it works fine!
>
> I have one athor question. When eCos configtool builds a configuration it builds
> 3 directories. One of them is _install, in this directory there's a map called
> include and lib. In the lib map there's the file libtarget.a this contains the
> eCos you just configured. But if you compile something like this:
> powerpc-eabi-gcc -I/ecos-c/ecos-work/kernel_install/include twothreads.c
> -L/ecos-c/ecos-work/kernel_install/lib/ -Ttarget.ld -nostdlib -o twothreads.exe
>
> you also need the include directory. Why is this? The library file contains all
> the functions needed, right?! Or am I confused here.
You are confused :-)
You need the include files to supply the definitions when you compile
twothreads.c. Otherwise you would get a lot of undefined symbols. Try
taking the -I option out and see what happens.
--
Nick Garnett eCos Kernel Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ECOS] Target.ld
2004-09-17 9:02 Meulendijks, J.
@ 2004-09-17 9:37 ` Andrew Lunn
0 siblings, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2004-09-17 9:37 UTC (permalink / raw)
To: Meulendijks, J.; +Cc: 'ecos-discuss@sources.redhat.com'
On Fri, Sep 17, 2004 at 11:02:25AM +0200, Meulendijks, J. wrote:
> When I use the following command:
> powerpc-eabi-gcc -I/ecos-c/ecos-work/kernel_install/include twothreads.c
> -L/ecos-c/ecos-work/kernel_install/lib/ -Ttarget.ld -nostdlib -o twothreads.exe
>
> I get the following output:
> /ecos-c/DOCUME~1/MeulenJ/LOCALS~1/Temp/cc50FydW.o: In function `cyg_user_start':
>
> /ecos-c/DOCUME~1/MeulenJ/LOCALS~1/Temp/cc50FydW.o(.text+0x20): undefined referen
> ce to `printf'
> /ecos-c/DOCUME~1/MeulenJ/LOCALS~1/Temp/cc50FydW.o: In function `simple_program':
>
> /ecos-c/DOCUME~1/MeulenJ/LOCALS~1/Temp/cc50FydW.o(.text+0x100): undefined refere
> nce to `printf'
> /ecos-c/DOCUME~1/MeulenJ/LOCALS~1/Temp/cc50FydW.o(.text+0x110): undefined refere
> nce to `rand'
> /ecos-c/DOCUME~1/MeulenJ/LOCALS~1/Temp/cc50FydW.o(.text+0x160): undefined refere
> nce to `printf'
> collect2: ld returned 1 exit status
>
> Did I miss something?! The directory listed is not supposed to be used...
Its just a tempory directory gcc has placed the object file in.
You are missing printf and rand. rand is part of CYGPKG_LIBC_STDLIB
and printf is in CYGPKG_LIBC_STDIO. Do you have these packages in your
configuration?
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [ECOS] Target.ld
@ 2004-09-17 9:02 Meulendijks, J.
2004-09-17 9:37 ` Andrew Lunn
0 siblings, 1 reply; 7+ messages in thread
From: Meulendijks, J. @ 2004-09-17 9:02 UTC (permalink / raw)
To: 'Nick Garnett'; +Cc: 'ecos-discuss@sources.redhat.com'
When I use the following command:
powerpc-eabi-gcc -I/ecos-c/ecos-work/kernel_install/include twothreads.c
-L/ecos-c/ecos-work/kernel_install/lib/ -Ttarget.ld -nostdlib -o twothreads.exe
I get the following output:
/ecos-c/DOCUME~1/MeulenJ/LOCALS~1/Temp/cc50FydW.o: In function `cyg_user_start':
/ecos-c/DOCUME~1/MeulenJ/LOCALS~1/Temp/cc50FydW.o(.text+0x20): undefined referen
ce to `printf'
/ecos-c/DOCUME~1/MeulenJ/LOCALS~1/Temp/cc50FydW.o: In function `simple_program':
/ecos-c/DOCUME~1/MeulenJ/LOCALS~1/Temp/cc50FydW.o(.text+0x100): undefined refere
nce to `printf'
/ecos-c/DOCUME~1/MeulenJ/LOCALS~1/Temp/cc50FydW.o(.text+0x110): undefined refere
nce to `rand'
/ecos-c/DOCUME~1/MeulenJ/LOCALS~1/Temp/cc50FydW.o(.text+0x160): undefined refere
nce to `printf'
collect2: ld returned 1 exit status
Did I miss something?! The directory listed is not supposed to be used...
-----Original Message-----
From: Nick Garnett [mailto:nickg@ecoscentric.com]
Sent: donderdag 16 september 2004 11:07
To: Meulendijks, J.
Cc: 'ecos-discuss@sources.redhat.com'
Subject: Re: [ECOS] Target.ld
"Meulendijks, J." <Meulendijks@WT.TNO.NL> writes:
> When I use the following command:
>
> powerpc-eabi-gcc -g -l/ecos-c/cygwin/EcosWork/kernel_install/include hello.c
> -l/ecos-c/cygwin/EcosWork/kernel_install/lib -Ttarget.ld -nostdlib
That commandline should probably read:
powerpc-eabi-gcc -g -I/ecos-c/cygwin/EcosWork/kernel_install/include hello.c
-L/ecos-c/cygwin/EcosWork/kernel_install/lib -Ttarget.ld -nostdlib
i.e. -I not -l for the include path, -L not -l for the library path.
--
Nick Garnett eCos Kernel Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ECOS] Target.ld
2004-09-16 8:56 Meulendijks, J.
@ 2004-09-16 9:07 ` Nick Garnett
0 siblings, 0 replies; 7+ messages in thread
From: Nick Garnett @ 2004-09-16 9:07 UTC (permalink / raw)
To: Meulendijks, J.; +Cc: 'ecos-discuss@sources.redhat.com'
"Meulendijks, J." <Meulendijks@WT.TNO.NL> writes:
> When I use the following command:
>
> powerpc-eabi-gcc -g -l/ecos-c/cygwin/EcosWork/kernel_install/include hello.c
> -l/ecos-c/cygwin/EcosWork/kernel_install/lib -Ttarget.ld -nostdlib
That commandline should probably read:
powerpc-eabi-gcc -g -I/ecos-c/cygwin/EcosWork/kernel_install/include hello.c
-L/ecos-c/cygwin/EcosWork/kernel_install/lib -Ttarget.ld -nostdlib
i.e. -I not -l for the include path, -L not -l for the library path.
--
Nick Garnett eCos Kernel Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ECOS] Target.ld
@ 2004-09-16 8:56 Meulendijks, J.
2004-09-16 9:07 ` Nick Garnett
0 siblings, 1 reply; 7+ messages in thread
From: Meulendijks, J. @ 2004-09-16 8:56 UTC (permalink / raw)
To: 'ecos-discuss@sources.redhat.com'
When I use the following command:
powerpc-eabi-gcc -g -l/ecos-c/cygwin/EcosWork/kernel_install/include hello.c
-l/ecos-c/cygwin/EcosWork/kernel_install/lib -Ttarget.ld -nostdlib
I get the following output:
/opt/ecos/gnutools/POWERP~1/bin/../lib/gcc-lib/powerpc-eabi/3.2.1/../../../../po
werpc-eabi/bin/ld: cannot open linker script file target.ld: No such file or
directory
collect2: ld returned 1 exit status
But I don't see anything wrong. The target.ld file is located in
c:/cygwin/ecoswork/kernell_install/lib. And as far as I can see is this the same
as /ecos-c/cygwin/ecoswork/kernell_install/lib
Thanks in advance.
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-09-17 10:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-17 9:49 [ECOS] Target.ld Meulendijks, J.
2004-09-17 10:14 ` Andrew Lunn
2004-09-17 10:37 ` Nick Garnett
-- strict thread matches above, loose matches on Subject: below --
2004-09-17 9:02 Meulendijks, J.
2004-09-17 9:37 ` Andrew Lunn
2004-09-16 8:56 Meulendijks, J.
2004-09-16 9:07 ` Nick Garnett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).