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: question about branch island


Thanks. I'd like to implement it in the linker indeed. But could you
tell where I  can get the example codes in the linker? I have no ideas
yet to start for now.

2006/2/17, Eric Christopher <echristo@apple.com>:
>
> > I'm working on a gcc/binutils port and met with a problem. The target
> > doesn't have absolute address jump. So for function call, the linker
> > sometimes complains about "relocation truncated to fit". I used the
> > pc-relative branch to implement function call, but I think this is a
> > bug. They told me about branch island, which ppc used. I've got the
> > codes about branch island of gcc-3.4.4. But it seems that
> > binutils-2.14 doesn't implement it. Even failed when I try to build
> > with --target=ppc-darwin. The configuration said,
> > *** This configuration is not supported in the following
> > subdirectories:
> >      bfd binutils ld gas opcodes
> >     (Any other directories should still work fine.)
> >
>
> Yup. darwin isn't supported in binutils.
>
> > So can anyone tell me where is the example about how to implement
> > branch island in gas and ld.
> >
>
> Take a look at the powerpc port as I told you on the gcc list. elf64-
> ppc.c or elf32-ppc.c would be a good start.
>
> I highly suggest you implement it in the linker instead of in the
> compiler. You do not want to use the ppc -mlong-branch
> code.
>
> -eric
>
>


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