Re: [Xen-devel] [PATCH v3 3/4] xen: introduce SYMBOL

2018-11-09 Thread Julien Grall
Hi Stefano, On 06/11/2018 22:05, Stefano Stabellini wrote: Introduce a macro, SYMBOL, which is a simple wrapper around RELOC_HIDE to be used everywhere symbols such as _stext and _etext are used in the code. RELOC_HIDE is needed when accessing symbols such as _stext and _etext because the C

Re: [Xen-devel] [PATCH v3 3/4] xen: introduce SYMBOL

2018-11-08 Thread Stefano Stabellini
On Thu, 8 Nov 2018, Jan Beulich wrote: > >>> On 06.11.18 at 23:05, wrote: > > --- a/xen/include/xen/compiler.h > > +++ b/xen/include/xen/compiler.h > > @@ -99,6 +99,12 @@ > > __asm__ ("" : "=r"(__ptr) : "0"(ptr)); \ > > (typeof(ptr)) (__ptr + (off)); }) > > > > +/* > > + * Use

Re: [Xen-devel] [PATCH v3 3/4] xen: introduce SYMBOL

2018-11-08 Thread Jan Beulich
>>> On 06.11.18 at 23:05, wrote: > --- a/xen/include/xen/compiler.h > +++ b/xen/include/xen/compiler.h > @@ -99,6 +99,12 @@ > __asm__ ("" : "=r"(__ptr) : "0"(ptr)); \ > (typeof(ptr)) (__ptr + (off)); }) > > +/* > + * Use RELOC_HIDE with symbols such as _stext and _etext to avoid

[Xen-devel] [PATCH v3 3/4] xen: introduce SYMBOL

2018-11-06 Thread Stefano Stabellini
Introduce a macro, SYMBOL, which is a simple wrapper around RELOC_HIDE to be used everywhere symbols such as _stext and _etext are used in the code. RELOC_HIDE is needed when accessing symbols such as _stext and _etext because the C standard forbids for both comparisons and substraction (see C