mirror of
https://github.com/TinyCC/tinycc.git
synced 2026-05-12 20:05:45 +00:00
riscv64-link: add R_RISCV_RELATIVE case in relocate()
arm64-link.c has R_AARCH64_RELATIVE handling. Without this case, incoming R_RISCV_RELATIVE relocations from object files fall through to the 'FIXME: handle reloc type' default path. P1.7 (NEED_BUILD_GOT guards) is not needed: NEED_RELOC_TYPE and NEED_BUILD_GOT are always defined in the build context (tcc.h:1608).
This commit is contained in:
@@ -393,6 +393,11 @@ ST_FUNC void relocate(TCCState *s1, ElfW_Rel *rel, int type, unsigned char *ptr,
|
||||
case R_RISCV_COPY:
|
||||
/* XXX */
|
||||
return;
|
||||
case R_RISCV_RELATIVE:
|
||||
/* R_RISCV_RELATIVE value is already applied in R_RISCV_32/64
|
||||
dynamic output paths, but we need this case for incoming
|
||||
RELATIVE relocations from object files. */
|
||||
return;
|
||||
|
||||
default:
|
||||
fprintf(stderr, "FIXME: handle reloc type %x at %x [%p] to %x\n",
|
||||
|
||||
Reference in New Issue
Block a user