[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[committed] Fix verify_sections assert on MIPS



Hi,

The commit 3b335ec "Handle .bss at same offset as .debug_pubnames" introduces
an expression "sh_type & SHT_NOBITS" to test for a NOBITS section, which
should be "sh_type == SHT_NOBITS".  Fix it.

Committed to trunk.

Thanks,
- Tom

Fix verify_sections assert on MIPS

2019-07-10  Tom de Vries  <tdevries@suse.de>

	PR dwz/24783
	* dwz.c (write_dso): Test for NOBITS section using
	"sh_type == SHT_NOBITS".

---
 dwz.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dwz.c b/dwz.c
index 13f67f2..7f6db58 100644
--- a/dwz.c
+++ b/dwz.c
@@ -10691,7 +10691,7 @@ write_dso (DSO *dso, const char *file, struct stat *st)
 		       && (dso->shdr[j].sh_offset < min_shoff
 			   || (dso->shdr[j].sh_offset == min_shoff
 			       && (dso->shdr[j].sh_size == 0
-				   || dso->shdr[j].sh_type & SHT_NOBITS))))
+				   || dso->shdr[j].sh_type == SHT_NOBITS))))
 		continue;
 	      else if ((dso->shdr[j].sh_flags & SHF_ALLOC) != 0)
 		{