This is the mail archive of the binutils@sourceware.cygnus.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]

RE: Procedure for posting a patch


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


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