having problems with my code in BFD

Jonathan Wilson jonwil@tpgi.com.au
Tue Oct 14 02:26:00 GMT 2003


> Hmmm, for some reason _bfd_XXi_swap_aouthdr_out() appears to zero out
> the DataDirectory entries, then fill them again in.  Peculiar.  Makes
> one wonder what _bfd_XXi_final_link_postscript() is for.
ok, can someone show me	how to take the code here:
   h1 = coff_link_hash_lookup (coff_hash_table (info),
			      "__tls_used", FALSE, FALSE, TRUE);
   if (h1 != NULL)
     {
       pe_data (abfd)->pe_opthdr.DataDirectory[9].VirtualAddress =
	  (h1->root.u.def.value
	   + h1->root.u.def.section->output_section->vma
	   + h1->root.u.def.section->output_offset);
       pe_data (abfd)->pe_opthdr.DataDirectory[9].Size = 0x18;
	  printf("va %lx sz %lx\n",pe_data 
(abfd)->pe_opthdr.DataDirectory[9].VirtualAddress,pe_data 
(abfd)->pe_opthdr.DataDirectory[9].Size);
     }
and put it in _bfd_XXi_swap_aouthdr_out()?
Or how to do whatever is needed to make this code work properly?



More information about the Binutils mailing list