Mod function hooking (#124)

* Add function hooks to mod symbol format

* Add function sizes to section function tables

* Add support for function hooks in live generator

* Add an option to the context to force function lookup for all non-relocated function calls

* Include relocs in overlay data

* Include R_MIPS_26 relocs in symbol file dumping/parsing

* Add manual patch symbols (syms.ld) to the output overlay file and relocs

* Fix which relocs were being emitted for patch sections

* Fix sign extension issue with mfc1, add TODO for banker's rounding
This commit is contained in:
Wiseguy 2025-01-26 21:52:46 -05:00 committed by GitHub
parent 36b5d9ae33
commit 38df8e3ddc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 269 additions and 41 deletions

View file

@ -48,7 +48,7 @@ namespace N64Recomp {
virtual void emit_case(int case_index, const std::string& target_label) const = 0;
virtual void emit_switch_error(uint32_t instr_vram, uint32_t jtbl_vram) const = 0;
virtual void emit_switch_close() const = 0;
virtual void emit_return(const Context& context) const = 0;
virtual void emit_return(const Context& context, size_t func_index) const = 0;
virtual void emit_check_fr(int fpr) const = 0;
virtual void emit_check_nan(int fpr, bool is_double) const = 0;
virtual void emit_cop0_status_read(int reg) const = 0;
@ -85,7 +85,7 @@ namespace N64Recomp {
void emit_case(int case_index, const std::string& target_label) const final;
void emit_switch_error(uint32_t instr_vram, uint32_t jtbl_vram) const final;
void emit_switch_close() const final;
void emit_return(const Context& context) const final;
void emit_return(const Context& context, size_t func_index) const final;
void emit_check_fr(int fpr) const final;
void emit_check_nan(int fpr, bool is_double) const final;
void emit_cop0_status_read(int reg) const final;