This is the mail archive of the gas2@sourceware.cygnus.com mailing list for the gas2 project.


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

Re: gas - MIPS/ELF/DWARF probs


   Date: Tue, 14 Feb 95 15:21:55 -0800
   From: gary@Intrepid.COM (Gary Funck)

   OK -- thanks.  Just to clarify: it is considered OK for a tc-targ.c
   routine to call an obj-format.c routine when processing these
   pseudo-ops?

IMHO, yes.

   Related question: if this is the proper way to handle things, has
   this problem already come up in a different ELF/DWARF port?
   Is there a port (ie, Solaris) that already handles such things
   properly, that I might use as a reference?

Sure.  The MIPS port, itself, already overrides the ELF .section
directive.  It does MIPS specific stuff, and calls obj_elf_section.
Look at the end of md_pseudo_table in tc-mips.c (this may have been
added since the 2.5.2 release--if you don't know about the developer
snapshots for gas/binutils, ask me).

   Looks like I inadvertently specified "-c -p0", where the 0 is interpreted
   as the number of lines of context (none) in this case.  I'll stick
   with -c -p next time.  The patches _with_ context are shown below.

Thanks.

   By the way, it seems that suggested fix of handling .#byte and .previous
   in tc-mips.c will fix the assertion failure in mips_align(), but
   this still leaves the question open (at least for me) as to the
   best way to fix the handling of:

	   .section        .debug
   .L_D193:
	   .4byte  .L_D193_e-.L_D193
	   .2byte  0x14
	   .2byte  0x12
	   .4byte  .L_D198
	   .2byte  0x38
	   .asciiz "_i_Object__free"
	   .2byte  0x83
	   .2byte  .L_t193_e-.L_t193
   .L_t193:

   Do the patches to md_apply_fix() below, look like the way to go?

Yes, I believe that something along the lines of your patches is
correct.  Particularly if it works.

Ian