nm-darwin-m.test 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. RUN: llvm-nm -format darwin %p/Inputs/darwin-m-test1.mach0-armv7 \
  2. RUN: | FileCheck %s -check-prefix test1
  3. RUN: llvm-nm -format darwin %p/Inputs/darwin-m-test2.macho-i386 \
  4. RUN: | FileCheck %s -check-prefix test2
  5. RUN: llvm-nm -m %p/Inputs/darwin-m-test3.macho-x86-64 \
  6. RUN: | FileCheck %s -check-prefix test3
  7. # This is testing that the various bits in the n_desc feild are correct
  8. test1: 00000001 (absolute) non-external _a
  9. test1: 00000008 (common) (alignment 2^2) external _c
  10. test1: 0000000a (__DATA,__data) non-external [no dead strip] _d
  11. test1: 00000004 (__TEXT,__text) non-external [alt entry] _e
  12. test1: 00000000 (__TEXT,__text) non-external [symbol resolver] _r
  13. test1: 00000008 (__TEXT,__text) non-external [Thumb] _t
  14. # This is testing that an N_INDR symbol gets its alias name, the "(for ...)"
  15. test2: (undefined) external __i
  16. test2: (indirect) external _i (for __i)
  17. # This is testing is using darwin-m-test3.macho-x86-64 that is linked with
  18. # dylibs that have the follow set of -install_names:
  19. # Foo.framework/Foo
  20. # /System/Library/Frameworks/FooPath.framework/FooPath
  21. # FooSuffix.framework/FooSuffix_debug
  22. # /System/Library/Frameworks/FooPathSuffix.framework/FooPathSuffix_profile
  23. # FooVers.framework/Versions/A/FooVers
  24. # /System/Library/Frameworks/FooPathVers.framework/Versions/B/FooPathVers
  25. # libx.dylib
  26. # libxSuffix_profile.dylib
  27. # /usr/local/lib/libxPathSuffix_debug.dylib
  28. # libATS.A_profile.dylib
  29. # /usr/lib/libPathATS.A_profile.dylib
  30. # QT.A.qtx
  31. # /lib/QTPath.qtx
  32. # /usr/lib/libSystem.B.dylib
  33. # to test that MachOObjectFile::guessLibraryShortName() is correctly parsing
  34. # them into their short names.
  35. test3: 0000000100000000 (__TEXT,__text) [referenced dynamically] external __mh_execute_header
  36. test3: (undefined) external _atsPathVersSuffix (from libPathATS)
  37. test3: (undefined) external _atsVersSuffix (from libATS)
  38. test3: (undefined) external _foo (from Foo)
  39. test3: (undefined) external _fooPath (from FooPath)
  40. test3: (undefined) external _fooPathSuffix (from FooPathSuffix)
  41. test3: (undefined) external _fooPathVers (from FooPathVers)
  42. test3: (undefined) external _fooSuffix (from FooSuffix)
  43. test3: (undefined) external _fooVers (from FooVers)
  44. test3: 0000000100000e60 (__TEXT,__text) external _main
  45. test3: (undefined) external _qt (from QT)
  46. test3: (undefined) external _qtPath (from QTPath)
  47. test3: (undefined) external _x (from libx)
  48. test3: (undefined) external _xPathSuffix (from libxPathSuffix)
  49. test3: (undefined) external _xSuffix (from libxSuffix)
  50. test3: (undefined) external dyld_stub_binder (from libSystem)