A GNU/Linux AMD X86-64 ELF Quine. Produce itself on stdout without reading outside .data section.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 699B

12345678910111213141516171819202122232425262728293031323334353637
  1. NASM=nasm
  2. LD=ld
  3. GZIP=gzip
  4. BASE64=base64
  5. ASFLAGS=-felf64
  6. LDFLAGS=-s -melf_x86_64
  7. all: amd64elfquine check
  8. dist: amd64elfquine amd64elfquine.gz amd64elfquine.gz.txt
  9. md5sum $^ > MD5SUMS;\
  10. sha256sum $^ > SHA256SUMS;\
  11. sha512sum $^ > SHA512SUMS;
  12. amd64elfquine.gz.txt: amd64elfquine.gz
  13. $(BASE64) > $@ < $<
  14. amd64elfquine.gz: amd64elfquine
  15. $(GZIP) -9 -c > $@ < $<
  16. amd64elfquine: amd64elfquine.o
  17. $(LD) $(LDFLAGS) $< -o $@
  18. amd64elfquine.o: amd64elfquine.asm
  19. $(NASM) $(ASFLAGS) $< -o $@
  20. .PHONY: clean dist check
  21. check: amd64elfquine
  22. /bin/sh check.sh
  23. clean:
  24. -rm -fv amd64elfquine.o
  25. distclean: clean
  26. -rm -fv amd64elfquine amd64elfquine.gz amd64elfquine.gz.txt MD5SUMS SHA256SUMS SHA512SUMS