Nav apraksta

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/bin/bash
  2. # Copyright 2014 Google Inc. All Rights Reserved.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. #
  16. # nm stub for testing of listing.
  17. # Will recognize (and ignore) the -nC options.
  18. #
  19. # Outputs fixed nm output.
  20. while getopts nC opt; do
  21. case "$opt" in
  22. n) ;;
  23. C) demangle=1;;
  24. *)
  25. echo "unrecognized option: $1" >&2
  26. exit 1
  27. esac
  28. done
  29. if [ $demangle ]
  30. then
  31. cat <<EOF
  32. 0000000000001000 t lineA001
  33. 0000000000001000 t lineA002
  34. 0000000000001000 t line1000
  35. 0000000000002000 t line200A
  36. 0000000000002000 t line2000
  37. 0000000000002000 t line200B
  38. 0000000000003000 t line3000
  39. 0000000000003000 t Dumb::operator()(char const*) const
  40. 0000000000003000 t lineB00C
  41. 0000000000003000 t line300D
  42. 0000000000004000 t _the_end
  43. EOF
  44. exit 0
  45. fi
  46. cat <<EOF
  47. 0000000000001000 t lineA001
  48. 0000000000001000 t lineA002
  49. 0000000000001000 t line1000
  50. 0000000000002000 t line200A
  51. 0000000000002000 t line2000
  52. 0000000000002000 t line200B
  53. 0000000000003000 t line3000
  54. 0000000000003000 t _ZNK4DumbclEPKc
  55. 0000000000003000 t lineB00C
  56. 0000000000003000 t line300D
  57. 0000000000004000 t _the_end
  58. EOF
  59. exit 0