anchor_functions.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright 2017 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef BASE_ANDROID_LIBRARY_LOADER_ANCHOR_FUNCTIONS_H_
  5. #define BASE_ANDROID_LIBRARY_LOADER_ANCHOR_FUNCTIONS_H_
  6. #include <cstdint>
  7. #include "base/android/library_loader/anchor_functions_buildflags.h"
  8. #include "base/base_export.h"
  9. #if BUILDFLAG(SUPPORTS_CODE_ORDERING)
  10. namespace base {
  11. namespace android {
  12. // Start and end of .text, respectively.
  13. BASE_EXPORT extern const size_t kStartOfText;
  14. BASE_EXPORT extern const size_t kEndOfText;
  15. // Start and end of the ordered part of .text, respectively.
  16. BASE_EXPORT extern const size_t kStartOfOrderedText;
  17. BASE_EXPORT extern const size_t kEndOfOrderedText;
  18. // Returns true if anchors are sane.
  19. BASE_EXPORT bool AreAnchorsSane();
  20. // Returns true if the ordering looks sane.
  21. BASE_EXPORT bool IsOrderingSane();
  22. } // namespace android
  23. } // namespace base
  24. #endif // BUILDFLAG(SUPPORTS_CODE_ORDERING)
  25. #endif // BASE_ANDROID_LIBRARY_LOADER_ANCHOR_FUNCTIONS_H_