tizen: packaging: Add baselibs.conf to provide 64-bit kernel & modules for 32-bit...
[platform/kernel/linux-rpi.git] / scripts / decodecode
index b28fd26..8fe71c2 100755 (executable)
@@ -93,6 +93,11 @@ disas() {
                ${CROSS_COMPILE}strip $t.o
        fi
 
+       if [ "$ARCH" = "riscv" ]; then
+               OBJDUMPFLAGS="-M no-aliases --section=.text -D"
+               ${CROSS_COMPILE}strip $t.o
+       fi
+
        if [ $pc_sub -ne 0 ]; then
                if [ $PC ]; then
                        adj_vma=$(( $PC - $pc_sub ))
@@ -126,8 +131,13 @@ get_substr_opcode_bytes_num()
        do
                substr+="$opc"
 
+               opcode="$substr"
+               if [ "$ARCH" = "riscv" ]; then
+                       opcode=$(echo $opcode | tr ' ' '\n' | tac | tr -d '\n')
+               fi
+
                # return if opcode bytes do not match @opline anymore
-               if ! echo $opline | grep -q "$substr";
+               if ! echo $opline | grep -q "$opcode";
                then
                        break
                fi