On Wed 2024-08-07 19:46:31, Song Liu wrote:
quoted
On Aug 7, 2024, at 7:58 AM, zhang warden [off-list ref] wrote:
quoted
In my GCC built, we have suffixes like ".constprop.0", ".part.0", ".isra.0",
and ".isra.0.cold".
A fresher's eye, I met sometime when try to build a livepatch module and found some mistake caused by ".constprop.0" ".part.0" which is generated by GCC.
These section with such suffixes is special and sometime the symbol st_value is quite different. What is these kind of section (or symbol) use for?
IIUC, constprop means const propagation. For example, function
"foo(int a, int b)" that is called as "foo(a, 10)" will be come
"foo(int a)" with a hard-coded b = 10 inside.
.part.0 is part of the function, as the other part is inlined in
the caller.
Hmm, we should not remove the suffixes like .constprop*, .part*,
.isra*. They implement a special optimized variant of the function.
It is not longer the original full-featured one.
This is a difference against adding a suffix for a static function.
Such a symbol implements the original full-featured function.
Best Regards,
Petr