This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

Re: [gold][patch] Fix gold plugins so cleanup handler is not called repeatedly


> The attached patch fixes a problem that can occur when a plugin's
> cleanup handler issues a fatal error through the linker's message API.
> This moves the cleanup_done_ flag into each plugin and sets each
> plugin's cleanup_done_ flag just before invoking the cleanup handler.

I may as well fix the error message in Plugin_manager::add_input_file
while I'm here. Updated patch attached.

-cary

	* plugin.h (Plugin::Plugin): Initialize cleanup_done_.
	(Plugin::cleanup_done_): New member.
	(Plugin_manager::Plugin_manager): Remove cleanup_done_.
	(Plugin_manager::cleanup_done_): Remove.
	(Plugin_manager::add_input_file): Edit error message.
	* plugin.cc (Plugin::cleanup): Test and set cleanup_done_.
	(Plugin_manager::cleanup): Remove use of cleanup_done_.

Attachment: plugin-cleanup-patch.txt
Description: Text document


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