[PATCH][Gold] Fix for incremental copy test
Cary Coutant
ccoutant@gmail.com
Tue Dec 22 20:34:04 GMT 2020
> I figured there was two possible ways to solve this problem, either
> handle this on the first run or on the second run.
> The first run, compiling with the `--incremental-full`, a solution
> would be to set any `.rodata` prefix flag to `A`
> instead of `AM`; `AM` is the flag that is outputted in the first run for.
>
> Or the other method when running: `--incremental-update`, or the
> second run would be to expect an `AM` rather than a `A`.
>
> But for this case I chose the former rather than the latter, because
> the ELF file should have an `.rodata`
> section with a flag of `A`, and this ensures that.
The problem was that gold was failing to mask out the MERGE flag when
processing the base file during an incremental update, so that the
incoming replacement .rodata sections didn't match the one in the base
image. This patch should have fixed the problem:
https://sourceware.org/pipermail/binutils/2020-December/114482.html
Thanks for looking at it, though, and sorry to have taken so long to get to it.
-cary
More information about the Binutils
mailing list