Re: [PATCH][AArch64] Fix symbol offset limit

2019-10-16 Thread Richard Sandiford
Wilco Dijkstra writes: > Hi Richard, >> Sure, the "extern array of unknown size" case isn't about section anchors. >> But this part of my message (snipped above) was about the other case >> (objects of known size), and applied to individual objects as well as >> section anchors. >> >> What I was t

Re: [PATCH][AArch64] Fix symbol offset limit

2019-10-15 Thread Wilco Dijkstra
Hi Richard, > Sure, the "extern array of unknown size" case isn't about section anchors. > But this part of my message (snipped above) was about the other case > (objects of known size), and applied to individual objects as well as > section anchors. > > What I was trying to say is: yes, we need b

Re: [PATCH][AArch64] Fix symbol offset limit

2019-10-14 Thread Richard Sandiford
Wilco Dijkstra writes: > Hi Richard, > >>> No - the testcases fail with that. >> >> Hmm, OK. Could you give more details? What does the motivating case >> actually look like? > > Well it's now a very long time ago since I first posted this patch but the > failure > was in SPEC. It did something

Re: [PATCH][AArch64] Fix symbol offset limit

2019-10-14 Thread Wilco Dijkstra
Hi Richard, >> No - the testcases fail with that. > > Hmm, OK. Could you give more details? What does the motivating case > actually look like? Well it's now a very long time ago since I first posted this patch but the failure was in SPEC. It did something like &array[0xff000 - x], presuma

Re: [PATCH][AArch64] Fix symbol offset limit

2019-10-12 Thread Jeff Law
On 10/12/19 3:56 AM, Richard Sandiford wrote: > Wilco Dijkstra writes: >> Hi Richard, >> >>> If global_char really is a char then isn't that UB? >> >> No why? > > Well, "simple expressions like &global_char + 0xff00" made it sound > like there really was a: > >extern char global_char; >

Re: [PATCH][AArch64] Fix symbol offset limit

2019-10-12 Thread Richard Sandiford
Richard Sandiford writes: > Wilco Dijkstra writes: >> We can do all kinds of arithmetic based on pointers, either using >> pointer types or converted to uintptr_t. Note that the optimizer >> actually creates these expressions, for example arr[N-x] can be >> evaluated as (&arr[0] + N) - x. So thi

Re: [PATCH][AArch64] Fix symbol offset limit

2019-10-12 Thread Richard Sandiford
Wilco Dijkstra writes: > Hi Richard, > >> If global_char really is a char then isn't that UB? > > No why? Well, "simple expressions like &global_char + 0xff00" made it sound like there really was a: extern char global_char; Only &global_char and &global_char + 1 are defined in that case.

Re: [PATCH][AArch64] Fix symbol offset limit

2019-10-11 Thread Wilco Dijkstra
Hi Richard, > If global_char really is a char then isn't that UB? No why? We can do all kinds of arithmetic based on pointers, either using pointer types or converted to uintptr_t. Note that the optimizer actually creates these expressions, for example arr[N-x] can be evaluated as (&arr[0] + N

Re: [PATCH][AArch64] Fix symbol offset limit

2019-10-10 Thread Richard Sandiford
Wilco Dijkstra writes: > ping > > In aarch64_classify_symbol symbols are allowed full-range offsets on > relocations. > This means the offset can use all of the +/-4GB offset, leaving no offset > available > for the symbol itself. This results in relocation overflow and link-time >

Re: [PATCH][AArch64] Fix symbol offset limit

2019-10-10 Thread Wilco Dijkstra
ping In aarch64_classify_symbol symbols are allowed full-range offsets on relocations. This means the offset can use all of the +/-4GB offset, leaving no offset available for the symbol itself. This results in relocation overflow and link-time errors for simple expressions like

Re: [PATCH][AArch64] Fix symbol offset limit

2019-09-09 Thread Wilco Dijkstra
         ping       In aarch64_classify_symbol symbols are allowed full-range offsets on relocations.    This means the offset can use all of the +/-4GB offset, leaving no offset available    for the symbol itself.  This results in relocation overflow and link-time errors    fo

Re: [PATCH][AArch64] Fix symbol offset limit

2019-09-02 Thread Wilco Dijkstra
     ping         In aarch64_classify_symbol symbols are allowed full-range offsets on relocations.   This means the offset can use all of the +/-4GB offset, leaving no offset available   for the symbol itself.  This results in relocation overflow and link-time errors   for simple expr

Re: [PATCH][AArch64] Fix symbol offset limit

2019-08-19 Thread Wilco Dijkstra
  ping      In aarch64_classify_symbol symbols are allowed full-range offsets on relocations.  This means the offset can use all of the +/-4GB offset, leaving no offset available  for the symbol itself.  This results in relocation overflow and link-time errors  for simple expressions

Re: [PATCH][AArch64] Fix symbol offset limit

2019-07-31 Thread Wilco Dijkstra
ping   In aarch64_classify_symbol symbols are allowed full-range offsets on relocations. This means the offset can use all of the +/-4GB offset, leaving no offset available for the symbol itself.  This results in relocation overflow and link-time errors for simple expressions like &globa

Re: [PATCH][AArch64] Fix symbol offset limit

2016-08-26 Thread Wilco Dijkstra
Richard Earnshaw (lists) wrote: > > So isn't the real bug that we've permitted the user to create an object > that is too large for the data model? No that's a different issue I'm not trying to address here. The key is that as long as the start of the symbol is in range, we should be able to lin

Re: [PATCH][AArch64] Fix symbol offset limit

2016-08-26 Thread Richard Earnshaw (lists)
On 23/08/16 15:10, Wilco Dijkstra wrote: > In aarch64_classify_symbol symbols are allowed full-range offsets on > relocations. > This means the offset can use all of the +/-4GB offset, leaving no offset > available > for the symbol itself. This results in relocation overflow and link-time > er