[patch] gas, add a fifth type to ".type" directive

Jason Eckhardt jle@cygnus.com
Fri Jul 28 17:10:00 GMT 2000


gas:

This adds a fifth syntax to the ELF ".type" directive: 
e.g.,  .type SYM,"function".

This is used on SVR4/860.

Also added configure bits to recognize i860 (note, the assembler that is
currently there is completely dead and doesn't even build.  I will be doing
a new assembler soon).

Acceptable?



2000-07-28  Jason Eckhardt  <jle@cygnus.com>

	* configure.in: Add bits for i860-stardent-{sysv4, elf}*.
	* configure: Regenerated.
	* config/obj-elf.c (obj_elf_type): Recognize a fifth type
	of operand to the .type directive (.e.g, "type").


Index: gas/configure.in
===================================================================
RCS file: /cvs/src/src/gas/configure.in,v
retrieving revision 1.36
diff -c -3 -p -r1.36 configure.in
*** configure.in	2000/07/20 17:45:27	1.36
--- configure.in	2000/07/29 00:01:23
*************** changequote([,])dnl
*** 265,270 ****
--- 265,273 ----
        i386-*-mingw32*)      fmt=coff em=pe bfd_gas=yes ;;
        i386-*-*nt*)          fmt=coff em=pe bfd_gas=yes ;;
        i386-*-vxworks*)      fmt=aout ;;
+       i860-stardent-sysv4* | i860-stardent-elf*)
+ 			    fmt=elf bfd_gas=yes endian=little
+ 			    AC_MSG_WARN(GAS support for ${generic_target} is preliminary and a work in progress) ;;
        i960-*-bout)          fmt=bout ;;
        i960-*-coff)          fmt=coff em=ic960 ;;
        i960-*-rtems*)        fmt=coff em=ic960 ;;

Index: gas/config/obj-elf.c
===================================================================
RCS file: /cvs/src/src/gas/config/obj-elf.c,v
retrieving revision 1.18
diff -c -3 -p -r1.18 obj-elf.c
*** obj-elf.c	2000/06/19 01:22:40	1.18
--- obj-elf.c	2000/07/29 00:01:26
*************** obj_elf_size (ignore)
*** 1401,1407 ****
  }
  
  /* Handle the ELF .type pseudo-op.  This sets the type of a symbol.
!    There are four syntaxes:
  
     The first (used on Solaris) is
         .type SYM,#function
--- 1401,1407 ----
  }
  
  /* Handle the ELF .type pseudo-op.  This sets the type of a symbol.
!    There are five syntaxes:
  
     The first (used on Solaris) is
         .type SYM,#function
*************** obj_elf_size (ignore)
*** 1411,1416 ****
--- 1411,1418 ----
         .type SYM STT_FUNC
     The fourth (used on NetBSD/Arm and Linux/ARM) is
         .type SYM,%function
+    The fifth (used on SVR4/860) is
+        .type SYM,"function"
     */
  
  static void
*************** obj_elf_type (ignore)
*** 1435,1440 ****
--- 1437,1443 ----
    SKIP_WHITESPACE ();
    if (   *input_line_pointer == '#'
        || *input_line_pointer == '@'
+       || *input_line_pointer == '"'
        || *input_line_pointer == '%')
      ++input_line_pointer;
  
*************** obj_elf_type (ignore)
*** 1452,1457 ****
--- 1455,1463 ----
      as_bad (_("ignoring unrecognized symbol type \"%s\""), typename);
  
    *input_line_pointer = c;
+ 
+   if (*input_line_pointer == '"')
+     ++input_line_pointer;
  
    symbol_get_bfdsym (sym)->flags |= type;
  




More information about the Binutils mailing list