aboutsummaryrefslogtreecommitdiff
path: root/lib/libelf/elf_strptr.c
diff options
context:
space:
mode:
authorJohn Birrell <jb@FreeBSD.org>2008-05-23 07:35:36 +0000
committerJohn Birrell <jb@FreeBSD.org>2008-05-23 07:35:36 +0000
commit9445f413ee33ffb38a56a1c1299aadbf0f69655a (patch)
tree746e0c712b03d99b61daf2b1c91b91b84c787d99 /lib/libelf/elf_strptr.c
parent7d15d0a9c6699b3f05db9f93fcfbaae7722f0578 (diff)
downloadsrc-9445f413ee33ffb38a56a1c1299aadbf0f69655a.tar.gz
src-9445f413ee33ffb38a56a1c1299aadbf0f69655a.zip
Relax the strict type check because gcc as distributed doesn't create
debug strtabs with type SHT_STRTAB. Although we could change FreeBSD's gcc, we really need to play nicely with gcc as distributed by the FSF.
Notes
Notes: svn path=/head/; revision=179241
Diffstat (limited to 'lib/libelf/elf_strptr.c')
-rw-r--r--lib/libelf/elf_strptr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libelf/elf_strptr.c b/lib/libelf/elf_strptr.c
index 04cc6240e21e..e137622a45ca 100644
--- a/lib/libelf/elf_strptr.c
+++ b/lib/libelf/elf_strptr.c
@@ -55,7 +55,7 @@ elf_strptr(Elf *e, size_t scndx, size_t offset)
gelf_getshdr(s, &shdr) == NULL)
return (NULL);
- if (shdr.sh_type != SHT_STRTAB ||
+ if (/*shdr.sh_type != SHT_STRTAB || */
offset >= shdr.sh_size) {
LIBELF_SET_ERROR(ARGUMENT, 0);
return (NULL);