From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <9605081319.ZM22902@aib.com> Date: Wed, 8 May 1996 13:19:09 -0400 From: Eric Youngdale Subject: Re: gdb In-Reply-To: >Umm, while I agree that it might make it a lot easier to debug things on the >alpha, I hope nobody writes a patch like that for gdb. The reason I hope >that is that I hope that it will be unnecessary. The _correct_ way to handle >it is to never generate those d*mn instructions in the first place. We need >an optimizing linker that gets rid of them and makes it into a single "bsr" >instruction instead. This wouldn't be a hard optimization, and in fact it would make shared libraries a bit easier for those cases where you can safely call without going through a PLT (i.e. we are not using up a valuable .got slot for a pointer). It would tend to be used for things like static functions that we would want to do this in shared libs. For normal executables, it is more just a question of whether the branch is in range or not. Remind me about this in about 4 months :-). I think the actual code for this would be relatively simple. Note that we would leave behind a NOP, since it would be a lot harder for the linker to compress this out. If someone else wants to attempt this they can, of course, and I can give pointers as to what would be needed. -Eric -- "The woods are lovely, dark and deep. But I have promises to keep, And lines to code before I sleep, And lines to code before I sleep."