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/amd64/Makefile
          +++ new/usr/src/cmd/sgs/rtld/amd64/Makefile
↓ open down ↓ 40 lines elided ↑ open up ↑
  41   41  P_MACHOBJS=     amd64_elf.o     _setup.o        dlamd64getunwind.o
  42   42  
  43   43  CP_MACHOBJS=
  44   44  
  45   45  S_MACHOBJS=     
  46   46  
  47   47  P_ASOBJS=       boot.o          boot_elf.o      caller.o
  48   48  
  49   49  S_ASOBJS=       
  50   50  
  51      -CRTSRCS=        ../../../../lib/common/amd64
       51 +CRTSRCS=        ../../../../lib/crt/amd64
  52   52  CRTI=           pics/crti.o
  53   53  CRTN=           pics/crtn.o
  54   54  CRTS=           $(CRTI)         $(CRTN)
  55   55  
  56   56  include         $(SRC)/cmd/sgs/rtld/Makefile.com
  57   57  include         $(SRC)/lib/Makefile.lib.64
  58   58  
  59   59  # We build 64-bit objects with gcc by default
  60   60  MAPFILE-ORDER =                 ../common/mapfile-order-devpro
  61   61  $(__GNUC64)MAPFILE-ORDER =      ../common/mapfile-order-gcc
↓ open down ↓ 35 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX