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]

gold: try to open the output file in incremental build and check if it has the inputs section


  This patch adds an object representing the output file and makes use
of it - gold now checks if the input is an ELF file and if it has a
SHT_GNU_INCREMENTAL_INPUTS section. I have moved some code from
object.cc to elf_file.h to reuse it.
  The new code informs the user why it needs to fall back to full link
(except for the obvious case that the output doesn't exist). However,
I'm not sure if this will be helpful or annoying. Does anyone has an
opinion?

elfcpp:

2009-09-11  Mikolaj Zalewski  <mikolajz@google.com>

	* elf_file.h: Fix header guard.
	(Elf_recognizer): New class, code from gold/object.cc.
	(Elf_file::find_section_by_type): New method.

gold:

2009-09-11  Mikolaj Zalewski  <mikolajz@google.com>

	* incremental.cc: Include <stdarg>.
	Include "target-select.h".
	(vexplain_no_incremental): New function.
	(explain_no_incremental): New function.
	(Incremental_binary::error): New method.
	(Sized_incremental_binary::do_find_incremental_inputs_section): New method.
	(make_sized_incremental_binary): New function.
	(open_incremental_binary): New function.
	(can_incrementally_link_file): Add checks if output is ELF and has
inputs section.
	* incremental.h: Include "elf_file.h".
	Include "output.h".
	(Incremental_binary): New class.
	(Sized_incremental_binary): New class.
	(open_incremental_binary): Declare.
	* object.cc (is_elf_object): Use elfcpp::Elf_recognizer::is_elf_file.
	(make_elf_object): Use elfcpp::Elf_recognizer::is_valid_header.
	* output.cc (Output_file::filesize): New method.

Attachment: 0001-gold-try-to-open-the-output-file-in-incremental-build-and-check-if-it-has-the-inputs-section.txt
Description: Text document


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