X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=scripts%2Frecordmcount.h;h=baf187bee983c33b6323cfea1b8591ca963fc934;hb=31edf274f9aff1ccd39934a0b2fce38f4405c656;hp=58e933a20544a2cd379446661d01f3755494bf97;hpb=ac61d143ffe2a6db4d4bcf47c21a5159d6a1b644;p=karo-tx-linux.git diff --git a/scripts/recordmcount.h b/scripts/recordmcount.h index 58e933a20544..baf187bee983 100644 --- a/scripts/recordmcount.h +++ b/scripts/recordmcount.h @@ -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); }