--wrap ld functionality does not work with Init RTEMS function

Joel Sherrill joel.sherrill at OARcorp.com
Tue Apr 8 21:41:46 UTC 2008


Aitor Viana wrote:
> Hi,
>
>   
>> 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
>>
>>
>>     
>
> touche. Can anybody figure out the workaround?
>
>
>   
First we have to trip the problem in a simple native way.
Then we report it to (probably) binutils.

If it does turn out to be indirection through a table
via a function in another module, the workaround
is most likely to (unfortunately) change the user's
configuration table to call the wrapper directly.

We need a small test case native that breaks.  Then we
track it down.


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985





More information about the users mailing list