bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/31415] Section coalescing should ignore (and merge) SHF_GNU_RE


From: address@hidden
Subject: [Bug gold/31415] Section coalescing should ignore (and merge) SHF_GNU_RETAIN
Date: Mon, 26 Feb 2024 12:37:20 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=31415

--- Comment #1 from Alastair Houghton <alastair@alastairs-place.net> ---
Just to add to the above, you might say "well, you should either always set
`SHF_GNU_RETAIN` or never set it".

The issue comes where, for example, you have library code that would like to
access embedded data if it's present, so declares the section in order to get
the `__start` and `__stop` symbols, and then the other code (maybe built a lot
later, or even by someone completely different) that generates that data wants
to be able to *optionally* set the retain flag.  The library code has no way to
know whether or not it's going to be set in the future.  If it doesn't set the
flag, `gold` won't coalesce the section with code that did, and vice-versa.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]