From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28170 invoked by alias); 17 Oct 2003 20:04:00 -0000 Mailing-List: contact ecos-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@sources.redhat.com Received: (qmail 28155 invoked from network); 17 Oct 2003 20:04:00 -0000 Received: from unknown (HELO hermes.chez-thomas.org) (63.225.98.241) by sources.redhat.com with SMTP; 17 Oct 2003 20:04:00 -0000 Received: by hermes.chez-thomas.org (Postfix, from userid 2000) id E726E50D946; Fri, 17 Oct 2003 14:03:58 -0600 (MDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by hermes.chez-thomas.org (Postfix) with ESMTP id 5D3F650D93E; Fri, 17 Oct 2003 14:03:47 -0600 (MDT) From: Gary Thomas To: Jay Foster Cc: "'ecos-discuss@sources.redhat.com'" In-Reply-To: <80B97DE95AEED311BA580050047FE98494F741@mail.systech.com> References: <80B97DE95AEED311BA580050047FE98494F741@mail.systech.com> Content-Type: text/plain Organization: MLB Associates Message-Id: <1066421024.20516.543.camel@hermes> Mime-Version: 1.0 Date: Fri, 17 Oct 2003 20:04:00 -0000 Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-4.4 required=5.0 tests=AWL,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_XIMIAN autolearn=ham version=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Subject: Re: [ECOS] Help With CYG_HAL_TABLEs X-SW-Source: 2003-10/txt/msg00331.txt.bz2 On Fri, 2003-10-17 at 12:23, Jay Foster wrote: > I'm trying to use the CYG_HAL_TABLE macros to implement an extensible table. > My table entries aren't getting added to the table. I first suspected that > the linker was removing them, since there are no references to them, but I'm > not so sure, since other tables, such as the DEVTAB table encounter the same > situation, yet its entries get added. > > In a header file, I declare the following: > > #include > typedef struct myentry > { > STUFF HERE > } CYG_HAL_TABLE_TYPE myentry_t; > > extern myentry_t __MYTABLE__[], __MYTABLE_END__; > #define MYTABLE_ENTRY(_l, arg, arg) \ > myentry_t _l CYG_HAL_TABLE_ENTRY(myentrytype) = { \ > arg, \ > arg \ > } > > In a source file, I do: > > #include
> CYG_HAL_TABLE_BEGIN( __MYTABLE__, myentrytype ); > CYG_HAL_TABLE_END( __MYTABLE_END__, myentrytype ); > > > myentry_t *p; > for (p=&(__MYTABLE__[0]; p!=&(__MYTABLE_END__); p++ > { > stuff > } > > In another source file, I do: > #include
> MYTABLE_ENTRY(l0, stuff); > MYTABLE_ENTRY(l1, stuff); > etc. > > > In my symbol table, I find entries for __MYTABLE__ and __MYTABLE_END__, but > no symbols in between for the table entries (l0, l1, etc.). There are no > references to the table entry labels, so I suspected the linker was removing > them. Other tables don't suffer from this, so I'm thinking it's something > else. What, I don't know. For example, in my symbol table I see: > > __DEVTAB__ > haldiag_io0 > __DEVTAB_END__ > > yet there are no references to haldiag_io0, except for the DEVTAB_ENTRY() > macro. > Note that any file which uses tables must either be specified directly in the link/build or be included in "libextras.a". Is this the case? -- Gary Thomas MLB Associates -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss