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

2017-08-15 Thread Wilco Dijkstra
ping From: Wilco Dijkstra Sent: 17 January 2017 15:14 To: Richard Earnshaw; GCC Patches; James Greenhalgh Cc: nd Subject: Re: [PATCH v3][AArch64] Fix symbol offset limit     Here is v3 of the patch - tree_fits_uhwi_p was necessary to ensure the size of a declaration is an integer. So

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

2017-08-01 Thread Wilco Dijkstra
      ping From: Wilco Dijkstra Sent: 17 January 2017 15:14 To: Richard Earnshaw; GCC Patches; James Greenhalgh Cc: nd Subject: Re: [PATCH v3][AArch64] Fix symbol offset limit     Here is v3 of the patch - tree_fits_uhwi_p was necessary to ensure the size of a declaration is an integer. So

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

2017-07-21 Thread Wilco Dijkstra
    ping From: Wilco Dijkstra Sent: 17 January 2017 15:14 To: Richard Earnshaw; GCC Patches; James Greenhalgh Cc: nd Subject: Re: [PATCH v3][AArch64] Fix symbol offset limit     Here is v3 of the patch - tree_fits_uhwi_p was necessary to ensure the size of a declaration is an integer. So

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

2017-07-14 Thread Wilco Dijkstra
  ping From: Wilco Dijkstra Sent: 17 January 2017 15:14 To: Richard Earnshaw; GCC Patches; James Greenhalgh Cc: nd Subject: Re: [PATCH v3][AArch64] Fix symbol offset limit     Here is v3 of the patch - tree_fits_uhwi_p was necessary to ensure the size of a declaration is an integer. So

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

2017-06-27 Thread Wilco Dijkstra
ping From: Wilco Dijkstra Sent: 17 January 2017 15:14 To: Richard Earnshaw; GCC Patches; James Greenhalgh Cc: nd Subject: Re: [PATCH v3][AArch64] Fix symbol offset limit     Here is v3 of the patch - tree_fits_uhwi_p was necessary to ensure the size of a declaration is an integer. So

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

2017-06-16 Thread Nathan Sidwell
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 -

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

2017-06-15 Thread Joseph Myers
On Thu, 15 Jun 2017, Wilco Dijkstra wrote: > Richard Earnshaw wrote: > > No it's not.  The optimizer doesn't create totally random bases.  If the > > code + data is less than 1M in size, then any offsets it does create > > will fit within the size of the relocations selected by the compiler. > >

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

2017-06-15 Thread Wilco Dijkstra
Richard Earnshaw wrote: > No it's not.  The optimizer doesn't create totally random bases.  If the > code + data is less than 1M in size, then any offsets it does create > will fit within the size of the relocations selected by the compiler. No that's completely false. There is no way you can

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

2017-06-15 Thread Richard Earnshaw (lists)
On 15/06/17 19:18, Wilco Dijkstra wrote: > Richard Earnshaw wrote: > > C11: Summary of undefined behaviours. > > — Addition or subtraction of a pointer into, or just beyond, an array > object and an > integer type produces a result that does not point into, or just beyond, > the same array >

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

2017-06-15 Thread Wilco Dijkstra
Richard Earnshaw wrote: C11: Summary of undefined behaviours. — Addition or subtraction of a pointer into, or just beyond, an array object and an integer type produces a result that does not point into, or just beyond, the same array object (6.5.6). That's totally irrelevant given the addition

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

2017-06-15 Thread Richard Earnshaw (lists)
On 15/06/17 18:51, Wilco Dijkstra wrote: > Richard Earnshaw wrote: >> >> You can write it, but it's meaningless by the C standard. You can't >> take the address beyond one after the size of the object, so anything >> more than +1 has no meaning. > > No it's perfectly valid and such out-of-range

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

2017-06-15 Thread Wilco Dijkstra
Richard Earnshaw wrote: > > You can write it, but it's meaningless by the C standard.  You can't > take the address beyond one after the size of the object, so anything > more than +1 has no meaning. No it's perfectly valid and such out-of-range cases occur thousands of times when building any

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

2017-06-15 Thread Richard Earnshaw (lists)
On 15/06/17 17:55, Wilco Dijkstra wrote: > Richard Earnshaw wrote: >> Yes, I still believe that this is a bug in the way we've documented the >> -mcmodel=tiny and -mcmodel=small options. > > In what way could this possibly be a documentation bug? It's not at all > related > to the size of a

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

2017-06-15 Thread Wilco Dijkstra
Richard Earnshaw wrote: > Yes, I still believe that this is a bug in the way we've documented the > -mcmodel=tiny and -mcmodel=small options. In what way could this possibly be a documentation bug? It's not at all related to the size of a binary. There is no limit to the offset you can apply to a

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

2017-06-15 Thread Richard Earnshaw (lists)
On 14/06/17 15:07, James Greenhalgh wrote: > On Tue, Jun 13, 2017 at 03:00:28PM +0100, Wilco Dijkstra wrote: >> >> ping > > I've been avoiding reviewing this patch as Richard was the last to comment > on it, and I wasn't sure that his comments had been resolved to his > satisfaction. The

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

2017-06-14 Thread Wilco Dijkstra
Hi, Let's get back to the patch and the bug it fixes. The only outstanding question is what constant offsets we should allow when generating a relocation: > So the question is whether we should allow > largish offsets outside of the bounds of symbols (v1), no offsets (this > version), or >

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

2017-06-14 Thread James Greenhalgh
On Tue, Jun 13, 2017 at 03:00:28PM +0100, Wilco Dijkstra wrote: > > ping I've been avoiding reviewing this patch as Richard was the last to comment on it, and I wasn't sure that his comments had been resolved to his satisfaction. The conversation was back in August 2016 on v1 of the patch: >

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

2017-06-13 Thread Wilco Dijkstra
ping From: Wilco Dijkstra Sent: 17 January 2017 15:14 To: Richard Earnshaw; GCC Patches; James Greenhalgh Cc: nd Subject: Re: [PATCH v3][AArch64] Fix symbol offset limit     Here is v3 of the patch - tree_fits_uhwi_p was necessary to ensure the size of a declaration is an integer. So

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

2017-04-20 Thread Wilco Dijkstra
ping From: Wilco Dijkstra Sent: 17 January 2017 15:14 To: Richard Earnshaw; GCC Patches; James Greenhalgh Cc: nd Subject: Re: [PATCH v3][AArch64] Fix symbol offset limit   Here is v3 of the patch - tree_fits_uhwi_p was necessary to ensure the size of a declaration is an integer. So

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

2017-02-23 Thread Wilco Dijkstra
  ping From: Wilco Dijkstra Sent: 17 January 2017 15:14 To: Richard Earnshaw; GCC Patches; James Greenhalgh Cc: nd Subject: Re: [PATCH v3][AArch64] Fix symbol offset limit     Here is v3 of the patch - tree_fits_uhwi_p was necessary to ensure the size of a declaration is an integer. So

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

2017-02-02 Thread Wilco Dijkstra
ping From: Wilco Dijkstra Sent: 17 January 2017 15:14 To: Richard Earnshaw; GCC Patches; James Greenhalgh Cc: nd Subject: Re: [PATCH v3][AArch64] Fix symbol offset limit   Here is v3 of the patch - tree_fits_uhwi_p was necessary to ensure the size of a declaration is an integer. So

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

2017-01-17 Thread Wilco Dijkstra
Here is v3 of the patch - tree_fits_uhwi_p was necessary to ensure the size of a declaration is an integer. So the question is whether we should allow largish offsets outside of the bounds of symbols (v1), no offsets (this version), or small offsets (small negative and positive offsets just