You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Gregory Nutt <sp...@yahoo.com.INVALID> on 2021/05/18 02:06:02 UTC

Re: Sharing libc in ELF modules.

>> The way that has been done in the past was too add the libc functions 
>> to the base FLASH symbol table.  That symbol table draws the libc 
>> functions into the base FLASH image*.  Then there is one copy of the 
>> libc functions in base FLASH and no libc functions in the ELF 
>> module.  The ELF module is linked to the libc functions just as they 
>> are linked to the OS inteface functions.
>>
(And I forgot ... don't link the ELF module with libc.a so that all of 
the libc symbols are undefined and will get the values from the base 
FLASH symbol table when the ELF module is dynamically loaded.