Print this page
crt: Need a position-independent CRT for PIE
- Implement the greatest possible part of the crt1 in C
- Implement SPARC versions of the ASM sections of crt1
- Build crt1 position-independently, minor ASM updates to be position
  independent
- Implement crt1 with the hook expected by modern GCC to support
  profiling, make gcrt1 a symlink for source compatibility (older GCC
  initializes profiling at firsnt use of _mcount if necessary, so
  doesn't need the gcrt)
- Split the CRT out of developer/library/lint into a separate c-runtime package


1007         $(AIOOBJS)              \
1008         $(RTOBJS)               \
1009         $(SECFLAGSOBJS)         \
1010         $(TPOOLOBJS)            \
1011         $(THREADSOBJS)          \
1012         $(THREADSMACHOBJS)      \
1013         $(THREADSASMOBJS)       \
1014         $(UNICODEOBJS)          \
1015         $(UNWINDMACHOBJS)       \
1016         $(UNWINDASMOBJS)        \
1017         $(COMSYSOBJS)           \
1018         $(SYSOBJS)              \
1019         $(COMSYSOBJS64)         \
1020         $(SYSOBJS64)            \
1021         $(VALUES)
1022 
1023 TRACEOBJS=                      \
1024         plockstat.o
1025 
1026 # NOTE: libc.so.1 must be linked with the minimal crti.o and crtn.o
1027 # modules whose source is provided in the $(SRC)/lib/common directory.
1028 # This must be done because otherwise the Sun C compiler would insert
1029 # its own versions of these modules and those versions contain code
1030 # to call out to C++ initialization functions.  Such C++ initialization
1031 # functions can call back into libc before thread initialization is
1032 # complete and this leads to segmentation violations and other problems.
1033 # Since libc contains no C++ code, linking with the minimal crti.o and
1034 # crtn.o modules is safe and avoids the problems described above.
1035 OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN)
1036 CRTSRCS= ../../common/i386
1037 
1038 LDPASS_OFF=     $(POUND_SIGN)
1039 
1040 # include common library definitions
1041 include ../../Makefile.lib
1042 
1043 # we need to override the default SONAME here because we might
1044 # be building a variant object (still libc.so.1, but different filename)
1045 SONAME = libc.so.1
1046 
1047 CFLAGS += $(CCVERBOSE) $(CTF_FLAGS)
1048 
1049 # This is necessary to avoid problems with calling _ex_unwind().
1050 # We probably don't want any inlining anyway.
1051 XINLINE = -xinline=
1052 CFLAGS += $(XINLINE)
1053 
1054 CERRWARN += -_gcc=-Wno-parentheses
1055 CERRWARN += -_gcc=-Wno-switch
1056 CERRWARN += -_gcc=-Wno-uninitialized




1007         $(AIOOBJS)              \
1008         $(RTOBJS)               \
1009         $(SECFLAGSOBJS)         \
1010         $(TPOOLOBJS)            \
1011         $(THREADSOBJS)          \
1012         $(THREADSMACHOBJS)      \
1013         $(THREADSASMOBJS)       \
1014         $(UNICODEOBJS)          \
1015         $(UNWINDMACHOBJS)       \
1016         $(UNWINDASMOBJS)        \
1017         $(COMSYSOBJS)           \
1018         $(SYSOBJS)              \
1019         $(COMSYSOBJS64)         \
1020         $(SYSOBJS64)            \
1021         $(VALUES)
1022 
1023 TRACEOBJS=                      \
1024         plockstat.o
1025 
1026 # NOTE: libc.so.1 must be linked with the minimal crti.o and crtn.o
1027 # modules whose source is provided in the $(SRC)/lib/crt directory.
1028 # This must be done because otherwise the Sun C compiler would insert
1029 # its own versions of these modules and those versions contain code
1030 # to call out to C++ initialization functions.  Such C++ initialization
1031 # functions can call back into libc before thread initialization is
1032 # complete and this leads to segmentation violations and other problems.
1033 # Since libc contains no C++ code, linking with the minimal crti.o and
1034 # crtn.o modules is safe and avoids the problems described above.
1035 OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN)
1036 CRTSRCS= ../../crt/i86
1037 
1038 LDPASS_OFF=     $(POUND_SIGN)
1039 
1040 # include common library definitions
1041 include ../../Makefile.lib
1042 
1043 # we need to override the default SONAME here because we might
1044 # be building a variant object (still libc.so.1, but different filename)
1045 SONAME = libc.so.1
1046 
1047 CFLAGS += $(CCVERBOSE) $(CTF_FLAGS)
1048 
1049 # This is necessary to avoid problems with calling _ex_unwind().
1050 # We probably don't want any inlining anyway.
1051 XINLINE = -xinline=
1052 CFLAGS += $(XINLINE)
1053 
1054 CERRWARN += -_gcc=-Wno-parentheses
1055 CERRWARN += -_gcc=-Wno-switch
1056 CERRWARN += -_gcc=-Wno-uninitialized