patch for binutils bfd/ecoffswap.h

Nathan Tallent eraxxon@alumni.rice.edu
Mon Sep 16 12:54:00 GMT 2002


What follows is a patch for binutils bfd/ecoffswap.h.
-Nathan Tallent


Description:
------------
Update to correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
on 64 bit machines.  On a 64 bit machine, the value was incorrectly stored
as 0x00000000ffffffff causing the test against -1 to fail which caused
binutils to decisively segfault.  (Some, but not all, data items were
already sign-extended.)


Testing and testcases: 
----------------------
The test that triggered this bug is a 9Mb binary with restricted distribution.

I have run the binutils regression tests with and without my changes and
the results are the same.

Our tests: We are using bintuils as the binary reader for a program
that performs source code structure recovery on binaries from a number of
different platforms.  (We esp. focus on loop recovery for scientific
programs.) This program is also a cross-tool and we have successfully
tested these changes (and a number of others to follow eventually) on a
number of different binaries (from GNU and non-GNU compilers) and
platforms.

hosts (all of which are enabled on each platform)
  mips64-sgi-irix6
  alpha-*-linux-gnu, alpha-*-osf
  sparc32-*-elf, sparc64-*-solaris2
  i386-*-linux-gnu
  ia64-*-linux-gnu

ChangeLog:  
----------
(attached)

Patch: bfd/ecoffswap.h
(created with 'cvs diff -c3p' against cvs repository on 9/16/02)
------
(attached)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.ecoffswap.h
Type: application/octet-stream
Size: 1905 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20020916/81924bb8/attachment.obj>


More information about the Binutils mailing list