From: Grant Edwards <grant.b.edwards@gmail.com>
To: ecos-discuss@ecos.sourceware.org
Subject: [ECOS] Why does #include <cyg/io/eth/eth_drv> define a bunch of time-related symbols?
Date: Tue, 25 Jun 2013 16:52:00 -0000 [thread overview]
Message-ID: <kqchr4$1go$1@ger.gmane.org> (raw)
I'm working on a new Ethernet driver. eCos kernel/libs (including the
new drive) build fine. But, when I try to link an application I get a
bunch of errors because some time-related functions are defined twice.
They're defined in libtarget where they're supposed to be, but they're
also getting defined in the object file for my Ethernet driver [and I
can't figure out why].
However, my ethernet driver file has been stripped down to nothing but
a handful of #include directives:
------------------------------lpc1800_ether.c------------------------------
#include <pkgconf/system.h>
#include <cyg/infra/diag.h>
#include <cyg/io/eth/netdev.h>
#include <cyg/io/eth/eth_drv.h>
---------------------------------------------------------------------------
If I comment out the last line (eth_drv.h), the problem goes away (the
object file is empty). With that line, I get the duplicate time
functions showing up in what should be an empty object file.
Why?
Here's some info on the object file that's generated with eth_drv.h
included:
$ size [...]/current/src/devs_eth_arm_lpc1800_lpc1800_ether.o
text data bss dec hex filename
1740 0 0 1740 6cc [...]/current/src/devs_eth_arm_lpc1800_lpc1800_ether.o
$ nm -a [...]/current/src/devs_eth_arm_lpc1800_lpc1800_ether.o
00000000 t $a
[...]
00000000 N .debug_ranges
00000000 N .debug_str
00000000 t .text
00000000 t .text.asctime
00000000 t .text.asctime_r
00000000 t .text.ctime
00000000 t .text.ctime_r
00000000 t .text.cyg_libc_time_getzoneoffsets
00000000 t .text.cyg_libc_time_setdst
00000000 t .text.cyg_libc_time_setzoneoffsets
00000000 t .text.difftime
00000000 t .text.gmtime
00000000 t .text.localtime
00000000 t .text.localtime_r
00000000 t .text.strcoll
U __aeabi_i2d
00000000 T asctime
00000000 T asctime_r
00000000 T ctime
00000000 T ctime_r
U cyg_libc_time_asctime_buf
U cyg_libc_time_current_dst_offset
U cyg_libc_time_current_dst_stat
U cyg_libc_time_current_std_offset
U cyg_libc_time_day_name
00000000 T cyg_libc_time_getzoneoffsets
U cyg_libc_time_gmtime_buf
U cyg_libc_time_itoa
U cyg_libc_time_localtime_buf
U cyg_libc_time_month_name
U cyg_libc_time_normalize_structtm
00000000 T cyg_libc_time_setdst
00000000 T cyg_libc_time_setzoneoffsets
00000000 T difftime
00000000 T gmtime
U gmtime_r
00000000 T localtime
00000000 T localtime_r
00000000 a lpc1800_ether.c
U memcpy
U strcmp
00000000 T strcoll
--
Grant Edwards grant.b.edwards Yow! I'm a fuschia bowling
at ball somewhere in Brittany
gmail.com
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
next reply other threads:[~2013-06-25 16:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-25 16:52 Grant Edwards [this message]
2013-06-25 17:20 ` [ECOS] " Grant Edwards
2013-06-25 23:13 ` Sergei Gavrikov
2013-06-26 14:01 ` Grant Edwards
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='kqchr4$1go$1@ger.gmane.org' \
--to=grant.b.edwards@gmail.com \
--cc=ecos-discuss@ecos.sourceware.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 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).