[binutils-gdb] Factor out common relocation processing

sergiodj+buildbot@sergiodj.net sergiodj+buildbot@sergiodj.net
Sat Aug 11 09:28:00 GMT 2018


*** TEST RESULTS FOR COMMIT 1dc9e2d63e37839ff1768346b2e3f52e338baba5 ***

Author: Alan Modra <amodra@gmail.com>
Branch: master
Commit: 1dc9e2d63e37839ff1768346b2e3f52e338baba5

Factor out common relocation processing

This patch factors out some code common to both bfd_perform_relocation
and bfd_install_relocation, in the process fixing the omission of
"case -1" in bfd_install_relocation.

	* reloc.c (bfd_get_reloc_size): Sort switch.
	(read_reloc, write_reloc, apply_reloc): New functions.
	(bfd_perform_relocation, bfd_install_relocation): Use apply_reloc.
	(_bfd_relocate_contents): Use read_reloc and write_reloc.
	(_bfd_clear_contents): Likewise.



More information about the Gdb-testers mailing list