cvs commit: src/lib/csu/ia64 Makefile crt1.S

Marcel Moolenaar marcel at FreeBSD.org
Sun Jul 13 16:11:38 PDT 2003


marcel      2003/07/13 16:11:37 PDT

  FreeBSD src repository

  Modified files:
    lib/csu/ia64         Makefile 
  Added files:
    lib/csu/ia64         crt1.S 
  Log:
  Rewite _start(). We cannot use a C function due to the fact that we
  don't call it according to the runtime specification and especially
  WRT to gp this can cause trouble. The gcc 3.3.1 import broke the
  ia64 runtime because the compiler saved gp prior to us being able
  to set it properly. Restoring gp after the calls would then invalidate
  gp and cause segmentation faults later on.
  By rewriting _start() as an assembly function, we also avoided even
  more gcc dependences, by trying to use gcc specific features to work
  around the problem.
  This version of _start() does not reference _DYNAMIC. We register the
  cleanup function when it's a non-NULL pointer. The kernel will always
  pass a NULL pointer and dynamic linkers may pass a non-NULL pointer.
  
  The machine independent code to set __progname now unfortunately is
  written in assembly. So be it.
  
  Revision  Changes    Path
  1.12      +2 -2      src/lib/csu/ia64/Makefile
  1.1       +191 -0    src/lib/csu/ia64/crt1.S (new)


More information about the cvs-src mailing list