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/lib/Makefile
          +++ new/usr/src/lib/Makefile
↓ open down ↓ 35 lines elided ↑ open up ↑
  36   36  #       This is a minor bug which probably should be fixed.
  37   37  #       Note also that a few extra libraries are kept in cmd source.
  38   38  #
  39   39  # Certain libraries are linked with, hence depend on, other libraries.
  40   40  # Library dependencies are called out explicitly, see "Library
  41   41  # interdependencies" below.
  42   42  .PARALLEL:
  43   43  
  44   44  # Build libc and its dependencies
  45   45  SUBDIRS=                        \
  46      -        common                  \
       46 +        crt                     \
  47   47          ../cmd/sgs/libconv      \
  48   48          ../cmd/sgs/libdl        \
  49   49          libc                    \
  50   50          .WAIT
  51   51  
  52   52  # Build libraries with lots of dependents
  53   53  SUBDIRS +=              \
  54   54          libm            \
  55   55          libmd           \
  56   56          libmp           \
↓ open down ↓ 486 lines elided ↑ open up ↑
 543  543  
 544  544  clean clobber lint:     $(NOWAIT_SUBDIRS:%=%-nodepend)
 545  545  
 546  546  install_h check:        $(HDRSUBDIRS:%=%-nodepend)
 547  547  
 548  548  _msg:                   $(MSGSUBDIRS:%=%-nodepend) .WAIT _dc
 549  549  
 550  550  _dc:                    $(DCSUBDIRS:%=%-nodepend)
 551  551  
 552  552  # Library interdependencies are called out explicitly here.
 553      -../cmd/sgs/libconv: common
 554      -../cmd/sgs/libdl: common
      553 +../cmd/sgs/libconv: crt
      554 +../cmd/sgs/libdl: crt
 555  555  libc:           ../cmd/sgs/libconv ../cmd/sgs/libdl
 556  556  
 557  557  libm:           libc
 558  558  libmd:          libc
 559  559  libmp:          libc
 560  560  libnsl:         libc libmd libmp
 561  561  libnvpair:      libc libnsl
 562  562  libsocket:      libc libnsl
 563  563  
 564  564  basedeps:       libc libm libmd libmp libnsl libnvpair libsocket
↓ open down ↓ 158 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX