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 824B

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