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: [PATCH 2/2] gold: add a task in incremental build that can be used to check which inputs were modified


> I don't think your patch quite does this. ?You have a blocker token
> which ensures that your Incremental_inputs_checker task will run after
> all of the Read_symbols tasks. ?But I don't see anything which forces
> the Add_symbols task to wait until the Incremental_inputs_checker task
> is complete.
  In queue_initial_tasks I add a new token at the beginning of the
this_blocker/next_blocker series of tokens and block it by
Incremental_inputs_checker. This seemed to work correctly on the
--debug tasks output. But this is not important, as I agree that if a
file didn't change then we can also assume the file signature didn't
change and there is no need to call Read_symbols. This will be both
faster and should make the code easier. I will send an updated patch.

>> A bigger problem is that we do it before Read_scripts thus we won't
>> see input files included by scripts. This can be fixed by dividing the
>> a Read_script task into one that reads script and another the applies
>> it to the layout. Before doing this, as a hack, I could treat every
>> file included by a script as modified.
>
> This is, unfortunately, important to solve in the long run since libc.so
> on GNU/Linux systems is a linker script, and we definitely don't want to
> assume that libc.so.6 is modified each time we do an incremental link.
> Here it may suffice to call stat in the function which Read_scripts
> queues up to read the input file symbols.
  Now I think that if the script itself didn't change, we can read the
input files from the .gnu_incremental_inputs of the executable and
assume that they will be the same (if the script did change then
anyhow we will be doing a full link). There may still be a problem if
we will detect something that forces a full link after a Read_script -
we will want to read the previous files with the settings from before
executing this script. I will think something more about it.

Mikołaj


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