Нет описания

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. # objdump stub for testing of listing.
  17. # Will recognize (and ignore) the -nC options.
  18. #
  19. # Outputs fixed nm output.
  20. START=0
  21. STOP=0
  22. while [ $# -gt 1 ] ; do
  23. case "$1" in
  24. --start-address=*) START=$(echo $1 | sed 's/.*=//') ;;
  25. --stop-address=*) STOP=$(echo $1 | sed 's/.*=//') ;;
  26. --no-show-raw-insn|-d|-C|-n|-l) ;;
  27. *) echo "Unrecognized option $1"
  28. exit 1
  29. esac
  30. shift
  31. done
  32. case "$START$STOP" in
  33. "0x10000x1fff")
  34. cat <<EOF
  35. 1000: instruction one
  36. 1001: instruction two
  37. 1002: instruction three
  38. 1003: instruction four
  39. EOF
  40. ;;
  41. "0x20000x2fff")
  42. cat <<EOF
  43. 2000: instruction one
  44. 2001: instruction two
  45. EOF
  46. ;;
  47. "0x30000x3fff")
  48. cat <<EOF
  49. 3000: instruction one
  50. 3001: instruction two
  51. 3002: instruction three
  52. 3003: instruction four
  53. 3004: instruction five
  54. EOF
  55. ;;
  56. esac
  57. exit 0