This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC/PATCH] Setting BSF_FUNCTION in ecoff


Jason Eckhardt wrote:
>
>I'm working on a binary analyzer which needs to collect
>information about procedures.  The tool currently relies on
>checking bfd's BSF_FUNCTION symbol flag to locate these function
>symbols.  This seems to work well for every flavor of ELF I've
>tried.
>
>However, for COFF on Alpha (specifically, ecoff-littlealpha),
>function symbols do not have BSF_FUNCTION set.  Is this a
>known defect in the ecoff-littlealpha back-end?  Or is this
>the expected behavior of all COFF back-ends?  If it is the
>expected behavior, is there a simple and reliable way of
>having bfd inform me that a symbol in COFF is a function
>symbol?
>

  Following myself up:

  In other words, would a naive patch such as the following cause
  nuclear holocaust, hell-fire and damnation: (it does what I want,
  but no doubt it affects many others -- perhaps negatively).



*** orig.ecoff.c	Tue Jun 11 13:29:32 2002
--- ecoff.c	Tue Jun 11 13:44:21 2002
*************** ecoff_set_symbol_info (abfd, ecoff_sym,
*** 727,732 ****
--- 727,736 ----
  	  || ECOFF_IS_STAB (ecoff_sym))
  	asym->flags |= BSF_DEBUGGING;
      }
+
+   if (ecoff_sym->st == stProc || ecoff_sym->st == stStaticProc)
+     asym->flags |= BSF_FUNCTION;
+
    switch (ecoff_sym->sc)
      {
      case scNil:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]