public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] eCos CVS  <--> eCos 1.3.1 differences in net/eth_drv.c
@ 2001-05-08  7:35 Ivan Jakab
  2001-05-08  7:38 ` [ECOS] eCos CVS <--> eCos 1.3.1 differences in net/eth_drv Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: Ivan Jakab @ 2001-05-08  7:35 UTC (permalink / raw)
  To: ecos-discuss

Hi,

I'm currently moving support for a MIPS R3041 based board from the eCos
1.3.1 tree to the current CVS tree. When building the eCos CVS tests I got
messages that claimed undefined reference for eth_drv_init(), eth_drv_recv()
and eth_drv_tx_done() in packages\io\serial\current\src\common\serial.c:xxx.
When comparing the eth_drv.c, where those functions are defined, from the
1.3.1 and the CVS eCos I noticed that in the CVS they're defined as static.
I changed their definition not be static (as they were in the 1.3.1 tree)
and all the tests passed without any "undefined reference" messages. Why was
the definition of those functions changed to be static? Am I missing
something here?


Regards,

Ivan


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [ECOS] eCos CVS  <--> eCos 1.3.1 differences in net/eth_drv.
  2001-05-08  7:35 [ECOS] eCos CVS <--> eCos 1.3.1 differences in net/eth_drv.c Ivan Jakab
@ 2001-05-08  7:38 ` Gary Thomas
  2001-05-09  3:17   ` Ivan Jakab
  0 siblings, 1 reply; 4+ messages in thread
From: Gary Thomas @ 2001-05-08  7:38 UTC (permalink / raw)
  To: Ivan Jakab; +Cc: ecos-discuss

On 08-May-2001 Ivan Jakab wrote:
> Hi,
> 
> I'm currently moving support for a MIPS R3041 based board from the eCos
> 1.3.1 tree to the current CVS tree. When building the eCos CVS tests I got
> messages that claimed undefined reference for eth_drv_init(), eth_drv_recv()
> and eth_drv_tx_done() in packages\io\serial\current\src\common\serial.c:xxx.
> When comparing the eth_drv.c, where those functions are defined, from the
> 1.3.1 and the CVS eCos I noticed that in the CVS they're defined as static.
> I changed their definition not be static (as they were in the 1.3.1 tree)
> and all the tests passed without any "undefined reference" messages. Why was
> the definition of those functions changed to be static? Am I missing
> something here?

These interfaces have now changed and must only be accessed via the function
tables (pointers).  Look at some of the other drivers for examples.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [ECOS] eCos CVS  <--> eCos 1.3.1 differences in net/eth_drv.
  2001-05-08  7:38 ` [ECOS] eCos CVS <--> eCos 1.3.1 differences in net/eth_drv Gary Thomas
@ 2001-05-09  3:17   ` Ivan Jakab
  2001-05-09  6:47     ` Robin Farine
  0 siblings, 1 reply; 4+ messages in thread
From: Ivan Jakab @ 2001-05-09  3:17 UTC (permalink / raw)
  To: ecos-discuss

> -----Original Message-----
> From: gary@chez-thomas.org [ mailto:gary@chez-thomas.org]On Behalf Of
> Gary Thomas
> Sent: Tuesday, May 08, 2001 4:39 PM
> To: Ivan Jakab
> Cc: ecos-discuss@sources.redhat.com
> Subject: RE: [ECOS] eCos CVS <--> eCos 1.3.1 differences in net/eth_drv.
>
>
>
> On 08-May-2001 Ivan Jakab wrote:
> > Hi,
> >
> > I'm currently moving support for a MIPS R3041 based board from the eCos
> > 1.3.1 tree to the current CVS tree. When building the eCos CVS
> tests I got
> > messages that claimed undefined reference for eth_drv_init(),
> eth_drv_recv()
> > and eth_drv_tx_done() in
> packages\io\serial\current\src\common\serial.c:xxx.
> > When comparing the eth_drv.c, where those functions are
> defined, from the
> > 1.3.1 and the CVS eCos I noticed that in the CVS they're
> defined as static.
> > I changed their definition not be static (as they were in the
> 1.3.1 tree)
> > and all the tests passed without any "undefined reference"
> messages. Why was
> > the definition of those functions changed to be static? Am I missing
> > something here?
>
> These interfaces have now changed and must only be accessed via
> the function
> tables (pointers).  Look at some of the other drivers for examples.
>

The thing that confuses me is that the "undefined reference to
eth_drv_xxx()" messages are connected to
packages\io\serial\current\src\common\serial.c. Here is the ouput I get when
building the eCos tests:

mipsel-r3041-elf-gcc -msoft-float -g -nostdlib -Wl,--gc-sections -Wl,-static
 -L//F/Projects/ecoscvs/TestRange/test/test_install/lib -Ttarget.ld -o
//F/Projects/ecoscvs/TestRange/test/test_install/tests/hal/common/current/te
sts/cache tests/cache.o

//F/Projects/ecoscvs/TestRange/test/test_install/lib/extras.o: In function
`serial_xmt_char':
//f/Projects/ecoscvs/ecoscvs-working/ecos/packages/io/serial/current/src/com
mon/serial.c:847: undefined reference to `eth_drv_tx_done'

//F/Projects/ecoscvs/TestRange/test/test_install/lib/extras.o: In function
`serial_rcv_char':
//f/Projects/ecoscvs/ecoscvs-working/ecos/packages/io/serial/current/src/com
mon/serial.c:915: undefined reference to `eth_drv_recv'

//F/Projects/ecoscvs/TestRange/test/test_install/lib/extras.o: In function
`serial_get_config':
//f/Projects/ecoscvs/ecoscvs-working/ecos/packages/io/serial/current/src/com
mon/serial.c:590: undefined reference to `eth_drv_tx_done'

//f/Projects/ecoscvs/ecoscvs-working/ecos/packages/io/serial/current/src/com
mon/serial.c:594: undefined reference to `eth_drv_init'

collect2: ld returned 1 exit status
make[1]: ***
[//F/Projects/ecoscvs/TestRange/test/test_install/tests/hal/common/current/t
ests/cache] Error 1
make[1]: Leaving directory
`/f/Projects/ecoscvs/TestRange/test/test_build/hal/common/current'
make: *** [tests] Error 2

Both of those files are eCos files. If the declarations for eth_drv_init(),
eth_drv_recv() and eth_drv_tx_done() in
packages\io\eth\current\src\net\eth_drv.c are static I get the "undefined
reference to ..." messages in
packages/io/serial/current/src/common/serial.c. If they're not static
everything goes fine. Additionaly, the line numbers that the linker reports
don't point to a meaningfull spot in the source code.

What could be the reason for this kind of behaviour? Why is it that a
function from an ethernet driver is needed in the serial driver? Any ideas?


Regards,

Ivan


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] eCos CVS  <--> eCos 1.3.1 differences in net/eth_drv.
  2001-05-09  3:17   ` Ivan Jakab
@ 2001-05-09  6:47     ` Robin Farine
  0 siblings, 0 replies; 4+ messages in thread
From: Robin Farine @ 2001-05-09  6:47 UTC (permalink / raw)
  To: ecos-discuss

"Ivan Jakab" <ivan@INTESIS.hr> writes:

> > -----Original Message-----
> > From: gary@chez-thomas.org [ mailto:gary@chez-thomas.org]On Behalf Of
> > Gary Thomas
> > Sent: Tuesday, May 08, 2001 4:39 PM
> > To: Ivan Jakab
> > Cc: ecos-discuss@sources.redhat.com
> > Subject: RE: [ECOS] eCos CVS <--> eCos 1.3.1 differences in net/eth_drv.
> >
> >
> >
> > On 08-May-2001 Ivan Jakab wrote:
> > > Hi,
> > >
> > > I'm currently moving support for a MIPS R3041 based board from the eCos
> > > 1.3.1 tree to the current CVS tree. When building the eCos CVS
> > tests I got
> > > messages that claimed undefined reference for eth_drv_init(),
> > eth_drv_recv()
> > > and eth_drv_tx_done() in
> > packages\io\serial\current\src\common\serial.c:xxx.
> > > When comparing the eth_drv.c, where those functions are
> > defined, from the
> > > 1.3.1 and the CVS eCos I noticed that in the CVS they're
> > defined as static.
> > > I changed their definition not be static (as they were in the
> > 1.3.1 tree)
> > > and all the tests passed without any "undefined reference"
> > messages. Why was
> > > the definition of those functions changed to be static? Am I missing
> > > something here?
> >
> > These interfaces have now changed and must only be accessed via
> > the function
> > tables (pointers).  Look at some of the other drivers for examples.
> >
> 
> The thing that confuses me is that the "undefined reference to
> eth_drv_xxx()" messages are connected to
> packages\io\serial\current\src\common\serial.c. Here is the ouput I get when
> building the eCos tests:
> 
> mipsel-r3041-elf-gcc -msoft-float -g -nostdlib -Wl,--gc-sections -Wl,-static
>  -L//F/Projects/ecoscvs/TestRange/test/test_install/lib -Ttarget.ld -o
> //F/Projects/ecoscvs/TestRange/test/test_install/tests/hal/common/current/te
> sts/cache tests/cache.o
> 
> //F/Projects/ecoscvs/TestRange/test/test_install/lib/extras.o: In function
> `serial_xmt_char':
> //f/Projects/ecoscvs/ecoscvs-working/ecos/packages/io/serial/current/src/com
> mon/serial.c:847: undefined reference to `eth_drv_tx_done'
> 
> //F/Projects/ecoscvs/TestRange/test/test_install/lib/extras.o: In function
> `serial_rcv_char':
> //f/Projects/ecoscvs/ecoscvs-working/ecos/packages/io/serial/current/src/com
> mon/serial.c:915: undefined reference to `eth_drv_recv'
> 
> //F/Projects/ecoscvs/TestRange/test/test_install/lib/extras.o: In function
> `serial_get_config':
> //f/Projects/ecoscvs/ecoscvs-working/ecos/packages/io/serial/current/src/com
> mon/serial.c:590: undefined reference to `eth_drv_tx_done'
> 
> //f/Projects/ecoscvs/ecoscvs-working/ecos/packages/io/serial/current/src/com
> mon/serial.c:594: undefined reference to `eth_drv_init'
> 
> collect2: ld returned 1 exit status
> make[1]: ***
> [//F/Projects/ecoscvs/TestRange/test/test_install/tests/hal/common/current/t
> ests/cache] Error 1
> make[1]: Leaving directory
> `/f/Projects/ecoscvs/TestRange/test/test_build/hal/common/current'
> make: *** [tests] Error 2
> 
> Both of those files are eCos files. If the declarations for eth_drv_init(),
> eth_drv_recv() and eth_drv_tx_done() in
> packages\io\eth\current\src\net\eth_drv.c are static I get the "undefined
> reference to ..." messages in
> packages/io/serial/current/src/common/serial.c. If they're not static
> everything goes fine. Additionaly, the line numbers that the linker reports
> don't point to a meaningfull spot in the source code.
> 
> What could be the reason for this kind of behaviour? Why is it that a
> function from an ethernet driver is needed in the serial driver? Any ideas?

I suspect a problem of the linker or the BFD library here. It seems that the
linker displays wrong information when they relate to a local symbol defined in
a member of an archived library. This means that in this case, read
"io\eth\current\src\net\eth_drv.c:XYZ"
instead of
"packages/io/serial/current/src/common/serial.c:UVW" ;-)

Robin

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-05-09  6:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-08  7:35 [ECOS] eCos CVS <--> eCos 1.3.1 differences in net/eth_drv.c Ivan Jakab
2001-05-08  7:38 ` [ECOS] eCos CVS <--> eCos 1.3.1 differences in net/eth_drv Gary Thomas
2001-05-09  3:17   ` Ivan Jakab
2001-05-09  6:47     ` Robin Farine

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).