Rtems Networking

Joel Sherrill joel.sherrill at oarcorp.com
Thu Nov 16 14:17:32 UTC 2006


Ralf Corsepius wrote:
> On Thu, 2006-11-16 at 06:32 -0600, Joel Sherrill wrote:
>   
>> Ralf Corsepius wrote:
>>     
>>> On Wed, 2006-11-15 at 16:57 -0600, Joel Sherrill wrote:
>>>   
>>>       
>>>> Luca Germano wrote:
>>>>     
>>>>         
>>>>> Hi
>>>>> I try to use network under RTEMS. I look the RTEMS netdemos examples.
>>>>> Compling my application I have the following warning message:
>>>>> /opt/rtems-4.6/lib/gcc-lib/sparc-rtems/3.2.3/../../../../sparc-rtems/bin/ld: 
>>>>> Warning: size of symbol `timeout' changed from 4 to 244 in 
>>>>> /opt/rtems-4.6/sparc-rtems/leon3/lib/librtemscpu.a(rtems_glue.o)
>>>>> /opt/rtems-4.6/lib/gcc-lib/sparc-rtems/3.2.3/../../../../sparc-rtems/bin/ld: 
>>>>> Warning: type of symbol `timeout' changed from 1 to 2 in 
>>>>> /opt/rtems-4.6/sparc-rtems/leon3/lib/librtemscpu.a(rtems_glue.o)
>>>>> Someone have had this warning message or can explain me how to solve?
>>>>>   
>>>>>       
>>>>>           
>>>> This usually indicates that the symbol is defined in two different 
>>>> object files.
>>>>
>>>> Can you poke around with nm and grep on the libraries and see if it is 
>>>> duplicately defined?
>>>> timeout is such a common word, it wouldn't surprise me to find it in two 
>>>> places.
>>>>     
>>>>         
>>> As others already pointed out, RTEMS is partially guilty for not being
>>> "namespace clean".
>>>
>>> To avoid this particular clash, I'd like to propose the patch (against
>>> CVS-HEAD/rtems-4.8) below.
>>>   
>>>       
>> I'm all for making the namespace cleaner and my personal goal is to fix 
>> a few
>> other places on the CVS head that I think the names stink.  :)
>>
>> Are there places where timeout() is actually used that need to change?
>>     
> Yes, several (leon3 w/ my patch applied):
>
> # sparc-rtems4.8-nm -og wrapup/librtemscpu.a | grep rtems_bsdnet_timeout
> wrapup/librtemscpu.a:libnetworking_a-if_ether.o:         U rtems_bsdnet_timeout
> wrapup/librtemscpu.a:libnetworking_a-if.o:         U rtems_bsdnet_timeout
> wrapup/librtemscpu.a:libnetworking_a-in_rmx.o:         U rtems_bsdnet_timeout
> wrapup/librtemscpu.a:libnetworking_a-rtems_glue.o:000002a0 T rtems_bsdnet_timeout
> wrapup/librtemscpu.a:libnetworking_a-uipc_domain.o:         U rtems_bsdnet_timeout
>
>   
>> Did you mean to mix in the argument type change to BSD malloc?
>>     
> Yes, the current implementation is error prone, because it mixes up the
> 3-argument bsd-kernel malloc with the 1-argument user-space malloc.
>
>   
OK.  Go ahead and commit all this.  If it breaks something, we will find 
it building.

>>   It seems
>> unrelated to timeout. 
>>     
> Basically yes, except that it's essentially the same issue:
> BSD kernel functions vs. flat RTEMS memory model.
>
>   
>>  I don't mind that change either just wonder if it is
>> related and I don't see it.
>>
>> And let this be a lesson to us all to use good function and variable 
>> names. :)
>>     
>
> Ralf
>
>
>   




More information about the users mailing list