reloc_vector = (arelent **) malloc ((size_t) reloc_size);
reloc_vector = (arelent **) bfd_malloc ((size_t) reloc_size);
bfd_generic_get_relocated_section_contents (abfd, link_info, link_order, data,					    relocateable, symbols)     bfd *abfd;     struct bfd_link_info *link_info;     struct bfd_link_order *link_order;     bfd_byte *data;     boolean relocateable;     asymbol **symbols;{  /* Get enough memory to hold the stuff */  bfd *input_bfd = link_order->u.indirect.section->owner;  asection *input_section = link_order->u.indirect.section;  long reloc_size = bfd_get_reloc_upper_bound (input_bfd, input_section);  arelent **reloc_vector = NULL;  long reloc_count;  if (reloc_size < 0)    goto error_return;  reloc_vector = (arelent **) malloc ((size_t) reloc_size);  if (reloc_vector == NULL && reloc_size != 0)    {      bfd_set_error (bfd_error_no_memory);      goto error_return;    }  /* read in the section */  if (!bfd_get_section_contents (input_bfd,				 input_section,				 (PTR) data,				 0,				 input_section->_raw_size))    goto error_return;  /* We're not relaxing the section, so just copy the size info */  input_section->_cooked_size = input_section->_raw_size;  input_section->reloc_done = true;  reloc_count = bfd_canonicalize_reloc (input_bfd,					input_section,					reloc_vector,					symbols);  if (reloc_count < 0)    goto error_return;  if (reloc_count > 0)    {      arelent **parent;      for (parent = reloc_vector; *parent != (arelent *) NULL;	   parent++)	{	  char *error_message = (char *) NULL;	  bfd_reloc_status_type r =	    bfd_perform_relocation (input_bfd,				    *parent,				    (PTR) data,				    input_section,				    relocateable ? abfd : (bfd *) NULL,				    &error_message);	  if (relocateable)	    {	      asection *os = input_section->output_section;	      /* A partial link, so keep the relocs */	      os->orelocation[os->reloc_count] = *parent;	      os->reloc_count++;	    }	  if (r != bfd_reloc_ok)	    {	      switch (r)		{		case bfd_reloc_undefined:		  if (!((*link_info->callbacks->undefined_symbol)			(link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr),			 input_bfd, input_section, (*parent)->address)))		    goto error_return;		  break;		case bfd_reloc_dangerous:		  BFD_ASSERT (error_message != (char *) NULL);		  if (!((*link_info->callbacks->reloc_dangerous)			(link_info, error_message, input_bfd, input_section,			 (*parent)->address)))		    goto error_return;		  break;		case bfd_reloc_overflow:		  if (!((*link_info->callbacks->reloc_overflow)			(link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr),			 (*parent)->howto->name, (*parent)->addend,			 input_bfd, input_section, (*parent)->address)))		    goto error_return;		  break;		case bfd_reloc_outofrange:		default:		  abort ();		  break;		}	    }	}    }  if (reloc_vector != NULL)    free (reloc_vector);  return data;error_return:  if (reloc_vector != NULL)    free (reloc_vector);  return NULL;}