Re: [PATCH] module relocation code

From: David Mosberger <davidm_at_napali.hpl.hp.com>
Date: 2004-04-22 09:01:17
>>>>> On Thu, 22 Apr 2004 00:50:59 +0200 (CEST), Jean-Marc Saffroy <jean-marc.saffroy@ext.bull.net> said:

  Jean-Marc> When val and location are both in init or both in core,
  Jean-Marc> there's nothing to do[*]. When val and location are in
  Jean-Marc> different areas, I always use a plt (and then a function
  Jean-Marc> descriptor for val is needed if val is in the module).

Yes, the code is probably fine, but I think it could be structured
better for better.

  Jean-Marc> [*] unless the text grows larger than 32MB, now that I
  Jean-Marc> think about it. It may be better to use a plt depending
  Jean-Marc> on the offset between val and plt, after all.

The entire kernel is much smaller than that.  Let's not overengineer
the solution.  As long as the >32MB case is detected and a suitable
error message is printed, that should be fine.

BTW: a PLT is also a bit of overkill.  What you're doing is similar to
what the GNU linker calls "relaxation" (extending the reach of a
branch), since the gp value is the same for the caller and the callee.

	--david
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Apr 21 19:05:18 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:25 EST