From 82ed3e6d662f6a8c6918b6d42a5f4994cfb2d25c Mon Sep 17 00:00:00 2001 From: jb Date: Fri, 23 May 2008 07:35:36 +0000 Subject: 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. --- lib/libelf/elf_strptr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libelf') diff --git a/lib/libelf/elf_strptr.c b/lib/libelf/elf_strptr.c index 04cc624..e137622 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); -- cgit v1.1