This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports 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: Arch maintainers: new approach for crti.o and crtn.o


From: "Joseph S. Myers" <joseph@codesourcery.com>
Date: Wed, 8 Feb 2012 01:56:03 +0000 (UTC)

> glibc now supports building crti.o and crtn.o (both the csu/ versions and 
> the nptl/ versions) from .S files, instead of the very fragile approach 
> (which kept breaking with GCC changes) of postprocessing .s output from 
> initfini.c and pt-initfini.c to separate function prologues and epilogues 
> into separate files.

Joseph, I have this almost done for sparc but I've run into one snag.

Sparc needs "-fPIC" specified when turning assembler files into objects,
because this changes what relocations are generated.  For example, for
a call instruction R_SPARC_WDISP30 is generated for non-PIC vs.
R_SPARC_WPLT30 for PIC.

This worked beforehand because we go "ASFLAGS-.os = -fPIC" in the
Sparc Makefile fragments.

However, the csu/ and nptl/ Makefile fragments now do the
"$(ASFLAGS-.os)" thing only in the backwards compatability case.  I
need it to happen unconditionally whenever we build crt{i,n}.o and
related objects (such as pt-crti.o).

Is there any particular reason you hid the ASFLAGS stuff exclusively
into the backwards compat case?  I guess it's to deal with the "defs.h"
dependency which doesn't exist when crt{i,n}.S are provided by the
architecture.


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