Hidden.h 702 B

12345678910111213141516171819202122
  1. /** @file
  2. Copyright (c) 2018, Linaro Limited. All rights reserved.
  3. SPDX-License-Identifier: BSD-2-Clause-Patent
  4. **/
  5. #ifndef __PLATFORM_HIDDEN_H
  6. #define __PLATFORM_HIDDEN_H
  7. //
  8. // Setting the GCC -fvisibility=hidden command line option is not quite the same
  9. // as setting the pragma below: the former only affects definitions, whereas the
  10. // pragma affects extern declarations as well. So if we want to ensure that no
  11. // GOT indirected symbol references are emitted, we need to use the pragma, or
  12. // GOT based cross object references could be emitted, e.g., in libraries, and
  13. // these cannot be relaxed to ordinary symbol references at link time.
  14. //
  15. #pragma GCC visibility push (hidden)
  16. #endif