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 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?)
But the x86 ones are just silly: we already have a macro PIC_PLT to
conditionally expand to x@PLT or x depending on __PIC__, so
#ifdef __PIC__
call PIC_PLT(x)
#else
call x
#endif
redundantly makes this PIC code an ATM machine.
Home |
Main Index |
Thread Index |
Old Index