Philip Guenther <[email protected]> writes: > On Sat, Apr 13, 2013 at 8:17 AM, Jérémie Courrèges-Anglas > <[email protected]> wrote: >> I'm trying to port mosh[1] on OpenBSD; its build system tries to enable >> several compile and build flags. Most of those seem on by default, where >> suitable, on OpenBSD (SSP, PIE), but I wonder if ''ld -z relro'' >> and ''-z now'' would be useful. According to my limited testing, >> ''-z relro'' doesn't seem to change the executable (''readelf -d ... | >> grep BIND_NOW'' yields no output), whereas ''-z now'' seems to. > > OpenBSD has done the equivalent of "-z relro" for years now. I don't > think you can turn it off.
OK, nice. > (There's one detail, how the address ranges are identified, that is > cleaner in the relro design. We're looking at pulling that bit into > how OpenBSD does it.) > > As for -z now: yeah, it works on OpenBSD; what problem are they trying > to solve by using it? -z now seems to be useful when used together with -z relro, IIUC, allowing the global offset table to be marked read-only. If there is anything like that on OpenBSD, I'd like to use it for this port, else I'll just disable upstream hardening flags. > > Philip Guenther Thanks for your answer. Regards, -- Jérémie Courrèges-Anglas PGP Key fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494
