[patch] Refactor duplicated code into a helper function

Rafael Espíndola rafael.espindola@gmail.com
Wed Feb 4 16:11:00 GMT 2015


The attached patch refactors a bit of duplicated code into a helper
function. It will make it easier to handle both cases when gcing parts
of mergeable sections.

This includes a mini bug fix in that an unaligned string that is also
not null terminated is reported as unaligned.

2014-09-18  Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
  * merge.h (add_string): declare.
  * merge.cc (add_string): define.
   (do_add_input_section): use add_string.

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: text/x-patch
Size: 2779 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150204/1b53e3bf/attachment.bin>


More information about the Binutils mailing list