Re: [PATCH v2 2/2] symbols: also special-case symbols aliasing _sinittext

Jan Beulich <[email protected]>
Newsgroups gmane.comp.emulators.xen.devel
Message-ID <[email protected]>
On 25.08.2026 16:29, Jan Beulich wrote:
> A recent 4.22 randconfig build job hit a situation where (LIVEPATCH=n,
> i.e. --all-symbols not specified) both __note_gnu_build_id_end and
> _erodata aliased _sinittext on the 1st linking pass, but they didn't on
> the 2nd one. As a result two fewer symbols were emitted on the 2nd pass,
> causing $(call compare-symbol-tables, ...) to fail.
> 
> Extend the existing "corner case" by also considering aliases with
> _sinittext (_stext really shouldn't have anything ahead of it), but
> discard only non-text symbols.
> 
> Signed-off-by: Jan Beulich <[email protected]>
> ---
> v2: Re-base over _{s,e}extratext removal. Add const to cast.
> 
> --- a/xen/tools/symbols.c
> +++ b/xen/tools/symbols.c
> @@ -217,6 +217,11 @@ static int symbol_valid(struct sym_entry
>  		if ((s->addr == _etext && strcmp((char*)s->sym + offset, "_etext")) ||
>  		    (s->addr == _einittext && strcmp((char*)s->sym + offset, "_einittext")))
>  			return 0;
> +		/* Same for non-text aliases of _sinittext or _sextratext. */

I've locally dropped this leftover mention of _sextratext.

Jan

> +		if (toupper(*s->sym) != 'T'
> +		    && s->addr == _sinittext
> +		    && strcmp((const char *)s->sym + offset, "_sinittext"))
> +			return 0;
>  	}
>  
>  	/* Exclude symbols which vary between passes. */
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.