My attempt at writing shellcodes which use relative addressing and do not push strings to stack and keep it as general as possible and as small as possible ...
The syntax for RIP-relative addressing works different in nasm. F.e.: lea rax, [rel label1]. There's also a directive to switch between rip relative addressing by default (DEFAULT REL) and back to ...