This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix build with compiler defining __i686 (bug 411)

On Fri, 3 Feb 2012, Roland McGrath wrote:

> > There is no SETUP_PIC_REG_STR; sysdeps/unix/sysv/linux/i386/sysdep.h
> > still has its own copy of the thunk inside an asm after this patch.
> Then add to the list: macroize inline asm instances of the thunk.

There is exactly one such inline asm instance.  You mean add a macro 
expanding to a string version of LOAD_PIC_REG (for that is what 
check_consistency in sysdeps/unix/sysv/linux/i386/sysdep.h is doing) and 
use it in that one place?

> > I added a .p2align directive to SETUP_PIC_REG since most of the removed 
> > copies of the thunk had it, and moved SETUP_PIC_REG and LOAD_PIC_REG 
> > outside a PIC conditional since some of the IFUNC uses require the GOT / 
> > PIC register setup even for static linking.
> That makes sense.


> > +/* Copyright (C) 2002-2004,2006-2007,2009,2010,2012
> > +   Free Software Foundation, Inc.
> Not a blocker, but I think we can now canonicalize these to:
> /* Copyright (C) 2002-2012 Free Software Foundation, Inc.

I haven't done that because given Carlos's question when I suggested it 
I'm waiting on confirmation from bug-standards regarding the rules for 
collapsing ranges.

> The substantive changes look fine to me, but this sort of mechanical thing
> is prone to unnoticed typos and such.  I think this change should have no
> effect whatsoever on linked code, so verifying matching disassembly from
> before and after on at least lib{c,m,pthread}.so seems wiser than just
> relying on the test suite.

The increased alignment on thunks means you get differences (LOAD_PIC_REG 
was already used in sysdeps/i386/fpu, for example, and there were 
previously no instances of the dx thunk with the extra alignment).  It's 
fully in accordance with the alignment used in the ENTRY macro in sysdep.h 
- a benefit of using the macros more consistently is that such unnecessary 
differences between files using the thunks are eliminated - but it does 
mean that you can't just compare the linked libraries.

Joseph S. Myers

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