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

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/link/Makefile
          +++ new/usr/src/cmd/link/Makefile
↓ open down ↓ 42 lines elided ↑ open up ↑
  43   43  all: $(PROG) $(XPG4)
  44   44  
  45   45  $(PROG) $(XPG4): $$(OBJS)
  46   46          $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
  47   47          $(POST_PROCESS)
  48   48  
  49   49  install: all $(ROOTUSRSBINPROG) $(ROOTXPG4PROG)
  50   50          -$(RM) $(ROOTETCPROG)
  51   51          -$(SYMLINK) ../usr/sbin/$(PROG) $(ROOTETCPROG)
  52   52  
  53      -values-xpg4.o: ../../lib/common/common/values-xpg4.c
  54      -        $(COMPILE.c) -o $@ ../../lib/common/common/values-xpg4.c
       53 +values-xpg4.o: ../../lib/crt/common/values-xpg4.c
       54 +        $(COMPILE.c) -o $@ ../../lib/crt/common/values-xpg4.c
  55   55  
  56   56  clean:
  57   57          $(RM) $(OBJS)
  58   58  
  59   59  lint:   lint_PROG
  60   60  
  61   61  include ../Makefile.targ
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX