------- Comment #3 from uweigand at gcc dot gnu dot org 2006-10-24 19:03 ------- Sorry for missing that bug. The proposed patch is OK -- thanks for catching this.
As to the general problem, I think you're right that we need to further constrain the range of accepted offsets. However, DISP_IN_RANGE is not the right solution, we can do a lot better. I think the right fix would be to accept any offset in the +- 2 GB range (*not* 4 GB) as today. Since we restrict executable / shared object sizes to 2 GB right now, the delta between the symbol and the pc is in the range +- 2GB. Adding an offset in the +- 2 GB range will result in a total delta in the +- 4 GB range -- which is just what larl allows. The +- 2 GB range is also big enough to accept any (reasonable) offset on a 31-bit system. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29319