diff options
| author | 2017-09-27 16:33:40 -0700 | |
|---|---|---|
| committer | 2017-09-27 16:33:40 -0700 | |
| commit | 956dac258797a22ebe970be424cbf77a471a4d54 (patch) | |
| tree | 1af918328817eb0e72b638bbef684edd7eab9428 /compiler/utils/assembler_thumb_test.cc | |
| parent | 2a7b84ba85caa95f6bdb9ad5be3f93b2c742d366 (diff) | |
assembler_thumb_test: use 'objdump -D -M force-thumb' to disassemble.
Newer version of objcopy cannot strip '$d' from an object file, as it is
implicitly marked as 'precious'. This is intentional, introduced in the
upstream binutils repository by this commit:
- https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=fca2a38fdb391f810e309a12d5279047d4edac34
Since stripping of '$d' was being done only so we can disassemble
the object file with 'objdump -d', switch to using 'objdump -D -M
force-thumb' to force disassembly as thumb instructions.
Bug: None
Test: m test-art-host-gtest-assembler_thumb_test
Change-Id: I815f9f3a7949bdc49d872c9b726c87b3199b66ca
Diffstat (limited to 'compiler/utils/assembler_thumb_test.cc')
| -rw-r--r-- | compiler/utils/assembler_thumb_test.cc | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/compiler/utils/assembler_thumb_test.cc b/compiler/utils/assembler_thumb_test.cc index e51b622b81..4dbe71b8c7 100644 --- a/compiler/utils/assembler_thumb_test.cc +++ b/compiler/utils/assembler_thumb_test.cc @@ -126,15 +126,8 @@ void DumpAndCheck(std::vector<uint8_t>& code, const char* testname, const char* int cmd_result = system(cmd); ASSERT_EQ(cmd_result, 0) << strerror(errno); - // Remove the $d symbols to prevent the disassembler dumping the instructions - // as .word - snprintf(cmd, sizeof(cmd), "%sobjcopy -N '$d' %s.o %s.oo", toolsdir.c_str(), filename, filename); - int cmd_result2 = system(cmd); - ASSERT_EQ(cmd_result2, 0) << strerror(errno); - // Disassemble. - - snprintf(cmd, sizeof(cmd), "%sobjdump -d %s.oo | grep '^ *[0-9a-f][0-9a-f]*:'", + snprintf(cmd, sizeof(cmd), "%sobjdump -D -M force-thumb --section=.text %s.o | grep '^ *[0-9a-f][0-9a-f]*:'", toolsdir.c_str(), filename); if (kPrintResults) { // Print the results only, don't check. This is used to generate new output for inserting @@ -169,9 +162,6 @@ void DumpAndCheck(std::vector<uint8_t>& code, const char* testname, const char* char buf[FILENAME_MAX]; snprintf(buf, sizeof(buf), "%s.o", filename); unlink(buf); - - snprintf(buf, sizeof(buf), "%s.oo", filename); - unlink(buf); #endif // ART_TARGET_ANDROID } |