Opened 2 hours ago
Last modified 108 minutes ago
#11302 new defect
RISCV: Properly set relocate parameter of const macro in libavcodec/riscv/h264dsp_rvv.S
Reported by: | kxxt | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avcodec |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description (last modified by )
Summary of the bug:
I am building chromium for riscv64 which builds ffmpeg using its own build system. I encountered the following error when linking v8_context_snapshot_generator:
ld.lld: error: relocation R_RISCV_64 cannot be used against symbol 'ff_h264_weight_pixels16_8_rvv'; recompile with -fPIC
defined in obj/third_party/ffmpeg/libffmpeg_internal.a(ffmpeg_internal/h264dsp_rvv.o)
referenced by ffmpeg_internal/h264dsp_rvv.o:(ff_h264_weight_funcs_8_rvv) in archive obj/third_party/ffmpeg/libffmpeg_internal.a
It is caused by https://github.com/FFmpeg/FFmpeg/blob/7332b1700e3b257dd80341f40305cf0bf4582fcf/libavcodec/riscv/h264dsp_rvv.S#L163-L176 which uses the const macro from libavutil/riscv/asm.S without enabling relocatable parameter.
Could we enable the relocatable parameter unconditionally here? Or would it break the build in position dependent code mode?
Change History (2)
comment:1 by , 2 hours ago
Description: | modified (diff) |
---|
Hi, first time here. How could I let the developer of h264dsp_rvv.S know this bug? It appears that I cannot modify the CC field to add Rémi Denis-Courmont <remi@remlab.net>