Changeset aef6d90 in rtems-tools


Ignore:
Timestamp:
Sep 16, 2012, 11:37:29 PM (9 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, 5, master
Children:
7461924
Parents:
1ec9633
Message:

Update the help to something useful.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • linkers/main.cpp

    r1ec9633 raef6d90  
    11/*
    2  * Copyright (c) 2011, Chris Johns <chrisj@rtems.org> 
     2 * Copyright (c) 2011, Chris Johns <chrisj@rtems.org>
    33 *
    44 * Permission to use, copy, modify, and/or distribute this software for any
    55 * purpose with or without fee is hereby granted, provided that the above
    66 * copyright notice and this permission notice appear in all copies.
    7  * 
     7 *
    88 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    99 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
     
    8383usage (int exit_code)
    8484{
    85   std::cerr << "rtems-ld [-hvVdMwnS] [-e exec-prefix] [-a arch] [-c cpu] [-e entry] "
    86             << "[-d define] [-u undefined] [-L path] [-l libraries] [-o output] [-b base] objects"
    87             << std::endl;
     85  std::cout << "rtems-ld [options] objects" << std::endl
     86            << "Options and arguments:" << std::endl
     87            << " -h        : help (also --help)" << std::endl
     88            << " -V        : print linker version number and exit (also --version)" << std::endl
     89            << " -v        : verbose (trace import parts), can be supply multiple times" << std::endl
     90            << "             to increase verbosity (also --verbose)" << std::endl
     91            << " -w        : generate warnings (also --warn)" << std::endl
     92            << " -M        : generate map output (also --map)" << std::endl
     93            << " -o file   : linker output is written to file (also --output)" << std::endl
     94            << " -L path   : path to a library, add multiple for more than" << std::endl
     95            << "             one path (also --lib-path)" << std::endl
     96            << " -l lib    : add lib to the libraries searched, add multiple" << std::endl
     97            << "             for more than one library (also --lib)" << std::endl
     98            << " -n        : do not search standard libraries (also --no-stdlibs)" << std::endl
     99            << " -E prefix : the RTEMS tool prefix (also --exec-prefix)" << std::endl
     100            << " -a march  : machine architecture (also --march)" << std::endl
     101            << " -c cpu    : machine architecture's CPU (also --mcpu)" << std::endl
     102            << " -e entry  : entry point symbol (also --entry)" << std::endl
     103            << " -d sym    : add the symbol definition, add multiple with" << std::endl
     104            << "             more than one define (also --define)" << std::endl
     105            << " -u sym    : add the undefined symbol definition, add multiple" << std::endl
     106            << "             for more than one undefined symbol (also --undefined)" << std::endl
     107            << " -b elf    : read the ELF file symbols as the base RTEMS kernel" << std::endl
     108            << "             image (also --base)" << std::endl
     109            << " -S script : linker output is a script file (also --script)" << std::endl;
    88110  ::exit (exit_code);
    89111}
     
    96118  rld::process::temporaries.clean_up ();
    97119
    98   /* 
     120  /*
    99121   * Get the same signal again, this time not handled, so its normal effect
    100    * occurs. 
     122   * occurs.
    101123   */
    102124  kill (getpid (), signum);
     
    157179      if (opt < 0)
    158180        break;
    159    
     181
    160182      switch (opt)
    161183      {
    162184        case 'V':
    163           std::cout << "rtems-ld (RTEMS Linker) " << rld::version () 
     185          std::cout << "rtems-ld (RTEMS Linker) " << rld::version ()
    164186                    << std::endl;
    165187          ::exit (0);
    166188          break;
    167        
     189
    168190        case 'v':
    169191          rld::verbose_inc ();
    170192          break;
    171        
     193
    172194        case 'M':
    173195          map = true;
     
    263285    while (argc--)
    264286      objects.push_back (*argv++);
    265    
     287
    266288    /*
    267289     * Add the object files to the cache.
     
    362384  }
    363385  catch (std::exception e)
    364   { 
     386  {
    365387    int   status;
    366388    char* realname;
     
    375397  }
    376398  catch (...)
    377   { 
     399  {
    378400    /*
    379401     * Helps to know if this happens.
Note: See TracChangeset for help on using the changeset viewer.