This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Restarting linking from write phase (PR 24373)
- From: Tamar Christina <Tamar dot Christina at arm dot com>
- To: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Cc: nd <nd at arm dot com>
- Date: Wed, 8 May 2019 10:38:12 +0000
- Subject: Restarting linking from write phase (PR 24373)
- References: <DB6PR0802MB2309ADD39E513C8A413AE43DFF310@DB6PR0802MB2309.eurprd08.prod.outlook.com>
Resending to mailist
________________________________________
From: Tamar Christina
Sent: Tuesday, May 7, 2019 10:52:06 AM
To: binutils@sourceware.org
Cc: nd
Subject: Restarting linking from write phase (PR 24373)
Hi All,
I'm looking at PR 24373 and am trying to think of a way to implement the space saving if possible but if not to use the existing method as a fall back.
Essentially the problem is that in order to have the space savings I need to know that all addresses are within the 1MB range for an ADR.
This means I can only know this at the very very end of the linking phase when we're about to start writing out the sections (after GC sections et all).
Now If turns out this is not the case I have to then resize the text section and change the alignment of it. Which of course means recalculating all the VMAs.
So my question is, does anyone know if it's possible to do this? Or should I just add a new option that assumes the space saving is possible and errors out if it turns out an address is out of range.
In principle I don't have to restart the entire linking process, just the calculation one, as symbol map doesn't change.
Thanks,
Tamar