From aa7727964b908355d08ccd6eac95c1dc51f6005e Mon Sep 17 00:00:00 2001 From: herman ten brugge Date: Fri, 2 Apr 2021 12:51:38 +0200 Subject: [PATCH] plt-reloc fix for macos --- tccelf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tccelf.c b/tccelf.c index c7a8022b..da675f5e 100644 --- a/tccelf.c +++ b/tccelf.c @@ -1001,9 +1001,12 @@ ST_FUNC void relocate_sections(TCCState *s1) if (sr->sh_type != SHT_RELX) continue; s = s1->sections[sr->sh_info]; +#ifndef TCC_TARGET_MACHO if (s != s1->got || s1->static_link - || s1->output_type == TCC_OUTPUT_MEMORY) { + || s1->output_type == TCC_OUTPUT_MEMORY) +#endif + { relocate_section(s1, s, sr); } #ifndef ELF_OBJ_ONLY