|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 3/4] xen: introduce __symbol
On 17/10/2018 15:31, 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 standard forbids comparisons between pointers pointing to different objects. The C standard forbids for both comparisons and substraction (see C Standard, 6.5.6 [ISO/IEC 9899:2011] and [1]). Also, it is probably worth to give a pointer to the paragraph in the standard to help finding more details. Cheers,[1] https://wiki.sei.cmu.edu/confluence/display/c/ARR36-C.+Do+not+subtract+or+compare+two+pointers+that+do+not+refer+to+the+same+array
-- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |