This is the mail archive of the libc-alpha@sourceware.org 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)


> 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.

> 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.

> > Then perhaps it's time to seriously consider the initfini situation
> > before anything that necessitates really strange kludges inside it.
> 
> I don't think the changes to initfini files regarding __i686 are any 
> stranger than the existing arrangements.

It's just that it's piling on to what's already more than strange enough.
I suspect we can in short order settle on cleanup to make a plain crt[in].S
per machine, with minimal macroization such that pt-crt[in].S is a generic
one #include'ing crt[in].S with macros defined so as to unconditionally
call __pthread_initialize_minimal_internal rather than to conditionally
call __gmon_start.

> I don't see any way to do this, unless maybe you hardcode references to 
> the two names in ld's linker scripts in some way (and that still wouldn't 
> help with gold).

That's what I thought, but I figured it merited a few people trying to come
up with something before giving up.

> +/* 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.

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.


Thanks,
Roland


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