ASoC: rockchip: spdif: drop owner assignment from platform_drivers
[firefly-linux-kernel-4.4.55.git] / scripts / recordmcount.h
index f40a6af6bf40068f2a074bf6bff86d68b2a05440..49b582a225b0bc320f4447a9c53c11330bb062af 100644 (file)
@@ -163,11 +163,11 @@ static int mcount_adjust = 0;
 
 static int MIPS_is_fake_mcount(Elf_Rel const *rp)
 {
-       static Elf_Addr old_r_offset;
+       static Elf_Addr old_r_offset = ~(Elf_Addr)0;
        Elf_Addr current_r_offset = _w(rp->r_offset);
        int is_fake;
 
-       is_fake = old_r_offset &&
+       is_fake = (old_r_offset != ~(Elf_Addr)0) &&
                (current_r_offset - old_r_offset == MIPS_FAKEMCOUNT_OFFSET);
        old_r_offset = current_r_offset;
 
@@ -261,11 +261,13 @@ static unsigned get_mcountsym(Elf_Sym const *const sym0,
                &sym0[Elf_r_sym(relp)];
        char const *symname = &str0[w(symp->st_name)];
        char const *mcount = gpfx == '_' ? "_mcount" : "mcount";
+       char const *fentry = "__fentry__";
 
        if (symname[0] == '.')
                ++symname;  /* ppc64 hack */
        if (strcmp(mcount, symname) == 0 ||
-           (altmcount && strcmp(altmcount, symname) == 0))
+           (altmcount && strcmp(altmcount, symname) == 0) ||
+           (strcmp(fentry, symname) == 0))
                mcountsym = Elf_r_sym(relp);
 
        return mcountsym;
@@ -462,7 +464,7 @@ __has_rel_mcount(Elf_Shdr const *const relhdr,  /* is SHT_REL or SHT_RELA */
                succeed_file();
        }
        if (w(txthdr->sh_type) != SHT_PROGBITS ||
-           !(w(txthdr->sh_flags) & SHF_EXECINSTR))
+           !(_w(txthdr->sh_flags) & SHF_EXECINSTR))
                return NULL;
        return txtname;
 }