]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - scripts/recordmcount.h
Merge branches 'ftrace', 'gic', 'io', 'kexec', 'mod', 'sa11x0', 'sh' and 'versatile...
[karo-tx-linux.git] / scripts / recordmcount.h
index 58e933a20544a2cd379446661d01f3755494bf97..baf187bee983c33b6323cfea1b8591ca963fc934 100644 (file)
@@ -119,7 +119,7 @@ static uint_t (*Elf_r_sym)(Elf_Rel const *rp) = fn_ELF_R_SYM;
 
 static void fn_ELF_R_INFO(Elf_Rel *const rp, unsigned sym, unsigned type)
 {
-       rp->r_info = ELF_R_INFO(sym, type);
+       rp->r_info = _w(ELF_R_INFO(sym, type));
 }
 static void (*Elf_r_info)(Elf_Rel *const rp, unsigned sym, unsigned type) = fn_ELF_R_INFO;
 
@@ -275,11 +275,12 @@ static uint_t *sift_rel_mcount(uint_t *mlocp,
                        Elf_Sym const *const symp =
                                &sym0[Elf_r_sym(relp)];
                        char const *symname = &str0[w(symp->st_name)];
+                       char const *mcount = '_' == gpfx ? "_mcount" : "mcount";
 
                        if ('.' == symname[0])
                                ++symname;  /* ppc64 hack */
-                       if (0 == strcmp((('_' == gpfx) ? "_mcount" : "mcount"),
-                                       symname))
+                       if (0 == strcmp(mcount, symname) ||
+                           (altmcount && 0 == strcmp(altmcount, symname)))
                                mcountsym = Elf_r_sym(relp);
                }