summaryrefslogtreecommitdiffstats
path: root/contrib/elftoolchain/libdwarf/dwarf_reloc.c
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2015-02-12 02:08:44 +0000
committeremaste <emaste@FreeBSD.org>2015-02-12 02:08:44 +0000
commit2b789577d72ca58b39cc94f51ca9a6d89b0b6b45 (patch)
tree9bfa2ade0df06ecd68a11b3b8d357478900a5e92 /contrib/elftoolchain/libdwarf/dwarf_reloc.c
parent4bd760cd4d715b070e9075747ac4d2b624b94458 (diff)
downloadFreeBSD-src-2b789577d72ca58b39cc94f51ca9a6d89b0b6b45.zip
FreeBSD-src-2b789577d72ca58b39cc94f51ca9a6d89b0b6b45.tar.gz
libdwarf: Handle .rel relocations
Some architectures use .rel relocations (for debug data), so they must be handled. This was discovered from ctfconvert on ARM object files. The lack of relocation handling caused all string lookups to return the string at offset 0 in .debug_str, typically "FreeBSD clang version ..." Reviewed by: gnn, imp, rpaulo (earlier version) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1819
Diffstat (limited to 'contrib/elftoolchain/libdwarf/dwarf_reloc.c')
-rw-r--r--contrib/elftoolchain/libdwarf/dwarf_reloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/elftoolchain/libdwarf/dwarf_reloc.c b/contrib/elftoolchain/libdwarf/dwarf_reloc.c
index 5e96db3..c912f27 100644
--- a/contrib/elftoolchain/libdwarf/dwarf_reloc.c
+++ b/contrib/elftoolchain/libdwarf/dwarf_reloc.c
@@ -33,8 +33,8 @@ dwarf_set_reloc_application(int apply)
{
int oldapply;
- oldapply = _libdwarf.applyrela;
- _libdwarf.applyrela = apply;
+ oldapply = _libdwarf.applyreloc;
+ _libdwarf.applyreloc = apply;
return (oldapply);
}
OpenPOWER on IntegriCloud