diff options
-rw-r--r-- | shellcode/.gitignore | 5 | ||||
-rw-r--r-- | shellcode/Makefile | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/shellcode/.gitignore b/shellcode/.gitignore new file mode 100644 index 0000000..0d4fce1 --- /dev/null +++ b/shellcode/.gitignore @@ -0,0 +1,5 @@ +simple +simple2 +*.bin +*.map +*.o diff --git a/shellcode/Makefile b/shellcode/Makefile index c35111d..e2b4b69 100644 --- a/shellcode/Makefile +++ b/shellcode/Makefile @@ -2,6 +2,7 @@ RM := rm CC := gcc LD := ld OBJCOPY := objcopy +XXD := xxd CFLAGS = -c -Wall -fpic -Os LDFLAGS = SUBDIR ?= . @@ -13,6 +14,7 @@ all: $(TARGETS) $(CC) $(CFLAGS) -o $@ $< $(LD) $(LDFLAGS) -N -Ttext 0x0 -e _start -Map $(patsubst %.o,%.map,$@) $@ -o $(patsubst %.o,%,$@) $(OBJCOPY) -R .note -R .comment -S -O binary $(patsubst %.o,%,$@) $(patsubst %.o,%.bin,$@) + $(XXD) -i $(patsubst %.o,%.bin,$@) clean: $(RM) -f $(patsubst %.o,%.map,$(TARGETS)) $(patsubst %.o,%.bin,$(TARGETS)) $(patsubst %.o,%,$(TARGETS)) $(TARGETS) |