Hardening flags

Julien ÉLIE julien at trigofacile.com
Mon Dec 7 19:30:51 UTC 2020


Hi Russ,

>> With libperl.a built without -fPIC, linking with -pie fails for innd.
>> Should we care for that?
> 
> My initial feeling is no mostly because I don't expect many users of INN
> to be building their own Perl or Python (generally they come with whatever
> distribution they're using), and if they do build them, I think most
> people will build them shared rather than static

Noted, thanks for your answer.


> (although I admit I don't know what the default is)

As for Perl, default is static.
One needs to run "./Configure -Duseshrplib" so as to have a shared library.

Quoting INSTALL:

"""
On systems that support dynamic loading, it may be possible to replace 
libperl.a with a shared libperl.so.
[...]
The disadvantages are that there may be a significant performance 
penalty associated with the shared libperl.so, and that the overall 
mechanism is still rather fragile with respect to different versions and 
upgrades. In terms of performance, on my test system (Solaris 2.5_x86) 
the perl test suite took roughly 15% longer to run with the shared 
libperl.so.  Your system and typical applications may well give quite 
different results.
"""

That's probably why the default is still to generate a static library, 
unless explicitly asked otherwise.


> If it turns out that this is more common than we thought, we can always
> do something about that later.

Sure!

-- 
Julien ÉLIE

« Il ne faut jamais gifler un sourd : il perd la moitié du plaisir. Il
   sent la gifle mais il ne l'entend pas. » (Georges Courteline)


More information about the inn-workers mailing list