public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Feature request: spare program headers
@ 2023-11-17  3:23 Matheus Afonso Martins Moreira
  2023-11-17  8:08 ` Simon Richter
  0 siblings, 1 reply; 3+ messages in thread
From: Matheus Afonso Martins Moreira @ 2023-11-17  3:23 UTC (permalink / raw)
  To: binutils

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

https://sourceware.org/pipermail/binutils/2023-November/130532.html

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:

mold
https://github.com/rui314/mold/issues/1148
https://github.com/rui314/mold/commit/eb6c213f2a9aa8a101b2b52a791be369d165e6a9

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-11-18  0:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-17  3:23 Feature request: spare program headers Matheus Afonso Martins Moreira
2023-11-17  8:08 ` Simon Richter
2023-11-18  0:18   ` Matheus Afonso Martins Moreira

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).