diff options
author | Tobias Heider <me@tobhe.de> | 2023-12-03 17:32:20 +0100 |
---|---|---|
committer | Quentin Carbonneaux <quentin@c9x.me> | 2023-12-30 15:59:25 +0100 |
commit | 5af33410f6faa6c0f7d97af5b802b2608b228bc2 (patch) | |
tree | d1cc0a83543d529898949b85e54003d867234722 /amd64 | |
parent | 00501eeb6ee3a59cc2aa5f78c6569b8d1a3dae49 (diff) | |
download | roux-5af33410f6faa6c0f7d97af5b802b2608b228bc2.tar.gz |
Fix IBT/BTI by instrumenting function calls
Diffstat (limited to 'amd64')
-rw-r--r-- | amd64/emit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/amd64/emit.c b/amd64/emit.c index 297cc76..c949589 100644 --- a/amd64/emit.c +++ b/amd64/emit.c @@ -581,7 +581,7 @@ amd64_emitfn(Fn *fn, FILE *f) uint64_t fs; emitfnlnk(fn->name, &fn->lnk, f); - fputs("\tpushq %rbp\n\tmovq %rsp, %rbp\n", f); + fputs("\tendbr64\n\tpushq %rbp\n\tmovq %rsp, %rbp\n", f); fs = framesz(fn); if (fs) fprintf(f, "\tsubq $%"PRIu64", %%rsp\n", fs); |