From b5cac3786f0b8760b45c24a49f5fe27f469dddc2 Mon Sep 17 00:00:00 2001 From: beingpraveen Date: Tue, 29 Sep 2020 15:35:26 -0700 Subject: [PATCH] iOS14 on arm64e architecture symbol is listed with segment __AUTH_CONST --- fishhook.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fishhook.c b/fishhook.c index 026a5c0..38304f3 100644 --- a/fishhook.c +++ b/fishhook.c @@ -54,6 +54,10 @@ typedef struct nlist nlist_t; #define SEG_DATA_CONST "__DATA_CONST" #endif +#ifndef SEG_AUTH_CONST +#define SEG_AUTH_CONST "__AUTH_CONST" +#endif + struct rebindings_entry { struct rebinding *rebindings; size_t rebindings_nel; @@ -202,7 +206,8 @@ static void rebind_symbols_for_image(struct rebindings_entry *rebindings, cur_seg_cmd = (segment_command_t *)cur; if (cur_seg_cmd->cmd == LC_SEGMENT_ARCH_DEPENDENT) { if (strcmp(cur_seg_cmd->segname, SEG_DATA) != 0 && - strcmp(cur_seg_cmd->segname, SEG_DATA_CONST) != 0) { + strcmp(cur_seg_cmd->segname, SEG_DATA_CONST) != 0 && + strcmp(cur_seg_cmd->segname, SEG_AUTH_CONST) != 0) { continue; } for (uint j = 0; j < cur_seg_cmd->nsects; j++) {