Bug 562856 - some relocation types does not support by TCF for riscv
Summary: some relocation types does not support by TCF for riscv
Status: RESOLVED FIXED
Alias: None
Product: TCF
Classification: Tools
Component: Agent (show other bugs)
Version: unspecified   Edit
Hardware: Other All
: P3 normal (vote)
Target Milestone: 1.7   Edit
Assignee: Project Inbox CLA
QA Contact: Eugene Tarassov CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-05 23:15 EDT by wenyan xin CLA
Modified: 2021-06-25 16:23 EDT (History)
0 users

See Also:


Attachments
the elf file (437.94 KB, application/octet-stream)
2020-05-11 01:57 EDT, wenyan xin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description wenyan xin CLA 2020-05-05 23:15:24 EDT
we have some c++ test sample for riscv.

when I debug it with TCF, there is the following error:

TCF 00:00:54.200: Stack trace error: Unsupported relocation type. Format is not supported

this is because there are some relocation type does not support by TCF.
Comment 1 wenyan xin CLA 2020-05-05 23:17:22 EDT
by now the following relocation types is not supported.

R_RISCV_32_PCREL 
R_RISCV_BRANCH
R_RISCV_CALL
R_RISCV_HI20
R_RISCV_LO12_I
R_RISCV_LO12_S
R_RISCV_NONE
R_RISCV_RELAX
R_RISCV_RVC_BRANC
R_RISCV_RVC_JUMP
R_RISCV_SET16
R_RISCV_SET6
R_RISCV_SET8
R_RISCV_SUB6
Comment 2 wenyan xin CLA 2020-05-05 23:20:52 EDT
this is just one of test sample, does it add more relocation types?
Comment 3 Eugene Tarassov CLA 2020-05-09 12:20:47 EDT
The debugger does not need to support all relocation types. Only those used in debug info need to be supported, which is small subset of all types.

Could you provide a test case?
An ELF file for RISC-V Linux would be the best.
Comment 4 wenyan xin CLA 2020-05-11 01:57:34 EDT
Created attachment 282776 [details]
the elf file
Comment 5 wenyan xin CLA 2020-05-11 01:58:38 EDT
I have attached the elf file which contains some relocation type
Comment 6 Eugene Tarassov CLA 2020-05-11 19:02:35 EDT
Fixed.
Thanks!