Re: Bug report in the elf loader

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jiri Kosina
Date: Sunday, February 10, 2008 - 2:15 pm

On Fri, 8 Feb 2008, Abel Bernabeu wrote:


Hi Abel,

lkml is the most official forum you can find.

[ ... ]

Well, bb386nc has its e_flags set to 0x2, which means that the binary is 
of type EF_BFIN_FDPIC.

The fdpic handler returns ENOENT if the PT_INTERP field of the binary is 
malformed, which is what you are probabling hitting here:

                        retval = -ENOENT;
                        if (interpreter_name[phdr->p_filesz - 1] != '\0')
                                goto error;

The 'standard' ELF binary handler returns ENOEXEC in such cases, and this 
is the difference you are seeing here.

I basically think that both errnos are allowed here:

ENOENT The file filename or a script or ELF interpreter does not exist, or 
a shared library needed for file or interpreter cannot be found.

ENOEXEC An executable is not in a recognized format, is for the wrong 
architecture, or has some other format error that means it cannot be 
executed.

-- 
Jiri Kosina
SUSE Labs
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Bug report in the elf loader, Jiri Kosina, (Sun Feb 10, 2:15 pm)