This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [committed] Ensure pc-relative calls can reach their target on


>> I believe that is true, certainly the code I have adapted from there
>> comes with that restriction. Are there any ports that can do long
>> branch stubs in a more fine-grained way? I assume it would involve
>> using the linker relaxing hooks.
>
> I know the HP SOM and ELF linkers do this for hppa.

Only because the compilers cooperate by imposing a maximum size for
text sections. If a text section would grow beyond the range of a
short branch, the compiler simply starts a new section (with the same
name). If a single function would be too large, the compiler is
obligated to generate long branches where short ones would not reach
the beginning or end of the section. The HP linker never has to insert
a stub in the middle of an input section.

-cary


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]