From 9445f413ee33ffb38a56a1c1299aadbf0f69655a Mon Sep 17 00:00:00 2001 From: John Birrell Date: Fri, 23 May 2008 07:35:36 +0000 Subject: [PATCH] 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(-) 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);