Merge tag 'writeback' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux
[pandora-kernel.git] / scripts / recordmcount.c
index 0e18975..ee52cb8 100644 (file)
@@ -335,6 +335,7 @@ do_file(char const *const fname)
                reltype = R_386_32;
                make_nop = make_nop_x86;
                ideal_nop = ideal_nop5_x86_32;
+               mcount_adjust_32 = -1;
                break;
        case EM_ARM:     reltype = R_ARM_ABS32;
                         altmcount = "__gnu_mcount_nc";
@@ -350,6 +351,7 @@ do_file(char const *const fname)
                make_nop = make_nop_x86;
                ideal_nop = ideal_nop5_x86_64;
                reltype = R_X86_64_64;
+               mcount_adjust_64 = -1;
                break;
        }  /* end switch */
 
@@ -366,8 +368,10 @@ do_file(char const *const fname)
                                "unrecognized ET_REL file: %s\n", fname);
                        fail_file();
                }
-               if (w2(ehdr->e_machine) == EM_S390)
+               if (w2(ehdr->e_machine) == EM_S390) {
                        reltype = R_390_32;
+                       mcount_adjust_32 = -4;
+               }
                if (w2(ehdr->e_machine) == EM_MIPS) {
                        reltype = R_MIPS_32;
                        is_fake_mcount32 = MIPS32_is_fake_mcount;
@@ -382,8 +386,10 @@ do_file(char const *const fname)
                                "unrecognized ET_REL file: %s\n", fname);
                        fail_file();
                }
-               if (w2(ghdr->e_machine) == EM_S390)
+               if (w2(ghdr->e_machine) == EM_S390) {
                        reltype = R_390_64;
+                       mcount_adjust_64 = -8;
+               }
                if (w2(ghdr->e_machine) == EM_MIPS) {
                        reltype = R_MIPS_64;
                        Elf64_r_sym = MIPS64_r_sym;