public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
From: ralphc@pyramid.com (Ralph Campbell)
To: gas2@cygnus.com
Cc: glass@sun-lamp.cs.berkeley.edu
Subject: bug fixes for gas-2.3/binutils-2.4
Date: Tue, 21 Jun 1994 22:23:00 -0000	[thread overview]
Message-ID: <9406220524.AA29248@pyrps5.eng.pyramid.com> (raw)

I have made a few bug fixes for the gas-2.3/binutils-2.4 release for
the "configure mips-dec-bsd" case. Some of these changes are common to
all architectures and some just to mips.

bfd/aoutx.h
	1) minor optimization to ignore debug symbols
	2) fix test for subsections for a.out format
opcodes/mips-dis.c
	This is a major performance boost. Helps when disassembling whole
	programs.
ld/scripttempl/mipsbsd.sc
	minor cleanup.
ld/ldlang.c
	The following command will fail to produce the correct relocation
	table entries.
		"ld -x -r -Ttext 1000 -o t.o t1.o"
	This is because .text has an expression to set the section vma
	but at the end, the test for updating dot is wrong so if the next
	section doesn't have an explicit address expression (or the
	expression is '.') it gets its vma set to the vma of .text.

*** bfd/aoutx.h.old	Thu Apr 21 10:00:44 1994
--- bfd/aoutx.h	Sun Jun 19 23:42:10 1994
***************
*** 3050,3056 ****
        struct bfd_link_hash_entry *h;
  
        /* Ignore symbols that are not externally visible.  */
!       if ((type & N_EXT) == 0)
  	{
  	  if (type == N_WARNING
  	      || type == N_INDR)
--- 3050,3056 ----
        struct bfd_link_hash_entry *h;
  
        /* Ignore symbols that are not externally visible.  */
!       if ((type & N_STAB) || (type & N_EXT) == 0 || type == N_FN)
  	{
  	  if (type == N_WARNING
  	      || type == N_INDR)
***************
*** 3383,3389 ****
        drsize = 0;
        for (sub = info->input_bfds; sub != (bfd *) NULL; sub = sub->link_next)
  	{
! 	  if (bfd_get_flavour (abfd) == bfd_target_aout_flavour)
  	    {
  	      trsize += exec_hdr (sub)->a_trsize;
  	      drsize += exec_hdr (sub)->a_drsize;
--- 3383,3389 ----
        drsize = 0;
        for (sub = info->input_bfds; sub != (bfd *) NULL; sub = sub->link_next)
  	{
! 	  if (bfd_get_flavour (sub) == bfd_target_aout_flavour)
  	    {
  	      trsize += exec_hdr (sub)->a_trsize;
  	      drsize += exec_hdr (sub)->a_drsize;
*** opcodes/mips-dis.c.old	Mon Nov  8 09:40:03 1993
--- opcodes/mips-dis.c	Sun Jun 19 17:02:40 1994
***************
*** 186,215 ****
       struct disassemble_info *info;
       unsigned long int word;
  {
-   register int i;
    register const char *d;
  
!   for (i = 0; i < NUMOPCODES; i++)
      {
!       if (mips_opcodes[i].pinfo != INSN_MACRO)
  	{
! 	  register unsigned int match = mips_opcodes[i].match;
! 	  register unsigned int mask = mips_opcodes[i].mask;
! 	  if ((word & mask) == match)
! 	    break;
! 	}
      }
! 
!   /* Handle undefined instructions.  */
!   if (i == NUMOPCODES)
      {
!       (*info->fprintf_func) (info->stream, "0x%x", word);
!       return 4;
      }
  
!   (*info->fprintf_func) (info->stream, "%s", mips_opcodes[i].name);
  
!   if (!(d = mips_opcodes[i].args))
      return 4;
  
    (*info->fprintf_func) (info->stream, " ");
--- 186,234 ----
       struct disassemble_info *info;
       unsigned long int word;
  {
    register const char *d;
+   register const struct mips_opcode *op;
+   static int init;
+   static const struct mips_opcode *mips_hash[OP_MASK_OP + 1];
  
!   (*info->fprintf_func) (info->stream, "0x%08x ", word);
! 
!   /* Build a hash table to shorten the search time */
!   if (!init)
      {
!       do
  	{
! 	  for (op = mips_opcodes; op < &mips_opcodes[NUMOPCODES]; op++)
! 	    {
! 	      if (op->pinfo == INSN_MACRO)
! 		continue;
! 	      if ((init << OP_SH_OP) == (op->match & (OP_MASK_OP << OP_SH_OP)))
! 		{
! 		  mips_hash[init] = op;
! 		  break;
! 		}
! 	    }
!         }
!       while (++init <= OP_MASK_OP);
      }
!   op = mips_hash[(word >> OP_SH_OP) & OP_MASK_OP];
!   if (op)
      {
!       do
! 	{
! 	  if (op->pinfo != INSN_MACRO && (word & op->mask) == op->match)
! 	    goto fnd;
! 	}
!       while (++op < &mips_opcodes[NUMOPCODES]);
      }
+   /* Handle undefined instructions.  */
+   (*info->fprintf_func) (info->stream, "0x%x", word);
+   return 4;
  
!  fnd:
!   (*info->fprintf_func) (info->stream, "%s", op->name);
  
!   if (!(d = op->args))
      return 4;
  
    (*info->fprintf_func) (info->stream, " ");
*** ld/scripttempl/mipsbsd.sc.old	Thu May  5 17:40:45 1994
--- ld/scripttempl/mipsbsd.sc	Tue Jun 21 22:39:27 1994
***************
*** 11,23 ****
      *(.text)
      ${RELOCATING+etext = ${DATA_ALIGNMENT};}
    }
!   .data  ${RELOCATING+${DATA_ALIGNMENT}} :
    {
      *(.data)
      ${CONSTRUCTING+CONSTRUCTORS}
      ${RELOCATING+edata  =  .;}
    }
!   .bss ${RELOCATING+SIZEOF(.data) + ADDR(.data)} :
    {
     *(.bss)
     *(COMMON)
--- 11,23 ----
      *(.text)
      ${RELOCATING+etext = ${DATA_ALIGNMENT};}
    }
!   .data ${RELOCATING+${DATA_ALIGNMENT}} :
    {
      *(.data)
      ${CONSTRUCTING+CONSTRUCTORS}
      ${RELOCATING+edata  =  .;}
    }
!   .bss :
    {
     *(.bss)
     *(COMMON)
*** ld/ldlang.c.old	Wed May  4 09:13:46 1994
--- ld/ldlang.c	Tue Jun 21 22:37:55 1994
***************
*** 1722,1729 ****
         os->processed = true;
  
         /* Replace into region ? */
!        if (os->addr_tree == (etree_type *) NULL
! 	   && os->region != (lang_memory_region_type *) NULL)
         {
  	 os->region->current = dot;
  	 /* Make sure this isn't silly */
--- 1722,1728 ----
         os->processed = true;
  
         /* Replace into region ? */
!        if (os->region != (lang_memory_region_type *) NULL)
         {
  	 os->region->current = dot;
  	 /* Make sure this isn't silly */


                 reply	other threads:[~1994-06-21 22:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9406220524.AA29248@pyrps5.eng.pyramid.com \
    --to=ralphc@pyramid.com \
    --cc=gas2@cygnus.com \
    --cc=glass@sun-lamp.cs.berkeley.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).