mirror of
https://github.com/apache/nuttx.git
synced 2026-10-23 14:58:47 +00:00
modlib:Modify modlib loading DYN elf file conditions
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
parent
24b0fa0072
commit
ae4538646b
1 changed files with 2 additions and 2 deletions
|
|
@ -140,7 +140,7 @@ static void modlib_elfsize(FAR struct mod_loadinfo_s *loadinfo)
|
|||
* (and zero) memory for the each section.
|
||||
*/
|
||||
|
||||
if (loadinfo->ehdr.e_phnum > 0)
|
||||
if (loadinfo->ehdr.e_type == ET_DYN)
|
||||
{
|
||||
for (i = 0; i < loadinfo->ehdr.e_phnum; i++)
|
||||
{
|
||||
|
|
@ -251,7 +251,7 @@ static inline int modlib_loadfile(FAR struct mod_loadinfo_s *loadinfo)
|
|||
binfo("Loading sections - text: %p.%zx data: %p.%zx\n",
|
||||
text, loadinfo->textsize, data, loadinfo->datasize);
|
||||
|
||||
if (loadinfo->ehdr.e_phnum > 0)
|
||||
if (loadinfo->ehdr.e_type == ET_DYN)
|
||||
{
|
||||
for (i = 0; i < loadinfo->ehdr.e_phnum; i++)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue