https://sourceware.org/bugzilla/show_bug.cgi?id=33556

--- Comment #1 from David Grayson <davidegrayson at gmail dot com> ---
I have new information about what is happening here.  The GNU assembler is
actually generating a relocation whose symbol index (the top 24 bits of the
r_info field) is 0, which I thought was invalid.  Here is the output of
riscv64-unknown-elf-objdump for the object file:

SYMBOL TABLE:
00000000 l    d  .text  00000000 .text
00000000 l    d  .data  00000000 .data
00000000 l    d  .bss   00000000 .bss
00000000 l    d  .riscv.attributes      00000000 .riscv.attributes
00000000 g       .text  00000000 _start
00000000  w      *ABS*  00000000 _foo


RELOCATION RECORDS FOR [.text]:
OFFSET   TYPE              VALUE
00000000 R_RISCV_CALL_PLT  *ABS*
00000000 R_RISCV_RELAX     *ABS*


I don't know why it's printing *ABS*, but I think that just means "symbol index
0", because that's what my own software tells me as an error when I try to
process the file.

So I think the assembler has a bug. I'm sure the assembler needs to make the
relocation  refer to the symbol _foo, because _foo is just weakly defined so it
could be overridden by the linker.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to