From: Robert H <robert.huem@gmail.com>
To: ecos-discuss@ecos.sourceware.org
Subject: [ECOS] ecos hal symbol table creation mechanism
Date: Mon, 16 Nov 2015 10:57:00 -0000 [thread overview]
Message-ID: <CAJMZFXf6Tmr3s=hNRAFtW7c75qcuww-vOJ-gaRnmrohXxJsHLg@mail.gmail.com> (raw)
Hello all,
I have some questions concerning the ecos hal symbol table creation in
hal_tables.h
How is it possible to export a symbol which is in the ecos image into
some object file for it being able to call it?
I know that test_mods.c uses some defines the object file - that the
application programer wants to load - uses some defines:
e.g.
CYG_LDR_TABLE_ENTRY(cyg_alarm_create_entry,"cyg_alarm_create",cyg_alarm_create);
which then gets replaced by
cyg_ldr_table_entry __name CYG_HAL_TABLE_ENTRY(ldr_table) = {
__symbol_name, __handler }; // line 141 in objelf.h
// with __name being a struct of
// { char *__symbol_name , void *__handler };
// where is the definition of ldr_table? I can't seem to find it anywhere
and then again gets replaced by
cyg_ldr_table_entry __name
__attribute__((section(".ecos.table.ldr_table.data")) = {
__symbol_name , __handler };
// line 103 in hal_tables.h
Does the section attribute here tell the compiler to put a struct
cyg_ldr_tables_entry entry (in this example: {"cyg_alarm_create" ,
cyg_alarm_create} )
into the ecos image's section .ecos.table.ldr_table.data?
Then again, I wonder then how the ecos is able to get the adress of
the function/symbol cyg_alarm_create into the handler
cyg_alarm_create.
I would be very pleased to know more about how the mechanism to get
ecos symbols works in hal_tables.h
Thanks,
Robert H.
--
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:[~2015-11-16 10:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-16 10:57 Robert H [this message]
2015-11-17 16:23 ` Sergei Gavrikov
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='CAJMZFXf6Tmr3s=hNRAFtW7c75qcuww-vOJ-gaRnmrohXxJsHLg@mail.gmail.com' \
--to=robert.huem@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).