From 418524ac009c372aec5529fa1236fe75d12df433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marvin=20Ha=CC=88user?= <8659494+mhaeuser@users.noreply.github.com> Date: Sun, 12 Feb 2023 13:58:32 +0100 Subject: [PATCH] BaseTools: Rename __RELOC_FIX to __RO_RELOCS --- BaseTools/Conf/tools_def.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index c5a3084785..be8ddb5a8b 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -2988,12 +2988,12 @@ NOOPT_CLANGDWARF_X64_DLINK2_FLAGS = DEF(CLANGDWARF_X64_DLINK2_FLAGS) -O0 -fu # targeting it, into __TEXT moves it in front of __DATA, yielding negative # offsets to the relocation base address. These cannot be represented by the # Mach-O relocation offsets, resulting in a broken binary. -# To work around this, introduce a new 0-sized segment __RELOC_FIX segment with +# To work around this, introduce a new 0-sized segment __RO_RELOCS segment with # RW permissions, which will make all relocations relative to the beginning of # image. This also makes the usage of "-read_only_relocs suppress" safe, as # relocations can now target __TEXT without triggering the same issue. # -DEFINE XCODE5_RORELOCS_ARGS = -segprot __RELOC_FIX rw- rw- -segment_order __RELOC_FIX:__TEXT:__DATA_CONST:__DATA -rename_section __TEXT __text __RELOC_FIX __text -rename_section __RELOC_FIX __text __TEXT __text +DEFINE XCODE5_RORELOCS_ARGS = -segprot __RO_RELOCS rw- rw- -segment_order __RO_RELOCS:__TEXT:__DATA_CONST:__DATA -rename_section __TEXT __text __RO_RELOCS __text -rename_section __RO_RELOCS __text __TEXT __text DEFINE XCODE5_RODATA_ARGS = DEF(XCODE5_RORELOCS_ARGS) -segprot __DATA_CONST r-- r-- -rename_section __DATA __const __DATA_CONST __const -rename_section __TEXT __const __DATA_CONST __text_const -rename_section __TEXT __cstring __DATA_CONST __cstring -rename_section __TEXT __ustring __DATA_CONST __ustring ##################