Date: Mon, 17 Feb 2014 14:52:07 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262061 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/common Message-ID: <201402171452.s1HEq7h4096210@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Mon Feb 17 14:52:06 2014 New Revision: 262061 URL: http://svnweb.freebsd.org/changeset/base/262061 Log: MFC r260051: When clearing relocations to __dtrace* symbols, handle both SHT_REL and SHT_RELA sections properly instead of assuming that the relocation section is of type SHT_REL. Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Mon Feb 17 14:51:02 2014 (r262060) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Mon Feb 17 14:52:06 2014 (r262061) @@ -1539,10 +1539,17 @@ process_obj(dtrace_hdl_t *dtp, const cha * the executable file as the symbol is going to be * change from UND to ABS. */ - rela.r_offset = 0; - rela.r_info = 0; - rela.r_addend = 0; - (void) gelf_update_rela(data_rel, i, &rela); + if (shdr_rel.sh_type == SHT_RELA) { + rela.r_offset = 0; + rela.r_info = 0; + rela.r_addend = 0; + (void) gelf_update_rela(data_rel, i, &rela); + } else { + GElf_Rel rel; + rel.r_offset = 0; + rel.r_info = 0; + (void) gelf_update_rel(data_rel, i, &rel); + } #endif mod = 1;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402171452.s1HEq7h4096210>