[PATCH] RTL module file loading

Mohammed Khoory mkhoory at eiast.ae
Thu May 16 14:31:06 UTC 2013


>> 2. loading an ELF object file from the file system using dlopen failed
>> with a similar error to the following: "offset past end of file:
>> offset=54660 size=0", where in reality the size is actually supposed
>> to be bigger than the offset.
>
>The patch has a mistake, the 'fstat' is missing. I do not see a need to
move that
>piece code. Setting the file_size to 0 looks like it should work but I need
to
>check it a little more to be certain.

Oops. I can't believe I missed that, I should be more careful next time.
Sorry about that.

>Can you please reset send the patch with just setting the file_size to 0 ?
If it is
>ok I will commit it after I take a closer look I think it is ok.
>
>Chris

I've attached the patch as you requested, but I'm still convinced that the
code moving is necessary. The reason the issue is occurring in the first
place is because the file_size in the cache never gets set properly. Setting
the file_size to 0 instead of -1 in the flush function would just prevent it
from working the second time, although it is slightly more correct behavior.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-file_size-in-rtl-object-cache-set-to-0.patch
Type: application/octet-stream
Size: 749 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/devel/attachments/20130516/7f0f3e9d/attachment.obj>


More information about the devel mailing list