This is the mail archive of the
mailing list for the binutils project.
[gold] issues with the lifetime of the archive passed to gold::Incremental_inputs::report_archive
- From: Rafael Espindola <espindola at google dot com>
- To: Binutils <binutils at sourceware dot org>
- Cc: Ian Lance Taylor <iant at google dot com>, Mikolaj Zalewski <mikolajz at google dot com>
- Date: Fri, 27 Nov 2009 17:06:02 -0500
- Subject: [gold] issues with the lifetime of the archive passed to gold::Incremental_inputs::report_archive
I am working on adding the missing archive information for incremental
linking. One issue I just noticed is that an archive passed to
gold::Incremental_inputs::report_archive is deleted in
gold::Add_archive_symbols::run before we get to
I can see three ways to try to solve this, but I am not familiar
enough with gold to know the best one:
*) Copy the archive in gold::Incremental_inputs::report_archive.
Simple to do, higher memory use.
*) Extend the lifetime of the archive. Doesn't look so easy, but could
save us some memory.
*) Do work on Incremental_inputs::report_*:
We could create a class (extend Incremental_inputs itself?) for
incremental link information before opening the input files and update
it as Incremental_inputs::report_* is called. Doing it this way
gold::Incremental_inputs::sized_create_inputs_section_data would be a
simpler method that just serializes the information.
The third option is probably the most efficient. Is it the best one?
Do you foresee any issues in trying to implement it?
Rafael Ãvila de EspÃndola