Payloads are now linked into the final remote executable... much cleaner but still needs some work
This commit is contained in:
17
c8_libpayload/pl/src/sysreg.c
Normal file
17
c8_libpayload/pl/src/sysreg.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "util.h"
|
||||
|
||||
struct sysregs
|
||||
{
|
||||
long pt_base;
|
||||
long evt_base;
|
||||
};
|
||||
|
||||
TEXT_SECTION
|
||||
long long _start()
|
||||
{
|
||||
struct sysregs res;
|
||||
__asm__("mrs %0, ttbr0_el1" : "=r" (res.pt_base));
|
||||
__asm__("mrs %0, vbar_el1" : "=r" (res.evt_base));
|
||||
|
||||
return res.pt_base;
|
||||
}
|
||||
Reference in New Issue
Block a user