On 06/15/2017 03:52 PM, Joseph Myers wrote:

For example, given (array + (i - INT_MAX)), it's quite possible the
compiler could create a relocation for array - INT_MAX, and the original
expression is perfectly OK if i == INT_MAX even though array - INT_MAX is
far out of range.  (And array - INT_MAX as a C expression is only
undefined at runtime, not at compile time if it's in code that is never
executed.)

Some targets (typically uclinux-like things) cannot support this, as they move the data segment relative to the text segment upon loading, and need to know whether an address is text-relative or data-relative (and symbol information may not be available).

There's a target hook for that, but I can't find it now.

nathan

--
Nathan Sidwell

Reply via email to