Browse Source

Remove extra version check on GNU objdump (#554)

Garrett Wang 4 years ago
parent
commit
1a94d8640e
No account linked to committer's email address
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      internal/binutils/binutils.go
  2. 1
    1
      internal/binutils/binutils_test.go

+ 1
- 1
internal/binutils/binutils.go View File

@@ -233,7 +233,7 @@ func isLLVMObjdump(output string) bool {
233 233
 // and returns a boolean indicating if the given binary is a GNU
234 234
 // binutils objdump binary. No version check is performed.
235 235
 func isBuObjdump(output string) bool {
236
-	return strings.Contains(output, "GNU objdump") && strings.Contains(output, "Binutils")
236
+	return strings.Contains(output, "GNU objdump")
237 237
 }
238 238
 
239 239
 // findExe looks for an executable command on a set of paths.

+ 1
- 1
internal/binutils/binutils_test.go View File

@@ -494,7 +494,7 @@ func TestObjdumpVersionChecks(t *testing.T) {
494 494
 		},
495 495
 		{
496 496
 			desc: "Invalid GNU objdump version string",
497
-			ver:  "GNU objdump (GNU Banutils) 2.34\nCopyright (C) 2020 Free Software Foundation, Inc.",
497
+			ver:  "GNU nm (GNU Binutils) 2.34\nCopyright (C) 2020 Free Software Foundation, Inc.",
498 498
 			want: false,
499 499
 		},
500 500
 	} {