mirror of
https://github.com/TheOfficialFloW/bd-jb
synced 2024-11-25 02:12:16 -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
|
||||
AS = as
|
||||
OBJCOPY = objcopy
|
||||
CFLAGS = -Os -fno-stack-protector -fpic -fpie
|
||||
CFLAGS = -Os -fno-stack-protector
|
||||
LDFLAGS = -T linker.x -nostdlib -nostartfiles
|
||||
|
||||
all: $(TARGET).bin
|
||||
|
||||
%.bin: %.elf
|
||||
$(OBJCOPY) -S -O binary $^ $@
|
||||
$(OBJCOPY) -S -j .text -j .data -j .rodata -j .bss -O binary $^ $@
|
||||
|
||||
$(TARGET).elf: $(OBJS)
|
||||
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
|
||||
|
@ -2,6 +2,8 @@
|
||||
#include <stdint.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;
|
||||
}
|
||||
|
@ -1,2 +1,5 @@
|
||||
.text
|
||||
|
||||
.global _start
|
||||
_start:
|
||||
jmp payload
|
||||
|
Loading…
Reference in New Issue
Block a user