]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - scripts/recordmcount.h
recordmcount: Fix spurious mcount entries on powerpc
[mirror_ubuntu-bionic-kernel.git] / scripts / recordmcount.h
index b9897e2be404d24735068f584831c51ef90efccd..04151ede8043df8ccd5607102ac8f078d1eb0347 100644 (file)
@@ -326,7 +326,8 @@ static uint_t *sift_rel_mcount(uint_t *mlocp,
                if (!mcountsym)
                        mcountsym = get_mcountsym(sym0, relp, str0);
 
-               if (mcountsym == Elf_r_sym(relp) && !is_fake_mcount(relp)) {
+               if (mcountsym && mcountsym == Elf_r_sym(relp) &&
+                               !is_fake_mcount(relp)) {
                        uint_t const addend =
                                _w(_w(relp->r_offset) - recval + mcount_adjust);
                        mrelp->r_offset = _w(offbase