[rtems-tools]rtems-ld issue?

zhengxiaojun 17935334 at qq.com
Thu Aug 31 05:12:16 UTC 2023



在 2023/8/31 6:05, Chris Johns 写道:
> On 31/8/2023 12:48 am, zhengxiaojun wrote:
>> Hi,
>>     I use the latest rtems-tools to generate RAP file, I found the object file
>> become too small(elf,2184bytes==>rap,736bytes) and the file loaded failed, error
>> message like this "load app.out error:offset past end of file: offset=736
>> size=736 error."
> 
> What arch and BSP?
> 
>>     I reverted the rtl-rap.cpp commit( 0ad4aaafc20afcb5aacb7a82b0b3a8150b638975
>> linker/rap: Ignore relocation records with no section), the rap file can be loaded.
> 
> I think the commit has the wrong ticket id, it should be 4069 ...
> 
> https://devel.rtems.org/ticket/4069
> 
> My guess is the length includes the relocs that have been dropped because they
> do not have a symbol section. A reloc without a symbol section cannot be located
> because you do not know the section to locate it against.
> 
> Are you able to review the rtems-ld code for the issue?
> 
I found something suspicious, get_relocations(s) return all the count of 
relocation and write to rap file, but actual count is less, because 
ignore the reloc with section=0.

This issue is similar to ticket #4781, maybe the same.

reduce count or write all relocs in rap ? I do not know which is the 
right solution.

> Chris
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel



More information about the devel mailing list