bug-gnu-utils
[Top][All Lists]
Advanced

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

sparc-lp64: stab section entsize wrong


From: Marco Walther
Subject: sparc-lp64: stab section entsize wrong
Date: Thu, 27 Jun 2002 15:15:22 -0700

Hi,

the subject says it all.  Gas out of binutils-2.12.1 produces an
sh_entsize of 0x14 for the .stab section when building a 64bit object.
But the stab entries are still 12 (0x0c) bytes long even for 64bit
objects.

The following patch is my fix for that problem. (It might be wrong for
other architectures as well?):

Thanks,
-- Marco

---------------------------------------------------------------------------
--- binutils-2.12.1/bfd/elf.c.orig      Thu May  9 07:48:54 2002
+++ binutils-2.12.1/bfd/elf.c   Thu Jun 27 15:07:44 2002
@@ -2547,8 +2547,17 @@
                  elf_section_data (s)->this_hdr.sh_link = d->this_idx;
 
                  /* This is a .stab section.  */
-                 elf_section_data (s)->this_hdr.sh_entsize =
-                   4 + 2 * bfd_get_arch_size (abfd) / 8;
+                 if (bfd_mach_sparc_v9_p(bfd_get_arch(abfd)))
+                   {
+                               /* MARCO: stabs are always 12bytes
+                                  long for now. */
+                     elf_section_data (s)->this_hdr.sh_entsize = 12;
+                   }
+                 else
+                   {
+                     elf_section_data (s)->this_hdr.sh_entsize =
+                       4 + 2 * bfd_get_arch_size (abfd) / 8;
+                   }
                }
            }
          break;

-- 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]