Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=56a974fa2d595fe6ebe433c525b8232ead539b76
Commit:     56a974fa2d595fe6ebe433c525b8232ead539b76
Parent:     ae4ac12323c0ff80528cac3269151d580e23f923
Author:     Sam Ravnborg <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 16 22:39:35 2007 +0200
Committer:  Sam Ravnborg <[EMAIL PROTECTED]>
CommitDate: Mon Jul 16 22:39:35 2007 +0200

    kbuild: make better section mismatch reports on arm
    
    With this change we can find more symbols hereby improving
    the readability of the warnings.
    
    Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]>
---
 scripts/mod/modpost.c |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index b83cddb..256b3d2 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -929,6 +929,26 @@ static int addend_386_rel(struct elf_info *elf, int 
rsection, Elf_Rela *r)
        return 0;
 }
 
+static int addend_arm_rel(struct elf_info *elf, int rsection, Elf_Rela *r)
+{
+       unsigned int r_typ = ELF_R_TYPE(r->r_info);
+
+       switch (r_typ) {
+       case R_ARM_ABS32:
+               /* From ARM ABI: (S + A) | T */
+               r->r_addend = (int)(long)(elf->symtab_start + 
ELF_R_SYM(r->r_info));
+               break;
+       case R_ARM_PC24:
+               /* From ARM ABI: ((S + A) | T) - P */
+               r->r_addend = (int)(long)(elf->hdr + 
elf->sechdrs[rsection].sh_offset +
+                                         (r->r_offset - 
elf->sechdrs[rsection].sh_addr));
+               break;
+       default:
+               return 1;
+       }
+       return 0;
+}
+
 static int addend_mips_rel(struct elf_info *elf, int rsection, Elf_Rela *r)
 {
        unsigned int r_typ = ELF_R_TYPE(r->r_info);
@@ -1051,6 +1071,10 @@ static void check_sec_ref(struct module *mod, const char 
*modname,
                                        if (addend_386_rel(elf, i, &r))
                                                continue;
                                        break;
+                               case EM_ARM:
+                                       if(addend_arm_rel(elf, i, &r))
+                                               continue;
+                                       break;
                                case EM_MIPS:
                                        if (addend_mips_rel(elf, i, &r))
                                                continue;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to