Date: Mon, 2 Sep 2013 04:45:37 -0700 From: Adrian Chadd <adrian@freebsd.org> To: David Chisnall <theraven@freebsd.org> Cc: John-Mark Gurney <jmg@funkthat.com>, freebsd-current <freebsd-current@freebsd.org>, "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org> Subject: Re: how do i cross build world/kernel with clang? Message-ID: <CAJ-Vmok3sMK0=6-J3h8CF0h5gJdSNAPzgyELVkDzLDdugK0Ecg@mail.gmail.com> In-Reply-To: <2CFFB2A1-7885-40A0-8C96-D56A7492CBDF@FreeBSD.org> References: <CAJ-Vmom3cLdEei%2BjwNRx7n_MgU0H3X0LigagNzU567tyeHBd8Q@mail.gmail.com> <20130902020129.GD36239@funkthat.com> <2CFFB2A1-7885-40A0-8C96-D56A7492CBDF@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2 September 2013 00:47, David Chisnall <theraven@freebsd.org> wrote: > On 2 Sep 2013, at 03:01, John-Mark Gurney <jmg@funkthat.com> wrote: > > > b/crtn.o: warning: linking PIC files with non-PIC files > > I think that this is an issue in our import of clang. I'll have to check > whether I upstreamed the code, but it's basically just not setting the > e_flags field in the ELF header correctly (this required a little bit of > tweaking in LLVM, because MIPS is the only platform that uses e_flags in > quite this way - for everything else you know what the value should be from > the target triple). > > > exect.So: In function `exect': > > (.text+0x18): relocation truncated to fit: R_MIPS_PC16 against `__cerror' > > I believe that this is a limitation of our ld. The PC16 relocation ought > to be made to point to a PLT entry if it's too close, but it is just being > truncated instead. This is fixed in upstream ld-bfd, and hopefully will be > easy to fix with MCLinker if it doesn't already work. I'll see if we can > make clang default to using larger relocation types for things not in the > same compilation unit. Thanks! -adrian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmok3sMK0=6-J3h8CF0h5gJdSNAPzgyELVkDzLDdugK0Ecg>