はじめての x86_64/Linux プログラミング

$ vi amd64linux.pl

#!/usr/bin/perl
use DynaLoader;
my $x=""
. "\x48\xb8Hello64!"              #  mov    'Hello64!',%rax
. "\x50"                          #  push   %rax
. "\x48\x89\xe6"                  #  mov    %rsp,%rsi
. "\x48\xc7\xc7\x01\x00\x00\x00"  #  mov    $0x1,%rdi
. "\x48\xc7\xc2\x08\x00\x00\x00"  #  mov    $0x8,%rdx
. "\x48\xc7\xc0\x01\x00\x00\x00"  #  mov    $0x1,%rax
. "\x0f\x05"                      #  syscall
. "\x48\x89\xf8"                  #  mov    %rdi,%rax
. "\x0f\x05"                      #  syscall
. "\x58"                          #  pop   %rax
. "\xc3"                          #  ret
;
DynaLoader::dl_install_xsub("X",unpack("L",pack("P*",$x)));X();
print "ok\n";

$ perl amd64linux.pl

Hello64!Hello64!ok

i386/Linux の頃からいろいろ変わってますね。