summaryrefslogtreecommitdiff
path: root/libkmod/libkmod-elf.c
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2011-12-19 21:53:24 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2011-12-19 21:55:27 -0200
commit1c58590549d05c42b12c5414f6fd2689e109c369 (patch)
tree831b30def85576858cc049af0286ee672c28cec4 /libkmod/libkmod-elf.c
parentfc8e58ba4ee54f21d217e6c4de863b227f2dffde (diff)
downloadkmod-1c58590549d05c42b12c5414f6fd2689e109c369.tar.gz
kmod-1c58590549d05c42b12c5414f6fd2689e109c369.tar.bz2
kmod-1c58590549d05c42b12c5414f6fd2689e109c369.zip
elf: skip leading symbol dot in modversion.
Mimics module-init-tools's dump_modversions() that calls skip_dot() to skip leading dots. This is required for PPC64.
Diffstat (limited to 'libkmod/libkmod-elf.c')
-rw-r--r--libkmod/libkmod-elf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libkmod/libkmod-elf.c b/libkmod/libkmod-elf.c
index 7ecf3d1..0d84d9f 100644
--- a/libkmod/libkmod-elf.c
+++ b/libkmod/libkmod-elf.c
@@ -510,6 +510,8 @@ int kmod_elf_get_modversions(const struct kmod_elf *elf, struct kmod_modversion
struct kmod_modversion64 *mv;
symbol = elf_get_mem(elf, off + sizeof(mv->crc));
}
+ if (symbol[0] == '.')
+ symbol++;
slen += strlen(symbol) + 1;
}
@@ -532,6 +534,8 @@ int kmod_elf_get_modversions(const struct kmod_elf *elf, struct kmod_modversion
crc = elf_get_uint(elf, off, sizeof(mv->crc));
symbol = elf_get_mem(elf, off + sizeof(mv->crc));
}
+ if (symbol[0] == '.')
+ symbol++;
a[i].crc = crc;
a[i].symbol = itr;