[PATCH][Binutils][AArch64] Relax thumb-plt testcases regexpr.
Tamar Christina
Tamar.Christina@arm.com
Mon Aug 3 15:10:00 GMT 2020
Hi Jan.
> -----Original Message-----
> From: Jan Beulich <jbeulich@suse.com>
> Sent: Monday, August 3, 2020 4:01 PM
> To: Tamar Christina <Tamar.Christina@arm.com>
> Cc: binutils@sourceware.org; nd <nd@arm.com>; Richard Earnshaw
> <Richard.Earnshaw@arm.com>; Marcus Shawcroft
> <Marcus.Shawcroft@arm.com>
> Subject: Re: [PATCH][Binutils][AArch64] Relax thumb-plt testcases regexpr.
>
> On 03.08.2020 16:22, Tamar Christina wrote:
> > The regexpr in these two files are a bit strict in that they don't
> > account for the slight changes in tags in certain arm targets which cause our
> address
> > offsets to change. This changes the tests to allow slight movement in
> > locations while still strictly checking the rest.
> >
> > Cross-compiled and regtested on
> > arm-none-eabi, arm-none-linux-gnueabi
> >
> > and no issues.
>
> Thanks for doing this. One question though: While playing with things, I
> noticed, as said, the difference with or without GNU_HASH. However, while
> suppressing its generation would have taken care of the differences that
> your change here covers, I noticed that the addresses overall also changed
> (and hence adding that command line option to ld wouldn't have helped). Is
> there any significance for the tests in the addresses shown on the left side of
> the disassembly, or could these also be relaxed?
thumb-plt.d checks to see that the branch at 12e points to the previous instruction at 12a.
So there is a significance in this case.
thumb-plt-got.d has significance in the value encoded in the got slot, 0x11010000
which is the address of PLT0, so here the address is also significant.
Even though it's really checking only if the LSB is set I rather have the address there to make sure
It's not pointing to a random address which happens to have the LSB set.
Which is why I force the entry point to be 0x0.
Regards,
Tamar
>
> Jan
More information about the Binutils
mailing list