1999-09-11 Donn Terry <donn@interix.com>
authorIan Lance Taylor <ian@airs.com>
Sun, 12 Sep 1999 00:02:11 +0000 (00:02 +0000)
committerIan Lance Taylor <ian@airs.com>
Sun, 12 Sep 1999 00:02:11 +0000 (00:02 +0000)
* libpei.h (_bfd_pe_bfd_get_symbol_info): Declare.
* peigen.c (_bfd_pe_bfd_get_symbol_info): New function.
* peicode.h (coff_get_symbol_info): Define.

bfd/ChangeLog
bfd/libpei.h
bfd/peicode.h
bfd/peigen.c

index 6a295e1087a463d3062ffaff9bb72f526d6939d4..ae92bcea79a784671824a8a0ab2413f90983229e 100644 (file)
@@ -7,6 +7,10 @@
 
 1999-09-11  Donn Terry  <donn@interix.com>
 
+       * libpei.h (_bfd_pe_bfd_get_symbol_info): Declare.
+       * peigen.c (_bfd_pe_bfd_get_symbol_info): New function.
+       * peicode.h (coff_get_symbol_info): Define.
+
        * config.bfd (i[3456]86-*-interix*): Set targ_cflags to
        -DSTRICT_PE_FORMAT.
        * coffcode.h (styp_to_sec_flags): Check STRICT_PE_FORMAT rather
index 8af543ae07f8edb6c2d8dbcf2aea3538319b6ba5..942aa788ad98f578187aea127839ec1d43dcb117 100644 (file)
@@ -234,7 +234,9 @@ unsigned int _bfd_pei_swap_scnhdr_out PARAMS ((bfd *, PTR, PTR));
 
 boolean _bfd_pe_print_private_bfd_data_common PARAMS ((bfd *, PTR));
 
-boolean _bfd_pe_bfd_copy_private_bfd_data_common PARAMS ((bfd*, bfd*));
+boolean _bfd_pe_bfd_copy_private_bfd_data_common PARAMS ((bfd *, bfd *));
+
+void _bfd_pe_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
 
 /* The following are needed only for ONE of pe or pei, but don't
    otherwise vary; peicode.h fixes up ifdefs but we provide the
index aac50cfa80ea42184aab065854ec48918c0216d8..605b1c0192f1dfa7487514f930ced4b999407eb6 100644 (file)
@@ -347,3 +347,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
index f959e148746fe62df655cb4a0067ab483ecfef7c..8d623bd87e7a9febf918d9d63f8c22d4761012b5 100644 (file)
@@ -1808,3 +1808,18 @@ _bfd_pe_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
 
   return true;
 }
+
+void
+_bfd_pe_get_symbol_info (abfd, symbol, ret)
+     bfd *abfd;
+     asymbol *symbol;
+     symbol_info *ret;
+{
+  coff_get_symbol_info (abfd, symbol, ret);
+
+  if (pe_data (abfd) != NULL
+      && ((symbol->flags & BSF_DEBUGGING) == 0
+         || (symbol->flags & BSF_DEBUGGING_RELOC) != 0)
+      && ! bfd_is_abs_section (symbol->section))
+    ret->value += pe_data (abfd)->pe_opthdr.ImageBase;
+}