[RTEMS Project] #4952: rtems-ld created wrong RAP file on arm
RTEMS trac
trac at rtems.org
Mon Sep 11 02:47:17 UTC 2023
#4952: rtems-ld created wrong RAP file on arm
---------------------------+--------------------
Reporter: zhengxiaojun | Owner: (none)
Type: defect | Status: new
Priority: normal | Milestone:
Component: tool | Version:
Severity: normal | Keywords:
Blocked By: | Blocking:
---------------------------+--------------------
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."
I reverted the rtl-rap.cpp commit(
0ad4aaafc20afcb5aacb7a82b0b3a8150b638975 linker/rap: Ignore relocation
records with no section), the rap file can be loaded.
At Chris's suggestion, I founded 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.
I tried to make the length fit the relocs write to rap file, the file can
not be loaded, it crashed. So the relocs(reloc.symsect == 0) can not be
ignored, at least on arm.
The command line I used to create RAP file is like this:
rtems-ld -n -e appmain -s -O rap --base rtems.elf app.elf -o app.out
--
Ticket URL: <http://devel.rtems.org/ticket/4952>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list