--wrap ld functionality does not work with Init RTEMS function
Thomas Doerfler (nt)
Thomas.Doerfler at imd-systems.de
Tue Apr 8 21:01:18 UTC 2008
Hi,
Joel, your example is a bit off-topic (sorry for that), because it wraps
a function that is outside the local module.
Have a look at my modified example.
There I have a local function (my_malloc) which is referenced by a
global, constant pointer and which should be wrapped. But the wrapper
will not be called.
This is similar to the Init module problem.
I guess that the compiler already processes the link between the
(const?) pointer and the local function, and therefore the linker is no
longer able to interfer.
sigh,
Thomas
Joel Sherrill schrieb:
> Aitor Viana wrote:
>> Hi,
>>
>> The real answer will be to look at what the structure has in it on
>> the sparc. :-D
>>
>> So until tomorrow...
>>
>>
>> maybe I can tell you
>>
>> In leon2 the initialization_tasks[] is
>>
>> rtems_initialization_tasks_table Initialization_tasks[] = {
>> { CONFIGURE_INIT_TASK_NAME,
>> CONFIGURE_INIT_TASK_STACK_SIZE,
>> CONFIGURE_INIT_TASK_PRIORITY,
>> CONFIGURE_INIT_TASK_ATTRIBUTES,
>> CONFIGURE_INIT_TASK_ENTRY_POINT,
>> CONFIGURE_INIT_TASK_INITIAL_MODES,
>> CONFIGURE_INIT_TASK_ARGUMENTS
>> }
>> };
>>
>>
> That's the C code. Now what is the actual value in target memory
> for the address for CONFIGURE_INIT_TASK_ENTRY_POINT?
>
> We need to know the output of ld as it shows up on the target.
>
>> Taking into account that the configuration is simply:
>>
>>
>> #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
>> #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
>>
>> #define CONFIGURE_MAXIMUM_TASKS 10
>>
>> #define CONFIGURE_INIT_TASK_PRIORITY 1
>> #define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_PREEMPT
>> #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
>>
>> #define CONFIGURE_INIT
>> #include <rtems/confdefs.h>
>>
>> The final intialization_tasks[] shoud be:
>>
>>
>> rtems_initialization_tasks_table Initialization_tasks[] = {
>> { rtems_build_name( 'U', 'I', '1', ' ' ), //
>> default value
>> RTEMS_MINIMUM_STACK_SIZE, // default value
>> 1,
>> RTEMS_DEFAULT_ATTRIBUTES, // default values
>> Init,
>> // default value
>> RTEMS_PREEMPT,
>> 0
>> // default value
>> }
>> };
>>
>>
>>
>
>
--
--------------------------------------------
IMD Ingenieurbuero fuer Microcomputertechnik
Thomas Doerfler Herbststrasse 8
D-82178 Puchheim Germany
email: Thomas.Doerfler at imd-systems.de
PGP public key available at:
http://www.imd-systems.de/pgpkey_en.html
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: wrapped3.c
URL: <http://lists.rtems.org/pipermail/users/attachments/20080408/13ac4655/attachment-0001.c>
More information about the users
mailing list