Add arm-epoc-pe specific linker script
[deliverable/binutils-gdb.git] / bfd / peicode.h
index aac50cfa80ea42184aab065854ec48918c0216d8..0b6bde4e44b7b1f4038c95f43bee5ff4f2fae664 100644 (file)
@@ -215,8 +215,20 @@ coff_swap_scnhdr_in (abfd, ext, in)
     GET_SCNHDR_LNNOPTR (abfd, (bfd_byte *) scnhdr_ext->s_lnnoptr);
   scnhdr_int->s_flags = bfd_h_get_32(abfd, (bfd_byte *) scnhdr_ext->s_flags);
 
-  scnhdr_int->s_nreloc = bfd_h_get_16(abfd, (bfd_byte *) scnhdr_ext->s_nreloc);
-  scnhdr_int->s_nlnno = bfd_h_get_16(abfd, (bfd_byte *) scnhdr_ext->s_nlnno);
+  /* MS handles overflow of line numbers by carrying into the reloc
+     field (it appears).  Since it's supposed to be zero for PE
+     *IMAGE* format, that's safe.  This is still a bit iffy.  */
+#ifdef COFF_IMAGE_WITH_PE
+  scnhdr_int->s_nlnno =
+    (bfd_h_get_16 (abfd, (bfd_byte *) scnhdr_ext->s_nlnno)
+     + (bfd_h_get_16 (abfd, (bfd_byte *) scnhdr_ext->s_nreloc) << 16));
+  scnhdr_int->s_nreloc = 0;
+#else
+  scnhdr_int->s_nreloc = bfd_h_get_16 (abfd,
+                                      (bfd_byte *) scnhdr_ext->s_nreloc);
+  scnhdr_int->s_nlnno = bfd_h_get_16 (abfd,
+                                     (bfd_byte *) scnhdr_ext->s_nlnno);
+#endif
 
   if (scnhdr_int->s_vaddr != 0) 
     {
@@ -347,3 +359,5 @@ pe_bfd_copy_private_bfd_data (ibfd, obfd)
 
 #define coff_bfd_copy_private_section_data \
   _bfd_pe_bfd_copy_private_section_data
+
+#define coff_get_symbol_info _bfd_pe_get_symbol_info
This page took 0.023023 seconds and 4 git commands to generate.