October 22, 2024
Chicago 12, Melborne City, USA
security

why ghc does not support PIE and Full RelRO in linux?


I am Haskell beginner. I wrote a simple code and compiled it with ghc. As a result of checking the compiled binary with the command checksec, PIE was not applied and RelRO was set to partial.

λ vm-ubuntu22 projects → checksec --file haskell_code
RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      FILE
Partial RELRO   No canary found   NX enabled    No PIE          No RPATH   No RUNPATH   haskell_code

I want to compiled binary to have PIE and Full ReloRO. I’ve also tried -fPIE option, but it hasn’t changed. How can I apply it?

FYI I’m using version ghc 9.6.6 and the operating system is ubuntu 22.04.



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video