Feature request: spare program headers

Matheus Afonso Martins Moreira matheus.a.m.moreira@gmail.com
Fri Nov 17 03:23:43 GMT 2023

Hello. I recently emailed this list about appending PHDRs to programs:


There turned out to be a simple and effective solution to my problem:
the linker appends a number of empty PT_NULL entries to the PHDRs table.
This allows post processing tools to overwrite those null headers
in any way they want without impacting normal linker operations.

The mold linker has already integrated this feature.
I'd like to formally request that it be included in GNU ld as well.
I have also filed an LLVM lld issue but there was no interest so far.

Relevant links:


More information about the Binutils mailing list