bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/20852] glibc/MIPS strfry call strlen by bal not jalr


From: ma.jiang at zte dot com.cn
Subject: [Bug ld/20852] glibc/MIPS strfry call strlen by bal not jalr
Date: Thu, 24 Nov 2016 03:39:22 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=20852

--- Comment #4 from ma.jiang at zte dot com.cn ---
Hi all,
  I have checked the source code of strfry.c ,and the build process. I believe
that the generated binary is OK. In the strfry.s (add -save-temps ,and
recompile strfry.c to get it), we get the following chunk.
        .loc 1 38 0
        ld      $25,%got_disp(__GI_strlen)($28)
        .reloc  1f,R_MIPS_JALR,__GI_strlen
1:      jalr    $25
  It is clear that strfry.c call the hidden symbol __GI_strlen instead of
normal strlen. So the optimized binary is OK. GLIBC has made some small tricks
in include/string.h which change many global symbols to internal hidden ones.
  At last, I think the superfluous load should really be eliminated. I know
this might not be that easy as it looks.But with a little help of
compiler(build a connection between the ld insn and corresponding jalr), I
believe we could make it.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

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