This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
RE: Procedure for posting a patch
- To: binutils at sourceware dot cygnus dot com
- Subject: RE: Procedure for posting a patch
- From: Kazu Hirata <kazu at hxi dot com>
- Date: Mon, 13 Mar 2000 12:37:50 -0500
- Cc: gnuh8 at pcserv dot demon dot co dot uk
Hi,
Attached is a patch for bfd/reloc16.c against the snapshot on Mar 13.
Here is the summary of what it does. This patch is regarding --relax option
in ld. Basically, the bug is an off-by-one error. In the original version of
bfd_coff_reloc16_relax_section() in bfd/reloc16.c, the function does not
reduce the section size properly when the last reloc happens to be relaxed.
This causes the section size to be slightly bigger, leaving a few extra
bytes at the end of the section. With the proposed patch, the total amount
of shrinks is computed correctly and a coff file is generated without
garbage instructions at the end.
I used this patch on h8300-hms with -ms and -mh. I hope this works on other
platforms that support --relax.
p.s.
I have other patches as well, but I will post one by one as I think it's
better to post a patch that does only one thing.
Thanks,
Kazu Hirata
ChangeLog-bfd-reloc16.patch
bfd-reloc16.patch