comparison mupdf-source/scripts/jlib.py @ 7:5ab937c03c27

Apply full RELRO to all generated binaries. Also strip the generated binaries.
author Franz Glasner <fzglas.hg@dom66.de>
date Tue, 16 Sep 2025 12:37:32 +0200
parents b50eed0cc0ef
children fdb709369d57
comparison
equal deleted inserted replaced
6:b5f06508363a 7:5ab937c03c27
2301 # `install_name_tool -change` to rename internal names to 2301 # `install_name_tool -change` to rename internal names to
2302 # `@rpath/<leafname>`. 2302 # `@rpath/<leafname>`.
2303 ret += ' -Wl,-rpath,@loader_path/.' 2303 ret += ' -Wl,-rpath,@loader_path/.'
2304 else: 2304 else:
2305 ret += " -Wl,-rpath,'$ORIGIN',-z,origin" 2305 ret += " -Wl,-rpath,'$ORIGIN',-z,origin"
2306 # FreeBSD
2307 # Full RELRO
2308 ret += ' -Wl,-z,relro,-z,now'
2309 # Strip
2310 ret += ' -Wl,-s'
2306 #log('{sos=} {ld_origin=} {ret=}') 2311 #log('{sos=} {ld_origin=} {ret=}')
2307 return ret.strip() 2312 return ret.strip()