What does the pic USE flag do these days?

Hanno Böck <[email protected]> Wed, 19 Sep 2018 09:24:27 +0200
Newsgroups gmane.linux.gentoo.hardened
Message-ID <20180919092427.2e2f2c7c@computer>
Hi,

One of the differences between gentoo standard and hardened profiles is
the pic use flag.

I wonder what it does and if it has any meaning these days. From what I
understand in any modern-day Linux system position independent code
(pic) is always used, as we have ASLR and pie executables (in Gentoo
since 17.0 profiles).

In many cases it seems to disable assembly optimizations, often with
comments indicating that the assembly is not "pic friendly" (e.g. gzip
useflag description says "disable optimized assembly code that is not
PIC friendly").

If the flag just disables assembly optimizations then I wonder if it
should be renamed (or if we need it at all - in case these assembly
optimizations have no downsides).


--=20
Hanno B=C3=B6ck
https://hboeck.de/

mail/jabber: [email protected]
GPG: FE73757FA60E4E21B937579FA5880072BBB51E42