bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bugs in the mips64*-linux* port


From: Kai Ruottu
Subject: Bugs in the mips64*-linux* port
Date: Thu, 04 Apr 2002 13:27:21 +0300

Hi, while trying the glibc-2.2.5 sources for the mips64-linux-gnu and 
mips64el-linux-gnu,
I found some bugs in the file 'sysdeps/mips/mips64/dl-machine.h' and did 
temporary fixes
to get glibc built. The diffs have been attached with this message.

The fixes for the '_dl_lookup_symbol()' calls were done only to get the input 
parameters
to conform with the prototype in the 'sysdeps/generic/ldsodefs.h', and the last 
parameter
to put there ('0') being unclear, if not they all... So the aim with it is only 
to point
to these places and tell that something should be done there by someone who 
knows how to
fix this...

The fixes for the 'typos' in the inline-asm then could be right, I think...

Cheers, Kai
*** /home2/src/glibc-2.2.5-x86_64/sysdeps/mips/mips64/dl-machine.h      Mon Sep 
10 10:05:08 2001
--- ./dl-machine.h      Wed Apr  3 21:34:25 2002
***************
*** 142,150 ****
      ({ \
        const ElfW(Sym) *ref = sym; \
        ElfW(Addr) sym_loadaddr; \
!       sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, \
!                                       map->l_scope, \
!                                       map->l_name, R_MIPS_REL32);\
        (ref)? sym_loadaddr + ref->st_value: 0; \
      })
  
--- 142,149 ----
      ({ \
        const ElfW(Sym) *ref = sym; \
        ElfW(Addr) sym_loadaddr; \
!       sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, map, &ref, \
!                                       map->l_scope, R_MIPS_REL32, 0);\
        (ref)? sym_loadaddr + ref->st_value: 0; \
      })
  
***************
*** 358,366 ****
    /* Look up the symbol's run-time value.  */                               \
    definer = &symtab[sym_index];                                               
      \
                                                                              \
!   loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer,        \
!                               l->l_scope, l->l_name,                        \
!                               R_MIPS_REL32);                                \
                                                                              \
    /* Apply the relocation with that value.  */                                
      \
    funcaddr = loadbase + definer->st_value;                                  \
--- 357,364 ----
    /* Look up the symbol's run-time value.  */                               \
    definer = &symtab[sym_index];                                               
      \
                                                                              \
!   loadbase = _dl_lookup_symbol (strtab + definer->st_name, l, &definer,       
      \
!                               l->l_scope, R_MIPS_REL32, 0);                 \
                                                                              \
    /* Apply the relocation with that value.  */                                
      \
    funcaddr = loadbase + definer->st_value;                                  \
***************
*** 486,492 ****
        dla $7, 8($29)\n\
        dsubu $29, 16\n\
        # Call the function to run the initializers.\n\
!       jal _dl_init
        daddiu $29, 16\n\
        # Pass our finalizer function to the user in ra.\n\
        dla $31, _dl_fini\n\
--- 484,490 ----
        dla $7, 8($29)\n\
        dsubu $29, 16\n\
        # Call the function to run the initializers.\n\
!       jal _dl_init\n\
        daddiu $29, 16\n\
        # Pass our finalizer function to the user in ra.\n\
        dla $31, _dl_fini\n\
***************
*** 498,504 ****
        la $7, 8($29)\n\
        subu $29, 16\n\
        # Call the function to run the initializers.\n\
!       jal _dl_init
        addiu $29, 16\n\
        # Pass our finalizer function to the user in ra.\n\
        dla $31, _dl_fini\n\
--- 496,502 ----
        la $7, 8($29)\n\
        subu $29, 16\n\
        # Call the function to run the initializers.\n\
!       jal _dl_init\n\
        addiu $29, 16\n\
        # Pass our finalizer function to the user in ra.\n\
        dla $31, _dl_fini\n\
***************
*** 506,512 ****
        move $25, $17\n\
        ld $4, 0($29)\n\
        ld $5, 1*8($29)\n\
!       ld $6, 2*8$29)\n\
        ld $7, 3*8($29)\n\
        jr $25\n"\
  _RTLD_EPILOGUE(ENTRY_POINT) \
--- 504,510 ----
        move $25, $17\n\
        ld $4, 0($29)\n\
        ld $5, 1*8($29)\n\
!       ld $6, 2*8($29)\n\
        ld $7, 3*8($29)\n\
        jr $25\n"\
  _RTLD_EPILOGUE(ENTRY_POINT) \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]