Re: [FFmpeg-devel] [PATCH] swresample/arm: avoid conditional branch to PLT in THUMB-2.

2018-04-28 Thread Michael Niedermayer
On Fri, Apr 27, 2018 at 02:06:04PM -0700, Rahul Chaudhry wrote: > It was reported on github that this patch causes build errors with xcode: > > https://github.com/FFmpeg/FFmpeg/commit/b22db4f465c9adb2cf1489e04f7b65ef6bb55b8b#commitcomment-28725295 > > The attached patch fixes the build errors

Re: [FFmpeg-devel] [PATCH] swresample/arm: avoid conditional branch to PLT in THUMB-2.

2018-04-27 Thread Rahul Chaudhry
It was reported on github that this patch causes build errors with xcode: https://github.com/FFmpeg/FFmpeg/commit/b22db4f465c9adb2cf1489e04f7b65ef6bb55b8b#commitcomment-28725295 The attached patch fixes the build errors by renaming the labels. This time I've tested it with clang from xcode on

Re: [FFmpeg-devel] [PATCH] swresample/arm: avoid conditional branch to PLT in THUMB-2.

2018-04-19 Thread Michael Niedermayer
On Wed, Apr 18, 2018 at 04:40:28PM -0700, Rahul Chaudhry wrote: > On Wed, Apr 18, 2018 at 3:46 PM, Michael Niedermayer > wrote: > > please make sure this works on apple based arm (unless you know it works) > > (ive tested qemu linux based) > > > > Also please add a commit

Re: [FFmpeg-devel] [PATCH] swresample/arm: avoid conditional branch to PLT in THUMB-2.

2018-04-18 Thread Rahul Chaudhry
On Wed, Apr 18, 2018 at 3:46 PM, Michael Niedermayer wrote: > please make sure this works on apple based arm (unless you know it works) > (ive tested qemu linux based) > > Also please add a commit message If by 'apple based arm' you mean llvm/clang assembler, then yes,

Re: [FFmpeg-devel] [PATCH] swresample/arm: avoid conditional branch to PLT in THUMB-2.

2018-04-18 Thread Michael Niedermayer
On Tue, Apr 17, 2018 at 12:36:45PM -0700, Rahul Chaudhry wrote: > On Tue, Apr 17, 2018 at 6:17 AM, Michael Niedermayer > wrote: > > why does it go through the PLT at all ? > > You're right. The branches don't have to go through the PLT at all. > > Here's an alternate

Re: [FFmpeg-devel] [PATCH] swresample/arm: avoid conditional branch to PLT in THUMB-2.

2018-04-17 Thread Rahul Chaudhry
On Tue, Apr 17, 2018 at 6:17 AM, Michael Niedermayer wrote: > why does it go through the PLT at all ? You're right. The branches don't have to go through the PLT at all. Here's an alternate patch that modifies the branches to skip the PLT and jump directly to the

Re: [FFmpeg-devel] [PATCH] swresample/arm: avoid conditional branch to PLT in THUMB-2.

2018-04-17 Thread Michael Niedermayer
On Mon, Apr 16, 2018 at 01:13:21PM -0700, Rahul Chaudhry wrote: > Hi Michael, > > While it is true that some linkers support the conditional branch to PLT in > Thumb mode, it is of very limited use, since it uses an R_ARM_THM_JUMP19 > relocation and does not have a good range. If I switch my

Re: [FFmpeg-devel] [PATCH] swresample/arm: avoid conditional branch to PLT in THUMB-2.

2018-04-16 Thread Rahul Chaudhry
Hi Michael, While it is true that some linkers support the conditional branch to PLT in Thumb mode, it is of very limited use, since it uses an R_ARM_THM_JUMP19 relocation and does not have a good range. If I switch my linker to ld.bfd for the original issue, it fails for another library with a

Re: [FFmpeg-devel] [PATCH] swresample/arm: avoid conditional branch to PLT in THUMB-2.

2018-04-16 Thread Michael Niedermayer
On Fri, Apr 13, 2018 at 01:43:44PM -0700, Rahul Chaudhry wrote: > When compiling for THUMB-2, the conditional branch to PLT results in a > R_ARM_THM_JUMP19 relocation. Some linkers don't support this relocation > in THUMB-2 (ld.gold), while others can end up truncating the relocation > to fit

[FFmpeg-devel] [PATCH] swresample/arm: avoid conditional branch to PLT in THUMB-2.

2018-04-14 Thread Rahul Chaudhry
When compiling for THUMB-2, the conditional branch to PLT results in a R_ARM_THM_JUMP19 relocation. Some linkers don't support this relocation in THUMB-2 (ld.gold), while others can end up truncating the relocation to fit (ld.bfd). Adding an "it eq" before the branch converts it into an

[FFmpeg-devel] [PATCH] swresample/arm: avoid conditional branch to PLT in THUMB-2.

2018-04-13 Thread Rahul Chaudhry
When compiling for THUMB-2, the conditional branch to PLT results in a R_ARM_THM_JUMP19 relocation. Some linkers don't support this relocation in THUMB-2 (ld.gold), while others can end up truncating the relocation to fit (ld.bfd). Adding an "it eq" before the branch converts it into an