This is the mail archive of the gas2@sourceware.cygnus.com mailing list for the gas2 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A very strange/serious gas/gld bug


>>>>> H J Lu <hjl@nynexst.com> writes:

> The bug is very strange :-(. Please try those two files.

> ----foo.s---
> .text
> 	.align 4
> 	.type	 __do_global_dtors_aux,@function
> __do_global_dtors_aux:
> 	ret
> 	.align 4
> 	.type	 fini_dummy,@function
> fini_dummy:
> 	.section	.fini
> 	call __do_global_dtors_aux
> 	.text

This one is compiled incorrectly (call 00000002):

begin 664 foo.o
M?T5,1@$! 0            $  P !               0 0       #0     
M "@ "0 & ,.0D)#H_?___P N<WEM=&%B "YS=')T86( +G-H<W1R=&%B "YT
M97AT "YD871A "YB<W, +F9I;FD +G)E;"YF:6YI                    
M       !               "  $ %P    0          @ !            
M      ,  0                 #  (                  P #        
M          , !   7U]D;U]G;&]B86Q?9'1O<G-?875X &9I;FE?9'5M;7D 
M                                                        &P  
M  $    &         #0    $               $         "$    !    
M P         X                    !          G    "     ,     
M    .                     0         +     $    &         #@ 
M   %               !         #(    )              !X @  "   
M  <    $    !     @    1     P              /0   #P         
M      $          0    (              'P   !P    "     <    $
M    $     D    #              #L    (@               0      
*   !     @$    #
 
end

> ----bar.s---
> .text
> 	.align 4
> 	.type	 __do_global_dtors_aux,@function
> __do_global_dtors_aux:
> 	ret
> 	.align 4
> 	.type	 fini_dummy,@function
> fini_dummy:
> 	.section	.fini
> 	call __do_global_dtors_aux@PLT
> 	.text
> 	ret

This one is compiled correctly (call 00000001):

begin 664 bar.o
M?T5,1@$! 0            $  P !               X 0       #0     
M "@ "0 & ,.0D)##    Z/S___\ +G-Y;71A8@ N<W1R=&%B "YS:'-T<G1A
M8@ N=&5X=  N9&%T80 N8G-S "YF:6YI "YR96PN9FEN:0              
M             0               @ ! !<    $          (  0      
M           #  $                  P "                  ,  P  
M               #  0 (@              $     !?7V1O7V=L;V)A;%]D
M=&]R<U]A=7@ 9FEN:5]D=6UM>0!?1TQ/0D%,7T]&1E-%5%]404),15\     
M                                                 !L    !    
M!@         T    !0              !          A     0    ,     
M    /                     0         )P    @    #         #P 
M                   $         "P    !    !@         \    !0  
M             0         R    "0              H (   @    '    
M!     0    (    $0    ,              $$    \               !
M          $    "              "     @     @    '    !    !  
M   )     P                $  #@               $          0  
%  0!    
 
end