On 23.09.2024 18:06, Frediano Ziglio wrote: > On Mon, Sep 23, 2024 at 4:54 PM Jan Beulich <[email protected]> wrote: >> >> On 19.09.2024 10:00, Frediano Ziglio wrote: >>> All loadable sections should be page aligned. >> >> What about .buildid? .reloc otoh is discardable, and hence presumably okay >> if mis-aligned. > > Currently, internally we have a patch to make ".reloc" not discardaeble. > The problem is that in case of direct EFI loading, that section is > used to relocated back to the final location. On bootloaders > discarding that section, you'll get a crash :-(
Indeed, if such EFI loaders exist we have an issue (I don't think we actively mark the section discardable, I think that's something the linker decides). > Isn't ".buildid" a kind of subsection with the same attributes of > container section? In ELF maybe. In the PE binary it's following directly after .rodata, meaning it typically shares its space with .rodata's last page. (Aiui in PE/COFF it is illegal for multiple sections to overlap, unlike for ELF's "segments", i.e. what the program header entries describe.) > Maybe I have BUILD_ID_EFI not defined? Possible, albeit would be odd. Jan
