[PATCH] kbuild: fix and improve MIPS REL handling



Add R_MIPS_32 relocation case.
And there is no need to do sign-extention on calculation of addend.

Signed-off-by: Atsushi Nemoto <anemo@xxxxxxxxxxxxx>
---
This is a patch against kbuild-tree.

--- linux-kbuild/scripts/mod/modpost.c 2007-05-22 01:14:45.000000000 +0900
+++ linux/scripts/mod/modpost.c 2007-05-22 01:11:03.000000000 +0900
@@ -967,11 +967,14 @@ static int addend_mips_rel(struct elf_in
inst = TO_NATIVE(*location);
switch (r_typ) {
case R_MIPS_LO16:
- r->r_addend = ((inst & 0xffff) ^ 0x8000) - 0x8000;
+ r->r_addend = inst & 0xffff;
break;
case R_MIPS_26:
r->r_addend = (inst & 0x03ffffff) << 2;
break;
+ case R_MIPS_32:
+ r->r_addend = inst;
+ break;
}
return 0;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [PATCH][RESEND] New type of DTV2000H TV Card
    ... But I had installed GPG and signed my patch, maybe this is what I should have done earlier. ... This piece of code used to switch the input of RF signal to "Air Antenna" ... if this patch (and driver) would be able to switch RF ... inputs in DVB-T mode somehow. ...
    (Linux-Kernel)
  • Re: CV Backbox Cirqus Luck Switch
    ... enough to spin the plastic spinner below the switch most of the time. ... blue ball which is heavier, makes it work every time now. ... plastic completely away around the metal bracket. ... fiberglass patch kit that is about 3x6. ...
    (rec.games.pinball)
  • Re: Switching from Nicoderm patches to gum or lozenges??
    ... I say switch, if you get crazy, slap on a patch. ... elevated welts, that itch and burn. ... good luck with the lozenges or gum? ...
    (alt.support.stop-smoking)
  • Re: My wiring job.
    ... with a three way switch for the ceiling light, ... If you re cut the top of your sheet rock opening level, ... have done a good job of framing for the patch. ... putting screws into the wire. ...
    (alt.home.repair)
  • 2.6.7-bk16, mode-switch-in-fbcon_blank.patch breaks X on r128
    ... I can switch to ... Not sure if this has repercussions with the other drivers, but this patch ... 0x10000 /* mode change request ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)