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]

Re: [pathc] Re: objdump and -z recommendation


Hi Svein,

> binutils/Changelog
> 2002-10-23  Svein E. Seldal  <Svein.Seldal@solidas.com>
> 
> 	* objdump.c : Increase the SKIP_ZEROES to 32 to make it possible
> 	  to decode 32-bit, all-zero, instructions.
> 
> Index: binutils/objdump.c
> ===================================================================
> RCS file: /prosjekt/gnu/src/src/binutils/objdump.c,v
> retrieving revision 1.60
> diff -c -3 -p -r1.60 objdump.c
> *** binutils/objdump.c	21 Oct 2002 02:18:58 -0000	1.60
> --- binutils/objdump.c	23 Oct 2002 07:07:40 -0000
> *************** objdump_sprintf VPARAMS ((SFILE *f, cons
> *** 1139,1145 ****
>      The number is arbitrarily chosen.  */
>   
>   #ifndef SKIP_ZEROES
> ! #define SKIP_ZEROES (8)
>   #endif
>   
>   /* The number of zeroes to skip at the end of a section.  If the
> --- 1139,1145 ----
>      The number is arbitrarily chosen.  */
>   
>   #ifndef SKIP_ZEROES
> ! #define SKIP_ZEROES (32)
>   #endif
>   
>   /* The number of zeroes to skip at the end of a section.  If the

I do not believe that this patch is a good idea.  For starters, if
applied you would have to fix up all the GAS and LD testsuites that
examine the disassembler's output to account for the extra zeros now
being disassembled.

Since the code wraps the definition of SKIP_ZEROES in a #ifndef, I
would suggest that a better alternative would be to provide an
alternative definition for the value for the tic40 port.  You could
easily add a line like this to the configure.in file:

Index: configure.in
===================================================================
RCS file: /cvs/src/src/binutils/configure.in,v
retrieving revision 1.35
diff -c -3 -p -w -r1.35 configure.in
*** configure.in	17 Sep 2002 07:09:46 -0000	1.35
--- configure.in	23 Oct 2002 11:13:59 -0000
*************** changequote([,])dnl
*** 284,289 ****
--- 284,292 ----
    	  BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
  	  DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF"
  	  ;;
+ 	tic4x-*-*)
+ 	  OBJDUMP_DEFS="-DSKIP_ZEROES=32"
+ 	  ;;
  	esac
      fi
  done


Cheers
        Nick


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