[FFmpeg-trac] #11302(avcodec:new): RISCV: Properly set relocate parameter of const macro in libavcodec/riscv/h264dsp_rvv.S
FFmpeg
trac at avcodec.org
Sat Nov 16 07:25:31 EET 2024
#11302: RISCV: Properly set relocate parameter of const macro in
libavcodec/riscv/h264dsp_rvv.S
------------------------------------+-----------------------------------
Reporter: kxxt | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: avcodec
Version: git-master | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
------------------------------------+-----------------------------------
Description changed by kxxt:
Old description:
> Summary of the bug:
>
> I am building chromium for riscv64 which builds ffmpeg using its own
> build system. I encountered the following error:
>
> 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?
New description:
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?
--
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11302#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list