nixcloud / ip2unix

Turn IP sockets into Unix domain sockets
GNU Lesser General Public License v3.0
357 stars 10 forks source link

build executable as position independent #11

Closed etam closed 4 years ago

etam commented 4 years ago

Possible solution: just change the instruction to use meson -Db_pie=true build. Another possible solution: use something fancy in meson.build

As noted here https://github.com/nixcloud/ip2unix/issues/9#issuecomment-634920248 It's required to make dlopen work properly.

aszlig commented 4 years ago

Ah, damn... thanks for noticing, the reason why this doesn't work since version 2.1.2 is because I accidentally dropped the -pie in 8e10ef2d1d76ba8835735eaab167e77de34df88a.

The reason why I didn't notice this myself is because on Nix(OS) we build with -pie (and -fPIC) by default.

I'll add a new test case with all the hardening flags disabled so next time I accidentally remove it, we'll notice early on.