public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "msc at linux dot ibm.com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/100912] powerpc64le: ieee128 long double incorrectly printed when using shared libstdc++
Date: Mon, 07 Jun 2021 13:27:41 +0000	[thread overview]
Message-ID: <bug-100912-4-g9uChBh30k@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100912-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100912

--- Comment #3 from Matheus Castanho <msc at linux dot ibm.com> ---
Using objdump -dr ~/usr/lib64/libstdc++.so.6:

[...]
00000000000c9340 <_ZSt16__convert_from_vRKP15__locale_structPciPKcz>:
   c9340:       25 00 4c 3c     addis   r2,r12,37
   c9344:       c0 c5 42 38     addi    r2,r2,-14912
   c9348:       a6 02 08 7c     mflr    r0
   c934c:       e8 ff a1 fb     std     r29,-24(r1)
   c9350:       f0 ff c1 fb     std     r30,-16(r1)
   c9354:       78 33 dd 7c     mr      r29,r6
   c9358:       f8 ff e1 fb     std     r31,-8(r1)
   c935c:       78 2b be 7c     mr      r30,r5
   c9360:       78 23 9f 7c     mr      r31,r4
   c9364:       10 00 01 f8     std     r0,16(r1)
   c9368:       c1 ff 21 f8     stdu    r1,-64(r1)
   c936c:       80 00 e1 f8     std     r7,128(r1)
   c9370:       88 00 01 f9     std     r8,136(r1)
   c9374:       98 00 41 f9     std     r10,152(r1)
   c9378:       90 00 21 f9     std     r9,144(r1)
   c937c:       00 00 63 e8     ld      r3,0(r3)
   c9380:       e1 07 ff 4b     bl      b9b60
<000006bf.plt_call.__uselocale@@GLIBC_2.17>
   c9384:       18 00 41 e8     ld      r2,24(r1)
   c9388:       78 eb a5 7f     mr      r5,r29
   c938c:       78 f3 c4 7f     mr      r4,r30
   c9390:       80 00 c1 38     addi    r6,r1,128
   c9394:       78 1b 69 7c     mr      r9,r3
   c9398:       78 fb e3 7f     mr      r3,r31
   c939c:       78 4b 3e 7d     mr      r30,r9
   c93a0:       01 7f ff 4b     bl      c12a0
<000006bf.plt_call.vsnprintf@@GLIBC_2.17>
   c93a4:       18 00 41 e8     ld      r2,24(r1)
   c93a8:       78 1b 7f 7c     mr      r31,r3
   c93ac:       78 f3 c3 7f     mr      r3,r30
   c93b0:       b1 07 ff 4b     bl      b9b60
<000006bf.plt_call.__uselocale@@GLIBC_2.17>
   c93b4:       18 00 41 e8     ld      r2,24(r1)
   c93b8:       40 00 21 38     addi    r1,r1,64
   c93bc:       78 fb e3 7f     mr      r3,r31
   c93c0:       10 00 01 e8     ld      r0,16(r1)
   c93c4:       e8 ff a1 eb     ld      r29,-24(r1)
   c93c8:       f0 ff c1 eb     ld      r30,-16(r1)
   c93cc:       f8 ff e1 eb     ld      r31,-8(r1)
   c93d0:       a6 03 08 7c     mtlr    r0
   c93d4:       20 00 80 4e     blr
   c93d8:       00 00 00 00     .long 0x0
   c93dc:       00 09 00 01     .long 0x1000900
   c93e0:       80 03 00 00     .long 0x380
   c93e4:       00 00 00 60     nop
   c93e8:       00 00 00 60     nop
   c93ec:       00 00 00 60     nop

[...]


Using LD_LIBRARY_PATH instead of LD_PRELOAD shows the same behavior:

~/build/gcc> LD_LIBRARY_PATH=~/usr/lib64/ ./test-shared 
6.95326e-310


Adding LD_DEBUG=libs shows that it is indeed using the libstdc++ I built:

~/build/gcc> LD_LIBRARY_PATH=~/usr/lib64/ LD_DEBUG=libs ./test-shared           
     38216:     find library=libstdc++.so.6 [0]; searching                      
     38216:      search
path=/home/mscastanho/usr/lib64/glibc-hwcaps/power9:/home/mscastanho/usr/lib64/tls/power9/altivec/dfp:/home/mscastanho/usr/lib64/tls/power9/altivec:/home/
mscastanho/usr/lib64/tls/power9/dfp:/home/mscastanho/usr/lib64/tls/power9:/home/mscastanho/usr/lib64/tls/altivec/dfp:/home/mscastanho/usr/lib64/tls/altivec:/home/mscastanho/usr/l
ib64/tls/dfp:/home/mscastanho/usr/lib64/tls:/home/mscastanho/usr/lib64/power9/altivec/dfp:/home/mscastanho/usr/lib64/power9/altivec:/home/mscastanho/usr/lib64/power9/dfp:/home/ms
castanho/usr/lib64/power9:/home/mscastanho/usr/lib64/altivec/dfp:/home/mscastanho/usr/lib64/altivec:/home/mscastanho/usr/lib64/dfp:/home/mscastanho/usr/lib64
             (LD_LIB
RARY_PATH)                                                                      
     38216:       trying
file=/home/mscastanho/usr/lib64/glibc-hwcaps/power9/libstdc++.so.6
     38216:       trying
file=/home/mscastanho/usr/lib64/tls/power9/altivec/dfp/libstdc++.so.6           
     38216:       trying
file=/home/mscastanho/usr/lib64/tls/power9/altivec/libstdc++.so.6               
     38216:       trying
file=/home/mscastanho/usr/lib64/tls/power9/dfp/libstdc++.so.6                  
                                                                             
38216:       trying file=/home/mscastanho/usr/lib64/tls/power9/libstdc++.so.6   
     38216:       trying
file=/home/mscastanho/usr/lib64/tls/altivec/dfp/libstdc++.so.6                 
                                                                             
38216:       trying file=/home/mscastanho/usr/lib64/tls/altivec/libstdc++.so.6  
     38216:       trying file=/home/mscastanho/usr/lib64/tls/dfp/libstdc++.so.6 
     38216:       trying file=/home/mscastanho/usr/lib64/tls/libstdc++.so.6     
     38216:       trying
file=/home/mscastanho/usr/lib64/power9/altivec/dfp/libstdc++.so.6              
                                                                             
38216:       trying
file=/home/mscastanho/usr/lib64/power9/altivec/libstdc++.so.6   
     38216:       trying
file=/home/mscastanho/usr/lib64/power9/dfp/libstdc++.so.6                      
                                                                             
38216:       trying file=/home/mscastanho/usr/lib64/power9/libstdc++.so.6       
     38216:       trying
file=/home/mscastanho/usr/lib64/altivec/dfp/libstdc++.so.6                      
     38216:       trying file=/home/mscastanho/usr/lib64/altivec/libstdc++.so.6 
     38216:       trying file=/home/mscastanho/usr/lib64/dfp/libstdc++.so.6     
     38216:       trying file=/home/mscastanho/usr/lib64/libstdc++.so.6        
                                                                               
                       38216:                                                   
     38216:     find library=libm.so.6 [0]; searching                          
                                                                               
                       38216:      search path=/home/mscastanho/usr/lib64      
  (LD_LIBRARY_PATH)                                                             
     38216:       trying file=/home/mscastanho/usr/lib64/libm.so.6              
     38216:      search cache=/etc/ld.so.cache                                 
                                                                               
                       38216:       trying file=/lib64/libm.so.6                
     38216:                                                                    
                                                                               
                       38216:     find library=libgcc_s.so.1 [0]; searching     
     38216:      search path=/home/mscastanho/usr/lib64        
(LD_LIBRARY_PATH)                                                              
                                       38216:       trying
file=/home/mscastanho/usr/lib64/libgcc_s.so.1       
     38216:                                                                    
                                                                               
                       38216:     find library=libc.so.6 [0]; searching         
     38216:      search path=/home/mscastanho/usr/lib64        
(LD_LIBRARY_PATH)                                                              
                                       38216:       trying
file=/home/mscastanho/usr/lib64/libc.so.6          
     38216:      search cache=/etc/ld.so.cache                                  
     38216:       trying file=/lib64/libc.so.6                                 
                                                                               
                       38216:                                                   
     38216:                                                                    
                                                                               
                       38216:     calling init: /lib64/ld64.so.2                
     38216:                                                                  
     38216:                                                                    
                                                                               
                       38216:     calling init: /lib64/libc.so.6                
     38216:                                                                    
                                                                               
                       38216:                                                  
                                                                               
                                         38216:     calling init:
/home/mscastanho/usr/lib64/libgcc_s.so.1              
     38216:                                                                    
                                                                               
                       38216:                                                   
     38216:     calling init: /lib64/libm.so.6                                  
     38216:                                                                    
                                                                               
                       38216:                                          
     38216:     calling init: /home/mscastanho/usr/lib64/libstdc++.so.6        
                                                                               
                       38216:                               
     38216:                                                   
     38216:     initialize program: ./test-shared                              
                                                                               
                       38216:                                          
     38216:                                                                    
                                                                               
                       38216:     transferring control: ./test-shared           
     38216:                                                                    
                                                                               
                  6.95325e-310                              
     38216:                                                                    
                                                                               
                       38216:     calling fini: ./test-shared [0]               
     38216:                                                                    
                                                                               
                       38216:                                          
     38216:     calling fini: /home/mscastanho/usr/lib64/libstdc++.so.6 [0]     
     38216:                                                                    
                                                                               
                       38216:                               
     38216:     calling fini: /lib64/libm.so.6 [0]                             
                                                                               
                       38216:                                          
     38216:                                                                    
                                                                               
                       38216:     calling fini:
/home/mscastanho/usr/lib64/libgcc_s.so.1 [0]

  parent reply	other threads:[~2021-06-07 13:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-04 18:51 [Bug libstdc++/100912] New: " msc at linux dot ibm.com
2021-06-04 22:27 ` [Bug target/100912] " pinskia at gcc dot gnu.org
2021-06-05 10:51 ` redi at gcc dot gnu.org
2021-06-07 13:27 ` msc at linux dot ibm.com [this message]
2021-06-07 13:50 ` msc at linux dot ibm.com
2021-10-11 10:08 ` [Bug libstdc++/100912] " qiu.chaofan at outlook dot com
2021-10-13  8:56 ` qiu.chaofan at outlook dot com
2021-10-13  9:16 ` redi at gcc dot gnu.org
2021-10-21  3:47 ` qiu.chaofan at outlook dot com
2021-12-06  6:26 ` qiu.chaofan at outlook dot com
2022-01-10  9:57 ` qiu.chaofan at outlook dot com
2022-01-10 10:01 ` redi at gcc dot gnu.org
2022-02-14 17:27 ` cvs-commit at gcc dot gnu.org
2022-02-14 17:29 ` redi at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-100912-4-g9uChBh30k@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).