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/sgs/rtld/sparc/Makefile
          +++ new/usr/src/cmd/sgs/rtld/sparc/Makefile
↓ open down ↓ 39 lines elided ↑ open up ↑
  40   40  P_MACHOBJS=     sparc_elf.o     _setup.o
  41   41  
  42   42  CP_MACHOBJS=    common_sparc.o
  43   43  
  44   44  S_MACHOBJS=     sparc_a.out.o
  45   45  
  46   46  P_ASOBJS=       boot.o          boot_elf.o      caller.o
  47   47  
  48   48  S_ASOBJS=       boot_a.out.o
  49   49  
  50      -CRTSRCS=        ../../../../lib/common/sparc
       50 +CRTSRCS=        ../../../../lib/crt/sparcv7
  51   51  CRTI=           pics/crti.o
  52   52  CRTN=           pics/crtn.o
  53   53  CRTS=           $(CRTI)         $(CRTN)
  54   54  
  55   55  CHKSRCS=        $(SRCBASE)/uts/common/krtld/reloc.h
  56   56  
  57   57  BASEPLAT =      sparc
  58   58  
  59   59  include         $(SRC)/Makefile.master
  60   60  
↓ open down ↓ 32 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX