Skip to content

Commit faedc38

Browse files
bwendlingmpe
authored andcommitted
powerpc/64s: allow for clang's objdump differences
Clang's objdump emits slightly different output from GNU's objdump, causing a list of warnings to be emitted during relocatable builds. E.g., clang's objdump emits this: c000000000000004: 2c 00 00 48 b 0xc000000000000030 ... c000000000005c6c: 10 00 82 40 bf 2, 0xc000000000005c7c while GNU objdump emits: c000000000000004: 2c 00 00 48 b c000000000000030 <__start+0x30> ... c000000000005c6c: 10 00 82 40 bne c000000000005c7c <masked_interrupt+0x3c> Adjust llvm-objdump's output to remove the extraneous '0x' and convert 'bf' and 'bt' to 'bne' and 'beq' resp. to more closely match GNU objdump's output. Note that clang's objdump doesn't yet output the relocation symbols on PPC. Signed-off-by: Bill Wendling <morbo@google.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/191c67db31264b69cf6b566fd69851beb3dd0abb.1595630874.git.morbo@google.com
1 parent 49a7d46 commit faedc38

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎arch/powerpc/tools/unrel_branch_check.sh‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ grep -e "^c[0-9a-f]*:[[:space:]]*\([0-9a-f][0-9a-f][[:space:]]\)\{4\}[[:space:]]
3131
grep -v '\<__start_initialization_multiplatform>' |
3232
grep -v -e 'b.\?.\?ctr' |
3333
grep -v -e 'b.\?.\?lr' |
34-
sed 's/://' |
34+
sed -e 's/\bbt.\?[[:space:]]*[[:digit:]][[:digit:]]*,/beq/' \
35+
-e 's/\bbf.\?[[:space:]]*[[:digit:]][[:digit:]]*,/bne/' \
36+
-e 's/[[:space:]]0x/ /' \
37+
-e 's/://' |
3538
awk '{ print $1 ":" $6 ":0x" $7 ":" $8 " "}'
3639
)
3740

0 commit comments

Comments
 (0)