sigh, make this right for good.
This commit is contained in:
parent
5cb99c3bb2
commit
31846d4050
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-bfd_elf_c,v 1.1 2002/04/30 18:15:55 fgsch Exp $
|
||||
$OpenBSD: patch-bfd_elf_c,v 1.2 2002/05/04 08:31:19 fgsch Exp $
|
||||
--- bfd/elf.c.orig Tue Apr 30 06:24:34 2002
|
||||
+++ bfd/elf.c Tue Apr 30 06:25:29 2002
|
||||
@@ -4535,7 +4535,9 @@ _bfd_elf_get_symtab_upper_bound (abfd)
|
||||
@ -7,7 +7,7 @@ $OpenBSD: patch-bfd_elf_c,v 1.1 2002/04/30 18:15:55 fgsch Exp $
|
||||
symcount = hdr->sh_size / get_elf_backend_data (abfd)->s->sizeof_sym;
|
||||
- symtab_size = (symcount - 1 + 1) * (sizeof (asymbol *));
|
||||
+ symtab_size = (symcount + 1) * (sizeof (asymbol *));
|
||||
+ if (symtab_size > 0)
|
||||
+ if (symcount > 0)
|
||||
+ symtab_size -= sizeof (asymbol *);
|
||||
|
||||
return symtab_size;
|
||||
@ -18,7 +18,7 @@ $OpenBSD: patch-bfd_elf_c,v 1.1 2002/04/30 18:15:55 fgsch Exp $
|
||||
symcount = hdr->sh_size / get_elf_backend_data (abfd)->s->sizeof_sym;
|
||||
- symtab_size = (symcount - 1 + 1) * (sizeof (asymbol *));
|
||||
+ symtab_size = (symcount + 1) * (sizeof (asymbol *));
|
||||
+ if (symtab_size > 0)
|
||||
+ if (symcount > 0)
|
||||
+ symtab_size -= sizeof (asymbol *);
|
||||
|
||||
return symtab_size;
|
||||
|
Loading…
Reference in New Issue
Block a user