Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Oct 2018 13:49:43 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 232176] elftoolchain elfcopy/strip incorrectly strips relocations
Message-ID:  <bug-232176-227-Ntvu4ODs1m@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-232176-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-232176-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D232176

--- Comment #2 from Ed Maste <emaste@freebsd.org> ---
In fact it's even worse; from filter_reloc():

        for(i =3D 0; (uint64_t)i < n; i++) {
                if (s->type =3D=3D SHT_REL) {
                        if (gelf_getrel(id, i, &rel) !=3D &rel)
                                errx(EXIT_FAILURE, "gelf_getrel failed: %s",
                                    elf_errmsg(-1));
                } else {
                        if (gelf_getrela(id, i, &rela) !=3D &rela)
                                errx(EXIT_FAILURE, "gelf_getrel failed: %s",
                                    elf_errmsg(-1));
                }
                name =3D elf_strptr(ecp->ein, elf_ndxscn(ecp->strtab->is),
                    GELF_R_SYM(rel.r_info));

rel.r_info is uninitialized if s->type =3D=3D SHT_RELA.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-232176-227-Ntvu4ODs1m>