PR 33593 Misplaced synthetic plt symbols in aarch64 PIE binaries
Alan Modra
amodra@gmail.com
Wed Feb 4 07:40:35 GMT 2026
On Mon, Feb 02, 2026 at 02:09:27PM +0000, Richard Earnshaw wrote:
> On 31/01/2026 21:53, Alan Modra wrote:
> > On Sat, Jan 31, 2026 at 01:34:24PM +0000, Richard Earnshaw wrote:
> > > On 31/01/2026 12:06, Alan Modra wrote:
> > > > On Sat, Jan 31, 2026 at 12:04:16PM +0100, Andreas Schwab wrote:
> > > > > https://inbox.sourceware.org/binutils/6f335280-099c-40d7-9391-27fa47e6e55e@suse.de/
> > > > > has an alternative patch.
> > > >
> > > > That one looks fine to me and simpler too. It would have been nice if
> > > > someone had reviewed it and had it commited, or put the patch url in
> > > > the bug, or assigned the bug.
> > > >
> > >
> > > Like this one?
> > >
> > > https://inbox.sourceware.org/binutils/0a2331e3-2a65-4f50-b8d9-e2830f333f74@arm.com/
> >
> > I see a request for a testcase, not an OK. Ask for more, get nothing.
> >
>
> I was looking for a testcase to help understand exactly what the change was
> trying to achieve. It's not a bit of code I fully understand and a
> testcase, in addition to being useful long term would be useful to help. me
> reason about it.
There is a testcase in pr33593. At its heart the problem is that
elfNN_aarch64_plt_sym_val does not match setup_plt_values. The test
using bfd_link_executable in setup_plt_values is true for both PDE
(ET_EXEC) and PIE (ET_DYN with DF_1_PIE). elfNN_aarch64_plt_sym_val
only tests ET_EXEC thus gets it wrong for PIEs.
>
> > I'd been looking over binutils recent bugzilla entries looking to see
> > whether there was anything that ought to be fixed before 2.46 goes out
> > the door. I usually don't look at arm as it is well supported, but
> > this bug looked easy to fix. OK, so I wasted half an hour. To be
> > honest, I'm mostly peeved with myself for posting a patch with a
> > glaring bug. My patch "worked" on the PIE binary in the PR but would
> > have failed on some shared libraries.
> >
--
Alan Modra
More information about the Binutils
mailing list