NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/59391: unnecessary __PIC__ conditionals clutter .S files



The following reply was made to PR lib/59391; it has been noted by GNATS.

From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: Valery Ushakov <uwe%stderr.spb.ru@localhost>
Cc: gnats-bugs%NetBSD.org@localhost, netbsd-bugs%NetBSD.org@localhost
Subject: Re: lib/59391: unnecessary __PIC__ conditionals clutter .S files
Date: Sat, 3 May 2025 15:56:33 +0000

 > Date: Sat, 3 May 2025 14:58:48 +0000
 > From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
 >=20
 > > Date: Sat, 3 May 2025 17:07:24 +0300
 > > From: Valery Ushakov <uwe%stderr.spb.ru@localhost>
 > >=20
 > > > Sometimes entire files are conditionalized on __PIC__, such as:
 > > >
 > > > https://nxr.netbsd.org/xref/src/lib/libc/arch/sparc/gen/sigsetjmp.S?r=
 =3D1.7
 > >=20
 > > Which, in this particular case, is, IMHO, the best way to write it.
 > > [...]
 > > But trying to cram this into one text for static and PIC with macro
 > > magic will be a bad idea.
 >=20
 > So I see, the control flow is nontrivially different, I guess because
 > there's no PLT here (and no conditional branch to register)?  Fair
 > enough!  (Though why not use PLT here?)
 
 Answering my own question about PLT: even if we went through the PLT
 here, it wouldn't help because there's only R_SPARC_WPLT30 for CALL
 instructions, no R_SPARC_WPLT22 for conditional branches, so the
 control flow would still be substantively different for the PIC and
 non-PIC cases.
 


Home | Main Index | Thread Index | Old Index