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
> Date: Sat, 3 May 2025 14:58:48 +0000
> From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
>
> > Date: Sat, 3 May 2025 17:07:24 +0300
> > From: Valery Ushakov <uwe%stderr.spb.ru@localhost>
> >
> > > Sometimes entire files are conditionalized on __PIC__, such as:
> > >
> > > https://nxr.netbsd.org/xref/src/lib/libc/arch/sparc/gen/sigsetjmp.S?r=1.7
> >
> > 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.
>
> 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