BaseTools: Rename __RELOC_FIX to __RO_RELOCS

This commit is contained in:
Marvin Häuser 2023-02-12 13:58:32 +01:00
parent f5b2118058
commit 418524ac00

View File

@ -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
##################