Opened 22 months ago
Closed 22 months ago
#11302 closed defect (fixed)
RISCV: Properly set relocate parameter of const macro in libavcodec/riscv/h264dsp_rvv.S
| Reported by: | kxxt | Owned by: | Rémi Denis-Courmont |
|---|---|---|---|
| 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 (4)
comment:1 by , 22 months ago
| Description: | modified (diff) |
|---|
comment:2 by , 22 months ago
comment:3 by , 22 months ago
| Owner: | set to |
|---|---|
| Status: | new → open |
comment:4 by , 22 months ago
| Resolution: | → fixed |
|---|---|
| Status: | open → closed |
Fixed n7.2-dev-623-gc3051d94a7



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>