From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a8f278a497778ced X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-01 08:37:22 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dennison@telepath.com (Ted Dennison) Newsgroups: comp.lang.ada Subject: Re: VxWorks: Link problem Date: 1 Feb 2002 08:37:21 -0800 Organization: http://groups.google.com/ Message-ID: <4519e058.0202010837.730e7b4f@posting.google.com> References: NNTP-Posting-Host: 65.115.221.98 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1012581442 3791 127.0.0.1 (1 Feb 2002 16:37:22 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 1 Feb 2002 16:37:22 GMT Xref: archiver1.google.com comp.lang.ada:19491 Date: 2002-02-01T16:37:22+00:00 List-Id: "Petter Fryklund" wrote in message news:... > I get undefined reference for high123 and low123 when trying to make > VwWorks_rom including this little neat machine code: (AdaMULTI builds OK!) > procedure rdtsc (High, Low : out Interfaces.Unsigned_32) is > > high123 : Interfaces.Unsigned_32; > low123 : Interfaces.Unsigned_32; > pragma Export (C, High123, "high123"); > pragma Export (C, Low123, "low123"); Out of curiosity, why are you exporting these? They appear to be internal variables. I don't see what good it would be for some other external routine to link to them. Do you actually have another routine somewhere that tries to link against them? I'm not sure this is legal in any event, as the variables are declared local to a procedure, not in a global conext. They get allocated on the stack when the routine is entered, and removed from the stack when it exits. Thus there's no static address for external routines to bind to. If you really want them exported, they should probably be declared in the outer scope of a package spec or body. -- T.E.D. Home - mailto:dennison@telepath.com (Yahoo: Ted_Dennison) Homepage - http://www.telepath.com/dennison/Ted/TED.html