[Skiboot] [PATCH 02/10] Introduce hwprobe facility to avoid hard-coding probe functions

Nicholas Piggin npiggin at gmail.com
Tue Jun 29 06:23:19 AEST 2021

Excerpts from Dan Horák's message of June 29, 2021 1:11 am:
> On Sat, 26 Jun 2021 12:38:16 +1000
> Nicholas Piggin <npiggin at gmail.com> wrote:
>> From: Stewart Smith <stewart at flamingspork.com>
>> hwprobe is a little system to have different hardware probing modules
>> run in the dependency order they choose rather than hard coding
>> that order in core/init.c.
> I already commented in January, but the special linker section plus
> start/end label style is not compatible with LTO and possibly relies on
> undefined behaviour in the C language. I don't think LTO is hot topic
> for system firmware, but it could change. So at minimum it should be
> documented in the commit message.
> https://lists.ozlabs.org/pipermail/skiboot/2021-January/017470.html
> https://bugzilla.redhat.com/show_bug.cgi?id=1877485#c14
> https://sigrok.org/bugzilla/show_bug.cgi?id=1433

It looks like placing the section with the linker script as this patch 
does works okay, just not what they were doing before which seems to be
trying to define the section start/end symbols in C. AFAIKS.

The linker script method is the normal one including Linux kernel which
is being compiled with LTO AFAIK.

LTO might be interesting for skiboot for space reduction particularly.
We have a link time dead code elimination option (a basic kind of LTO)
already which can save quite a bit of space. A modern LTO might be able
to save even more.


More information about the Skiboot mailing list