Fix our x86 PIC_PROLOGUE.
The old definition only worked for functions that didn't use numbered local labels. Upstream uses '666' not only as some kind of BSD in-joke, but also because there's little likelihood of any function having labels that high. There's a wider question about whether we actually want to go via the PLT at all in this code, but that's a question for another day. Bug: 16906712 Change-Id: I3cd8ecc448b33f942bb6e783931808ef39091489
This commit is contained in:
		@@ -39,10 +39,10 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#define PIC_PROLOGUE	\
 | 
					#define PIC_PROLOGUE	\
 | 
				
			||||||
	pushl	%ebx;	\
 | 
						pushl	%ebx;	\
 | 
				
			||||||
	call	1f;	\
 | 
						call	666f;	\
 | 
				
			||||||
1:			\
 | 
					666:			\
 | 
				
			||||||
	popl	%ebx;	\
 | 
						popl	%ebx;	\
 | 
				
			||||||
	addl	$_GLOBAL_OFFSET_TABLE_+[.-1b], %ebx
 | 
						addl	$_GLOBAL_OFFSET_TABLE_+[.-666b], %ebx
 | 
				
			||||||
#define PIC_EPILOGUE	\
 | 
					#define PIC_EPILOGUE	\
 | 
				
			||||||
	popl	%ebx
 | 
						popl	%ebx
 | 
				
			||||||
#define PIC_PLT(x)	x@PLT
 | 
					#define PIC_PLT(x)	x@PLT
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user