[FFmpeg-devel] [PATCH] libavcodec: Remove dynamic relocs from aarch64/h264idct_neon.S

Michael Niedermayer michael at niedermayer.cc
Thu Jan 3 00:33:35 EET 2019


On Wed, Jan 02, 2019 at 10:12:33AM -0800, Manoj Gupta wrote:
> On Mon, Dec 31, 2018 at 8:31 AM Michael Niedermayer
> <michael at niedermayer.cc> wrote:
> >
> > On Fri, Dec 28, 2018 at 03:12:53PM -0800, Manoj Gupta wrote:
> > > Hi All,
> > >
> > > I recently had a problem building ffmpeg for AArch64 where lld linker
> > > complained about text relocations in readonly segment. The following
> > > patch fixes the linker complains by referring to a local label instead
> > > of function name.
> > >
> > > This is similar in nature as the following previous commits:
> > > https://www.mail-archive.com/ffmpeg-cvslog@ffmpeg.org/msg34290.html
> > > https://www.mail-archive.com/ffmpeg-cvslog@ffmpeg.org/msg34419.html
> > >
> > > Thanks,
> > > Manoj
> > >
> > > Patch:
> > >
> > > libavcodec: Remove dynamic relocs from aarch64/h264idct_neon.S
> > >
> > > Some of the assembly functions e.g. ff_h264_idct_dc_add_neon
> > > has code like:
> > >         movrel          x14, X(ff_h264_idct_add_neon)
> > >
> > > Linker cannot resolve them fully at link time and emits dynamic
> > > relocations.
> > > Use explicit labels instead so that no dynamic relocations are
> > > needed at all.
> > >
> > > This avoids lld complains about text relocations.
> > >
> > > For background, see https://crbug.com/917919
> > >
> > > Signed-off-by: Manoj Gupta <manojgupta at chromium.org>
> > > ---
> > >  libavcodec/aarch64/h264idct_neon.S | 20 ++++++++++++--------
> > >  1 file changed, 12 insertions(+), 8 deletions(-)
> >
> > Has this been tested on all common aarch64 platforms ?
> >
> I have tested this on Chromium with clang+lld linker and Debian
> aarch64 cross compiler gcc + bfd linker.
> Please let me know if more testing is needed.

it would be good to test on apple too

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 2
"100% positive feedback" - "All either got their money back or didnt complain"
"Best seller ever, very honest" - "Seller refunded buyer after failed scam"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190102/e75a9c58/attachment.sig>


More information about the ffmpeg-devel mailing list