[Darwin, machopic 0/n] Initial tidy of Mach-O symbol handling.
We want to improve the detection and caching of symbol-properties
so that (a) we can make the compiler's output match the platform
norms (b) we can improve efficiency by checking flags instead of
inspecting strings. (c) The fix for PR71767 was a largish hammer
and we want to reduce the number of symbols that are made linker-
visible.
This first patch is largely typographical changes with no functional
difference intended:
- Tries to ensure that there's no overlap between the symbols used in
the Mach-O case and those declared in the i386 or rs6000 port trees.
- Some improvement to comments.
- Makes the naming of the symbol flags consistent with other uses.
- Provides a predicate macro for each use.
gcc/ChangeLog:
2019-10-07 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c (machopic_symbol_defined_p): Use symbol flag
predicates instead of accessing bits directly.
(machopic_indirect_call_target): Likewise.
(machopic_output_indirection): Likewise.
(darwin_encode_section_info): Improve description. Use renamed
symbol flags. Use predicate macros for variables and functions.
* config/darwin.h:
Rename MACHO_SYMBOL_VARIABLE to MACHO_SYMBOL_FLAG_VARIABLE.
Rename MACHO_SYMBOL_DEFINED to MACHO_SYMBOL_FLAG_DEFINED.
Rename MACHO_SYMBOL_STATIC to MACHO_SYMBOL_FLAG_STATIC.
(MACHO_SYMBOL_VARIABLE_P): New.
(MACHO_SYMBOL_DEFINED_P):New.
(MACHO_SYMBOL_STATIC_P): New.
* config/i386/darwin.h (MACHO_SYMBOL_FLAG_VARIABLE): Delete.
(SYMBOL_FLAG_SUBT_DEP): New.
* config/rs6000/darwin.h (SYMBOL_FLAG_SUBT_DEP): New.
From-SVN: r276674