Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

#4781 assigned defect

RAP generated for ARM/AArch64 DL06 test won't read correctly with rtems-rap

Reported by: Kinsey Moore Owned by: Needs Funding
Priority: normal Milestone: Indefinite
Component: tool Version:
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

Ignoring for the moment the fact that the dl06 test is failing on AArch64 due to at least one other issue (bad relocation type bit masking), the dl06 test generates dl06.rap which should be readable with the rtems-rap tool. Attempting to read dl06.rap produces usable output, but also generates an error suggesting that it was not possible to read the entire file. See sample output below:

RTEMS RAP 6.7cdb77520d22

build/aarch64/xilinx_zynqmp_lp64_qemu/testsuites/libtests/dl06/dl06.rap:

error: compression: Reading of value failed
warning: file read failed, some data may be corrupt or not present.

Strings: 0x00002726 (10022) size: 168

0 (0x000000):
1 (0x000001): rtems_main
2 (0x00000c): dl_o2_func1
3 (0x000018): dl_o2_func2
4 (0x000024): dl_o2_func3
5 (0x000030): kernel_rem_pio2
6 (0x000042):
kernel_tan
7 (0x00004f): fabs
8 (0x000054): floor
9 (0x00005a): scalbn

10 (0x000061): atan
11 (0x000066): _lcong48_r
12 (0x000071): lcong48
13 (0x000079): ieee754_atan2
14 (0x000089):
ieee754_rem_pio2
15 (0x00009c): rtems_main
16 (0x0000a7):

This also occurs on ARM for the xilinx_zynq_a9_qemu BSP:

RTEMS RAP 6.7cdb77520d22

build/arm/xilinx_zynq_a9_qemu/testsuites/libtests/dl06/dl06.rap:

error: compression: Reading of value failed
warning: file read failed, some data may be corrupt or not present.

Strings: 0x0000232f (9007) size: 174

0 (0x000000):
1 (0x000001): rtems_main
2 (0x00000c): dl_o2_func1
3 (0x000018): dl_o2_func2
4 (0x000024): dl_o2_func3
5 (0x000030): ieee754_rem_pio2
6 (0x000043):
kernel_rem_pio2
7 (0x000055): kernel_tan
8 (0x000062): atan
9 (0x000067): fabs

10 (0x00006c): floor
11 (0x000072): scalbn
12 (0x000079): atan2
13 (0x00007f): ieee754_atan2
14 (0x00008f): _lcong48_r
15 (0x00009a): lcong48
16 (0x0000a2): rtems_main
17 (0x0000ad):

Change History (9)

comment:1 Changed on 01/05/23 at 22:28:44 by Kinsey Moore

Summary: RAP generated for AArch64 DL06 test won't read correctly with rtems-rapRAP generated for ARM/AArch64 DL06 test won't read correctly with rtems-rap

comment:2 Changed on 01/17/23 at 15:18:00 by Joel Sherrill <joel@…>

Owner: set to Joel Sherrill <joel@…>
Resolution: fixed
Status: newclosed

In [changeset:"f48f79dcad2b984621b493b1dd0ea360bef17202/rtems-docs" f48f79d/rtems-docs]:

c-user/rate-monotonic/background.rst: Correct logically inverted statement

Also corrected a spot of formatting.

Closes #4781.

comment:3 Changed on 01/17/23 at 19:13:53 by Kinsey Moore

Resolution: fixed
Status: closedreopened

This was incorrectly closed by an unrelated commit.

comment:4 Changed on 02/10/23 at 15:04:18 by Joel Sherrill

Owner: changed from Joel Sherrill <joel@…> to Chris Johns
Status: reopenedassigned

comment:5 Changed on 02/11/23 at 08:31:02 by zhengxiaojun

I found it is caused by rld-rap.cpp::write_relocations(),the function fill whole relocation count in header, but when write relocation it ignore reloc.symsect==0 relocations. So the count is inconsistent with actual relocations.
I just remove the judgement sentences, the error message gone. And the RAP file runs correctly on my ARM A9 board.I'm not familiar with the RAP file, I don't know if it is the right way.

comment:6 Changed on 02/11/23 at 15:34:42 by Kinsey Moore

Thanks for looking into this! I'll leave it to Chris to verify this fix when he has time since he's probably the most knowledgeable about the RAP format.

comment:7 Changed on 06/22/23 at 22:23:37 by Joel Sherrill

Milestone: 6.17.1
Version: 67

comment:8 Changed on 08/25/23 at 18:47:54 by Alex White

I saw this same issue on MicroBlaze?.

comment:9 Changed on 08/27/23 at 21:28:05 by Chris Johns

Milestone: 7.1Indefinite
Owner: changed from Chris Johns to Needs Funding
Version: 7

RAP loading needs some work to bring it up to date with ELF. I will need funding.

Note: See TracTickets for help on using tickets.