--- ./gdb/xcoffread.c_orig	2013-01-17 14:07:46 +0500
+++ ./gdb/xcoffread.c	2013-01-17 14:17:23 +0500
@@ -1006,7 +1006,7 @@
   unsigned int max_symnum;
   int just_started = 1;
   int depth = 0;
-  int fcn_start_addr = 0;
+  file_ptr fcn_start_addr = 0;
 
   struct coff_symbol fcn_stab_saved = { 0 };
 
@@ -1128,8 +1128,7 @@
 	  /* Done with all files, everything from here on is globals.  */
 	}
 
-      if ((cs->c_sclass == C_EXT || cs->c_sclass == C_HIDEXT)
-	  && cs->c_naux == 1)
+      if ((cs->c_sclass == C_EXT || cs->c_sclass == C_HIDEXT))
 	{
 	  /* Dealing with a symbol with a csect entry.  */
 
@@ -1140,8 +1139,25 @@
 #define	CSECT_SCLAS(PP) (CSECT(PP).x_smclas)
 
 	  /* Convert the auxent to something we can access.  */
-	  bfd_coff_swap_aux_in (abfd, raw_auxptr, cs->c_type, cs->c_sclass,
-				0, cs->c_naux, &main_aux);
+             /* xcoff can have more than 1 auxent */
+             if (cs->c_naux > 1)
+		{
+		  if (ISFCN (cs->c_type) && cs->c_sclass != C_TPDEF)
+		   {
+		    bfd_coff_swap_aux_in (abfd, raw_auxptr, cs->c_type, cs->c_sclass,
+		    0, cs->c_naux, &main_aux);
+		    goto function_entry_point;
+		   }
+	     else
+		  bfd_coff_swap_aux_in (abfd,
+					 raw_auxptr + ((coff_data (abfd)->local_symesz) * (cs->c_naux - 1)),
+					 cs->c_type, cs->c_sclass, cs->c_naux - 1, cs->c_naux, &main_aux);
+		}
+             else if (cs->c_naux == 1)
+	          bfd_coff_swap_aux_in (abfd, raw_auxptr, cs->c_type, cs->c_sclass,
+				        0, cs->c_naux, &main_aux);
+             else
+                continue ;
 
 	  switch (CSECT_SMTYP (&main_aux))
 	    {
