This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB 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]

Re: [RFA] rs6000-tdep.c: figure out e500 machine from bfd.


Kevin Buettner writes:
 > On Aug 20,  6:36pm, Elena Zannoni wrote:
 > 
 > > +  /* For e500 executables, the apuinfo section is of help here.  */
 > > +  if (info.abfd)
 > > +    {
 > > +      sect = bfd_get_section_by_name (info.abfd, ".PPC.EMB.apuinfo");
 > > +      if (sect)
 > 
 > What is the apuinfo section?  If you know what it's about (I sure
 > don't), consider expanding the comment somewhat.
 > 

Yes, sorry (I have been playing around with this code for too long,
obviously). It is a section that contains the version numbers of the
various Application Processing Units that the processor contains.  So
that one can detect what version/type of processor you need to run the
code on. For instance if the APU info says you need version 3 you know
that the code won't run on version 2. Because there may be new
instructions, etc. I think this info could in theory be used by the
linker, but I am not sure it is used right now.  Gas keeps track of
the rev number associated with each instruction, and then outputs (in
the apuinfo section) the highest it has found. Right now, though, it
doesn't do that. It just spews out a 1.

 > Is there any chance that this section could appear in non-e500
 > executables?  If so, make a note of this gotcha in the comment too.
 > 

No. Only e500.

 > Otherwise, fine.  Go ahead and commit it after expanding the comment
 > as necessary.
 > 

OK. Done.

 > Kevin


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