>>> On 10.01.19 at 03:40, <julien.gr...@gmail.com> wrote:
> On Wed, 9 Jan 2019, 18:43 Stefano Stabellini, <sstabell...@kernel.org>
> wrote:
> 
>> Introduce a macro, SYMBOL, which is similar to RELOC_HIDE, but it is
>> meant to be used everywhere symbols such as _stext and _etext are used
>> in the code. It can take an array type as a parameter, and it returns
>> the same type.
>>
>> SYMBOL is needed when accessing symbols such as _stext and _etext
>> because the C standard forbids for both comparisons and substraction
>> (see C Standard, 6.5.6 [ISO/IEC 9899:2011] and [1]) between pointers
>> pointing to different objects. _stext, _etext, etc. are all pointers to
>> different objects from ANCI C point of view.
>>
> 
> This does not make sense because you still return a pointer and therefore
> the undefined behavior is still present.
> 
> I really don't believe this patch is going to make the MISRA tool happy.

Well, till now I've been assuming that no version of this series was
posted without being certain the changes achieve the goal (of
making that tool happy).

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to