[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190212121347.GD30028@zn.tnic>
Date: Tue, 12 Feb 2019 13:13:47 +0100
From: Borislav Petkov <bp@...en8.de>
To: Jiri Slaby <jslaby@...e.cz>
Cc: mingo@...hat.com, linux-arch@...r.kernel.org,
linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org
Subject: Re: [PATCH v7 05/28] x86/asm/entry: annotate THUNKs
On Tue, Feb 12, 2019 at 12:51:08PM +0100, Jiri Slaby wrote:
> And what if the LOCAL macros prepend .L automatically? The references
> would need to be via macro or by manually adding .L. I mean:
>
> SYM_CODE_START_LOCAL(function)
> ret
> SYM_CODE_END(function)
>
> And then used as:
> call .Lfunction
> or
> call SYM_LOCAL(function)
>
> Is that too ugly?
I'd prefer SYM_LOCAL because not everyone is aware of the fact that the
GNU toolchain makes .L-prepended symbols local.
However:
"Local Symbol Names
A local symbol is any symbol beginning with certain local label
prefixes. By default, the local label prefix is `.L' for ELF systems or
`L' for traditional a.out systems, but each target may have its own set
of local label prefixes. On the HPPA local symbols begin with `L$'."
Now if you make those macros arch-independent, you need to have the
correct local symbol definition for those arches and targets(!) which
differ.
If you don't macroize the local symbols stuff, OTOH, then that's one
less problem you have.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
Powered by blists - more mailing lists