Date: Wed, 11 Feb 2015 19:53:45 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278593 - head/contrib/elftoolchain/libdwarf Message-ID: <201502111953.t1BJrjXU086425@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Wed Feb 11 19:53:44 2015 New Revision: 278593 URL: https://svnweb.freebsd.org/changeset/base/278593 Log: libdwarf: Add symbol value when processing .rela relocations Reviewed by: kib, rpaulo Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1826 Modified: head/contrib/elftoolchain/libdwarf/libdwarf_elf_init.c Modified: head/contrib/elftoolchain/libdwarf/libdwarf_elf_init.c ============================================================================== --- head/contrib/elftoolchain/libdwarf/libdwarf_elf_init.c Wed Feb 11 19:07:05 2015 (r278592) +++ head/contrib/elftoolchain/libdwarf/libdwarf_elf_init.c Wed Feb 11 19:53:44 2015 (r278593) @@ -70,11 +70,15 @@ _dwarf_elf_apply_reloc(Dwarf_Debug dbg, offset = rela.r_offset; size = _dwarf_get_reloc_size(dbg, type); + if (size == 0) + continue; /* Unknown or non-absolute relocation. */ if (endian == ELFDATA2MSB) - _dwarf_write_msb(buf, &offset, rela.r_addend, size); + _dwarf_write_msb(buf, &offset, + sym.st_value + rela.r_addend, size); else - _dwarf_write_lsb(buf, &offset, rela.r_addend, size); + _dwarf_write_lsb(buf, &offset, + sym.st_value + rela.r_addend, size); } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502111953.t1BJrjXU086425>