From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2290 invoked by alias); 28 Apr 2005 09:56:24 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 2248 invoked from network); 28 Apr 2005 09:56:18 -0000 Received: from unknown (HELO anchor-post-32.mail.demon.net) (194.217.242.90) by sourceware.org with SMTP; 28 Apr 2005 09:56:18 -0000 Received: from calivar.demon.co.uk ([83.104.54.243] helo=xl5.calivar.com) by anchor-post-32.mail.demon.net with esmtp (Exim 4.42) id 1DR5km-00083S-7n; Thu, 28 Apr 2005 09:56:16 +0000 Received: from xl5.calivar.com (localhost [127.0.0.1]) by xl5.calivar.com (Postfix) with ESMTP id 8FEFF3906F; Thu, 28 Apr 2005 10:56:15 +0100 (BST) To: "David Bonfrer" Cc: "'Anthony Tonizzo'" , References: <200504270959.j3R9xYcY010497@router.bonfrer.thuis> From: Nick Garnett Original-Sender: nickg@ecoscentric.com Date: Thu, 28 Apr 2005 10:01:00 -0000 In-Reply-To: <200504270959.j3R9xYcY010497@router.bonfrer.thuis> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [ECOS] RE: eCos Loader X-SW-Source: 2005-04/txt/msg00289.txt.bz2 "David Bonfrer" writes: > The GOT and PLT are no problem, I already have those working, I don't know which architecture you are working on, but I suspect you have been lucky. > I loaded the > following module: > > ----- Begin > > #include > int a = 1; > int b = 2; > int c = 3; > > void optel() { > a += 1; > b += a; > c += b; > } > > void print() { > diag_printf("Testfile: TEST_OK\n"); > } > > ----- End > Yep, that's about as far as I got before realizing that there were many more hurdles to overcome, particularly the toolchain issues I mentioned before. > Both optel and print are working. > But diag_printf is hardcoded in my code. > If you put "foo("Testfile: TEST_OK\n");" It does exactly the same now. > > I was wondering, I do use location = *diag_printf in my code, that uses the > symbol table of the main ecos lib. I thought maybe there is a way to access > it, and get the right pointer locations from there. I'm not really sure what you mean here. You should be resolving any symbols in the loaded library against the symbol table in the main executable. However, for this to happpen, the main executable must have been linked against the load library to build its symbol table. -- 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