[Darwin, machopic 0/n] Initial tidy of Mach-O symbol handling.
authorIain Sandoe <iain@sandoe.co.uk>
Mon, 7 Oct 2019 20:14:26 +0000 (20:14 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Mon, 7 Oct 2019 20:14:26 +0000 (20:14 +0000)
commit2161a445d1c129bf2faa031bd862fa4fe3a4121b
tree77c3c0f3baa914515e1bbe50035a456e446c0d4d
parent8a8969957a86d1832434a07169976c0b1b9e837c
[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
gcc/ChangeLog
gcc/config/darwin.c
gcc/config/darwin.h
gcc/config/i386/darwin.h
gcc/config/rs6000/darwin.h