[PATCH] pch: Add support for PCH for relocatable executables

Jakub Jelinek jakub@redhat.com
Tue Nov 16 08:52:55 GMT 2021


On Sat, Nov 13, 2021 at 08:32:41PM +0000, Iain Sandoe wrote:
> IMO both this series
>  - which restores the ability to work with PIE exes but requires a known address for the PCH 
> and the series I posted
>  - which allows a configuration to opt out of PCH anyway
> 
> could be useful - for Darwin I prefer this series.

Yeah, I think we want both and let the users choose.

Finding a hole can be indeed hard on 32-bit VA, but no OS I've seen
randomizes across the whole 44 or 48 or how many bits VA, otherwise e.g.
address sanitizer or thread sanitizer would have no chance to work either.

Having the PCH blob be relocatable would be achievable too, we have all the
information in the GTY for it after all when we are able to relocate it at
PCH saving time, but don't do that currently because it would be more
expensive at PCH restore time.  But perhaps better to do that as a fallback
if we don't manage to get the right slot.

	Jakub



More information about the Gcc-patches mailing list