mirror of
https://github.com/TheOfficialFloW/bd-jb
synced 2024-11-25 10:22:15 -05:00
Clean up payload.
This commit is contained in:
parent
2a62c2b396
commit
f202a5a495
@ -4,13 +4,13 @@ OBJS = start.o payload.o
|
|||||||
CC = gcc
|
CC = gcc
|
||||||
AS = as
|
AS = as
|
||||||
OBJCOPY = objcopy
|
OBJCOPY = objcopy
|
||||||
CFLAGS = -Os -fno-stack-protector -fpic -fpie
|
CFLAGS = -Os -fno-stack-protector
|
||||||
LDFLAGS = -T linker.x -nostdlib -nostartfiles
|
LDFLAGS = -T linker.x -nostdlib -nostartfiles
|
||||||
|
|
||||||
all: $(TARGET).bin
|
all: $(TARGET).bin
|
||||||
|
|
||||||
%.bin: %.elf
|
%.bin: %.elf
|
||||||
$(OBJCOPY) -S -O binary $^ $@
|
$(OBJCOPY) -S -j .text -j .data -j .rodata -j .bss -O binary $^ $@
|
||||||
|
|
||||||
$(TARGET).elf: $(OBJS)
|
$(TARGET).elf: $(OBJS)
|
||||||
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
|
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
int payload(int (* sceKernelDlsym)(int handle, const char *symbol, uintptr_t *address)) {
|
typedef int32_t SceKernelModule;
|
||||||
|
|
||||||
|
int payload(int (* sceKernelDlsym)(SceKernelModule handle, const char *symbol, void **addrp)) {
|
||||||
return 1337;
|
return 1337;
|
||||||
}
|
}
|
||||||
|
@ -1,2 +1,5 @@
|
|||||||
|
.text
|
||||||
|
|
||||||
|
.global _start
|
||||||
_start:
|
_start:
|
||||||
jmp payload
|
jmp payload
|
||||||
|
Loading…
Reference in New Issue
Block a user