| To: | Ralf Baechle <ralf@linux-mips.org> |
|---|---|
| Subject: | Re: Relocation problem with MIPS kernel modules |
| From: | David VomLehn <dvomlehn@cisco.com> |
| Date: | Mon, 3 Aug 2009 11:19:58 -0700 |
| Authentication-results: | sj-dkim-1; header.From=dvomlehn@cisco.com; dkim=pass ( sig from cisco.com/sjdkim1004 verified; ); |
| Cc: | GCC Help Mailing List <gcc-help@gcc.gnu.org>, Linux MIPS Mailing List <linux-mips@linux-mips.org> |
| Dkim-signature: | v=1; a=rsa-sha256; q=dns/txt; l=1630; t=1249323598; x=1250187598; c=relaxed/simple; s=sjdkim1004; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=dvomlehn@cisco.com; z=From:=20David=20VomLehn=20<dvomlehn@cisco.com> |Subject:=20Re=3A=20Relocation=20problem=20with=20MIPS=20ke rnel=20modules |Sender:=20; bh=3C8FkEp8z1smxkIIQBRVbvhvmIWMqLZECLMFJs6HTUY=; b=uEDgULWT0+aYvLDz7aM8fMO2xlN3HoCpUjfCH4kdYYqqa6dUMua/h5l+X1 AkqcVd7Ysg4KfRak7lSe3ndeTcScWA77jPC+8AeOHGz55eOJQzXoVfig1OmZ 9MPUmT4z9AM0cit6sji79CJ94HoYpVxkgIwyPo2sU4m5cifxanOfQ=; |
| In-reply-to: | <20090803092030.GB30431@linux-mips.org> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <20090730184923.GA27030@cuplxvomd02.corp.sa.net> <20090803092030.GB30431@linux-mips.org> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | Mutt/1.5.18 (2008-05-17) |
On Mon, Aug 03, 2009 at 10:20:30AM +0100, Ralf Baechle wrote: > On Thu, Jul 30, 2009 at 11:49:23AM -0700, David VomLehn wrote: > > > To: GCC Help Mailing List <gcc-help@gcc.gnu.org>, > > Linux MIPS Mailing List <linux-mips@linux-mips.org> > > Subject: Relocation problem with MIPS kernel modules > > Content-Type: text/plain; charset=us-ascii > > > > I have a MIPS loadable kernel module that, when I try to insmod it, causes > > the > > kernel to emit the message: > > > > module xyz: dangerous relocation ... > > According to the MIPS ABI, for what it's worth, "Each relocation type of > > R_MIPS_HI16 must have an associated R_MIPS_LO16 entry immediately following > > it in the list of relocations." So, what's actually getting generated by > > gcc and linker differs from the closest thing we have to an ABI of record > > for > > MIPS processors. > > The GNU tools as an extension over the MIPS ABI allows an arbitrary number of > R_MIPS_HI16 relocations to be followed by a R_MIPS_LO16 symbol. All > relocations of this sequence must use the same symbol, of course. This is > a very old extension; I think it predates the Linux/MIPS port. Perhaps a foolish question, but is this documented anywhere? I know there is a a document over at http://gcc.gnu.org/gcc-3.4/mips-abi.html addressing some other MIPS ABI changes, but I didn't see this one. Obviously, we could put documentation on the linux-mips Wiki, with pointers to other documents, but I'm not sure this is the right place. I'm also concerned there could be other ABI changes/extensions that need to be included. > Ralf David |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Relocation problem with MIPS kernel modules, Ralf Baechle |
|---|---|
| Next by Date: | Re: Relocation problem with MIPS kernel modules, David Daney |
| Previous by Thread: | Re: Relocation problem with MIPS kernel modules, Ralf Baechle |
| Next by Thread: | Re: Relocation problem with MIPS kernel modules, David Daney |
| Indexes: | [Date] [Thread] [Top] [All Lists] |