revert.FILE5_29-39-g0e78a704.pr-591-print-if-the-file-has-debug-info.patch 967 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. Subject: Revert: PR/591: Print if the file has debug info
  2. Origin: FILE5_29-39-g0e78a704
  3. Upstream-Author: Christos Zoulas <christos@zoulas.com>
  4. Date: Sun Jan 29 19:34:24 2017 +0000
  5. --- a/src/readelf.c
  6. +++ b/src/readelf.c
  7. @@ -1185,7 +1185,7 @@
  8. {
  9. Elf32_Shdr sh32;
  10. Elf64_Shdr sh64;
  11. - int stripped = 1, has_debug_info = 1;
  12. + int stripped = 1;
  13. size_t nbadcap = 0;
  14. void *nbuf;
  15. off_t noff, coff, name_off;
  16. @@ -1216,10 +1216,8 @@
  17. return -1;
  18. }
  19. name[namesize] = '\0';
  20. - if (strcmp(name, ".debug_info") == 0) {
  21. - has_debug_info = 1;
  22. + if (strcmp(name, ".debug_info") == 0)
  23. stripped = 0;
  24. - }
  25. if (pread(fd, xsh_addr, xsh_sizeof, off) < (ssize_t)xsh_sizeof) {
  26. file_badread(ms);
  27. @@ -1375,10 +1373,6 @@
  28. if (file_printf(ms, ", %sstripped", stripped ? "" : "not ") == -1)
  29. return -1;
  30. - if (has_debug_info) {
  31. - if (file_printf(ms, ", with debug_info") == -1)
  32. - return -1;
  33. - }
  34. if (cap_hw1) {
  35. const cap_desc_t *cdp;
  36. switch (mach) {