You can subscribe to this list here.
| 2008 | Jan | Feb | Mar (1) | Apr (56) | May (48) | Jun (51) | Jul (55) | Aug (27) | Sep (12) | Oct (14) | Nov (14) | Dec (2) | 
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 | Jan (22) | Feb (12) | Mar (16) | Apr (43) | May (20) | Jun (10) | Jul (63) | Aug (37) | Sep (7) | Oct (1) | Nov (22) | Dec (99) | 
| 2010 | Jan (74) | Feb (36) | Mar (114) | Apr (64) | May (56) | Jun (55) | Jul (27) | Aug (93) | Sep (55) | Oct (40) | Nov (44) | Dec (51) | 
| 2011 | Jan (62) | Feb (35) | Mar (24) | Apr (37) | May (45) | Jun (53) | Jul (95) | Aug (130) | Sep (162) | Oct (115) | Nov (158) | Dec (120) | 
| 2012 | Jan (18) | Feb (55) | Mar (31) | Apr (25) | May (11) | Jun (9) | Jul (8) | Aug (32) | Sep (42) | Oct (45) | Nov (51) | Dec (150) | 
| 2013 | Jan (54) | Feb (16) | Mar (16) | Apr (2) | May (11) | Jun (4) | Jul | Aug (10) | Sep (3) | Oct (1) | Nov | Dec (7) | 
| 2014 | Jan (6) | Feb (3) | Mar (30) | Apr (16) | May (28) | Jun (19) | Jul (6) | Aug | Sep (16) | Oct (4) | Nov (3) | Dec (31) | 
| 2015 | Jan (6) | Feb (2) | Mar (8) | Apr (10) | May (34) | Jun (3) | Jul (9) | Aug (10) | Sep (3) | Oct (7) | Nov (9) | Dec (24) | 
| 2016 | Jan (97) | Feb (39) | Mar (13) | Apr (4) | May (33) | Jun (1) | Jul (1) | Aug (10) | Sep (4) | Oct (4) | Nov (1) | Dec (14) | 
| 2017 | Jan (2) | Feb | Mar | Apr (4) | May | Jun (42) | Jul (2) | Aug (4) | Sep (12) | Oct (3) | Nov (2) | Dec | 
| 2018 | Jan | Feb | Mar (1) | Apr (25) | May (2) | Jun | Jul (3) | Aug | Sep (10) | Oct (17) | Nov (4) | Dec (17) | 
| 2019 | Jan (5) | Feb (27) | Mar (28) | Apr (8) | May (5) | Jun (29) | Jul (10) | Aug (1) | Sep | Oct (1) | Nov (1) | Dec | 
| 2020 | Jan (17) | Feb (31) | Mar (25) | Apr (3) | May (1) | Jun (12) | Jul | Aug (1) | Sep (2) | Oct | Nov (42) | Dec (1) | 
| 2021 | Jan | Feb (8) | Mar (12) | Apr (13) | May | Jun | Jul | Aug | Sep (1) | Oct | Nov | Dec | 
| 2022 | Jan | Feb | Mar (14) | Apr (12) | May (10) | Jun | Jul | Aug | Sep | Oct | Nov | Dec | 
| 2023 | Jan (1) | Feb | Mar (12) | Apr (5) | May | Jun (1) | Jul | Aug | Sep | Oct (15) | Nov | Dec (8) | 
| 2024 | Jan (9) | Feb | Mar (3) | Apr | May | Jun (2) | Jul (7) | Aug | Sep | Oct | Nov (4) | Dec (10) | 
| 2025 | Jan (77) | Feb (51) | Mar | Apr | May | Jun | Jul (1) | Aug (11) | Sep (2) | Oct (52) | Nov | Dec | 
| 
      
      
      From: <hg...@us...> - 2008-04-16 19:01:23
      
     | 
| Revision: 27
          http://elftoolchain.svn.sourceforge.net/elftoolchain/?rev=27&view=rev
Author:   hglee
Date:     2008-04-16 12:01:14 -0700 (Wed, 16 Apr 2008)
Log Message:
-----------
Fix to work cpp demangle subst in i386
Modified Paths:
--------------
    projects/nm/trunk/cpp_demangle.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <hg...@us...> - 2008-04-16 17:44:37
      
     | 
| Revision: 26
          http://elftoolchain.svn.sourceforge.net/elftoolchain/?rev=26&view=rev
Author:   hglee
Date:     2008-04-16 10:44:34 -0700 (Wed, 16 Apr 2008)
Log Message:
-----------
Add boundary check.
Modified Paths:
--------------
    projects/nm/trunk/dwarf_line_number.c
    projects/nm/trunk/dwarf_line_number.h
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <hg...@us...> - 2008-04-16 17:28:57
      
     | 
| Revision: 25
          http://elftoolchain.svn.sourceforge.net/elftoolchain/?rev=25&view=rev
Author:   hglee
Date:     2008-04-16 10:28:54 -0700 (Wed, 16 Apr 2008)
Log Message:
-----------
Fix to use UNUSED macro
Modified Paths:
--------------
    projects/nm/trunk/nm.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <hg...@us...> - 2008-04-16 16:58:24
      
     | 
| Revision: 24
          http://elftoolchain.svn.sourceforge.net/elftoolchain/?rev=24&view=rev
Author:   hglee
Date:     2008-04-16 09:58:18 -0700 (Wed, 16 Apr 2008)
Log Message:
-----------
Untabify usage function for pretty print.
Modified Paths:
--------------
    projects/nm/trunk/nm.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <hg...@us...> - 2008-04-16 11:03:03
      
     | 
| Revision: 23
          http://elftoolchain.svn.sourceforge.net/elftoolchain/?rev=23&view=rev
Author:   hglee
Date:     2008-04-16 04:02:48 -0700 (Wed, 16 Apr 2008)
Log Message:
-----------
Fix to reduce warning in i386.
Modified Paths:
--------------
    projects/nm/trunk/cpp_demangle.c
    projects/nm/trunk/nm.c
    projects/nm/trunk/test/Makefile
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <hg...@us...> - 2008-04-16 10:39:31
      
     | 
| Revision: 22
          http://elftoolchain.svn.sourceforge.net/elftoolchain/?rev=22&view=rev
Author:   hglee
Date:     2008-04-16 03:37:40 -0700 (Wed, 16 Apr 2008)
Log Message:
-----------
Function extraction
Modified Paths:
--------------
    projects/nm/trunk/dwarf_line_number.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <jk...@us...> - 2008-04-16 08:55:23
      
     | 
| Revision: 21
          http://elftoolchain.svn.sourceforge.net/elftoolchain/?rev=21&view=rev
Author:   jkoshy
Date:     2008-04-16 01:55:21 -0700 (Wed, 16 Apr 2008)
Log Message:
-----------
Sync the README with the behaviour of the top-level Makefile as of #r20.
Modified Paths:
--------------
    projects/libelf-test-suite/trunk/README
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <jk...@us...> - 2008-04-16 08:50:03
      
     | 
| Revision: 20
          http://elftoolchain.svn.sourceforge.net/elftoolchain/?rev=20&view=rev
Author:   jkoshy
Date:     2008-04-16 01:50:00 -0700 (Wed, 16 Apr 2008)
Log Message:
-----------
Bug fix: allow 'make' to proceed before obj directories have been created.
Reported by:	yganag
Modified Paths:
--------------
    projects/libelf-test-suite/trunk/Makefile
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <jk...@us...> - 2008-04-16 08:25:44
      
     | 
| Revision: 19
          http://elftoolchain.svn.sourceforge.net/elftoolchain/?rev=19&view=rev
Author:   jkoshy
Date:     2008-04-16 01:25:41 -0700 (Wed, 16 Apr 2008)
Log Message:
-----------
Document the top-level Makefile provided.
Modified Paths:
--------------
    projects/libelf-test-suite/trunk/README
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <hg...@us...> - 2008-04-15 13:34:32
      
     | 
| Revision: 18
          http://elftoolchain.svn.sourceforge.net/elftoolchain/?rev=18&view=rev
Author:   hglee
Date:     2008-04-15 06:34:22 -0700 (Tue, 15 Apr 2008)
Log Message:
-----------
Fix to use C99 stuff
Modified Paths:
--------------
    projects/nm/trunk/Makefile
    projects/nm/trunk/cpp_demangle.c
    projects/nm/trunk/dwarf_line_number.c
    projects/nm/trunk/nm.c
    projects/nm/trunk/test/Makefile
    projects/nm/trunk/vector_str.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <hg...@us...> - 2008-04-14 20:13:48
      
     | 
| Revision: 17
          http://elftoolchain.svn.sourceforge.net/elftoolchain/?rev=17&view=rev
Author:   hglee
Date:     2008-04-14 13:13:44 -0700 (Mon, 14 Apr 2008)
Log Message:
-----------
Style indentation.
Modified Paths:
--------------
    projects/nm/trunk/cpp_demangle.c
    projects/nm/trunk/cpp_demangle.h
    projects/nm/trunk/dwarf_line_number.c
    projects/nm/trunk/dwarf_line_number.h
    projects/nm/trunk/nm.c
    projects/nm/trunk/nm_aout.h
    projects/nm/trunk/test/test_cpp_demangle.c
    projects/nm/trunk/vector_str.c
    projects/nm/trunk/vector_str.h
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <hg...@us...> - 2008-04-14 13:34:06
      
     | 
| Revision: 16
          http://elftoolchain.svn.sourceforge.net/elftoolchain/?rev=16&view=rev
Author:   hglee
Date:     2008-04-14 06:34:02 -0700 (Mon, 14 Apr 2008)
Log Message:
-----------
Style and code clean
Modified Paths:
--------------
    projects/nm/trunk/dwarf_line_number.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <hg...@us...> - 2008-04-14 13:06:05
      
     | 
| Revision: 15
          http://elftoolchain.svn.sourceforge.net/elftoolchain/?rev=15&view=rev
Author:   hglee
Date:     2008-04-14 06:06:00 -0700 (Mon, 14 Apr 2008)
Log Message:
-----------
Add function to reduce duplicated codes
Modified Paths:
--------------
    projects/nm/trunk/dwarf_line_number.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <hg...@us...> - 2008-04-14 12:31:04
      
     | 
| Revision: 14
          http://elftoolchain.svn.sourceforge.net/elftoolchain/?rev=14&view=rev
Author:   hglee
Date:     2008-04-14 05:30:59 -0700 (Mon, 14 Apr 2008)
Log Message:
-----------
Fix to support debug-syms option.
Modified Paths:
--------------
    projects/nm/trunk/nm.1
    projects/nm/trunk/nm.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <hg...@us...> - 2008-04-14 12:02:00
      
     | 
| Revision: 13
          http://elftoolchain.svn.sourceforge.net/elftoolchain/?rev=13&view=rev
Author:   hglee
Date:     2008-04-14 05:01:54 -0700 (Mon, 14 Apr 2008)
Log Message:
-----------
Import from FreeBSD Perforce repo.
Added Paths:
-----------
    projects/nm/trunk/Makefile
    projects/nm/trunk/cpp_demangle.c
    projects/nm/trunk/cpp_demangle.h
    projects/nm/trunk/dwarf_line_number.c
    projects/nm/trunk/dwarf_line_number.h
    projects/nm/trunk/nm.1
    projects/nm/trunk/nm.c
    projects/nm/trunk/nm_aout.c
    projects/nm/trunk/nm_aout.h
    projects/nm/trunk/test/
    projects/nm/trunk/test/Makefile
    projects/nm/trunk/test/test_cpp_demangle.c
    projects/nm/trunk/vector_str.c
    projects/nm/trunk/vector_str.h
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <hg...@us...> - 2008-04-14 11:51:24
      
     | 
| Revision: 12
          http://elftoolchain.svn.sourceforge.net/elftoolchain/?rev=12&view=rev
Author:   hglee
Date:     2008-04-14 04:51:21 -0700 (Mon, 14 Apr 2008)
Log Message:
-----------
Initial repository layout
Added Paths:
-----------
    projects/nm/
    projects/nm/branches/
    projects/nm/tags/
    projects/nm/trunk/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <jk...@us...> - 2008-04-14 10:32:09
      
     | 
| Revision: 11
          http://elftoolchain.svn.sourceforge.net/elftoolchain/?rev=11&view=rev
Author:   jkoshy
Date:     2008-04-14 03:32:07 -0700 (Mon, 14 Apr 2008)
Log Message:
-----------
- Style fixes: paranthesize return expressions, space after the return
  keyword.
- Fix compilation on 64 bit platforms: use the '%j' length modifier to
  widen integer types passed to printf().
Modified Paths:
--------------
    projects/strings/trunk/strings.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <jk...@us...> - 2008-04-07 12:24:35
      
     | 
| Revision: 10
          http://elftoolchain.svn.sourceforge.net/elftoolchain/?rev=10&view=rev
Author:   jkoshy
Date:     2008-04-07 05:24:33 -0700 (Mon, 07 Apr 2008)
Log Message:
-----------
- Correctly handle sections of type SHT_NOBITS.  For these sections:
  - elf_getdata() and elf_rawdata() should return an "Elf_Data" structure
    that has its "d_buf" member set to NULL and "d_size" member set to
    the nominal 'size' of the section.  [1]
  - Update the manual page for these functions.
  Submitted by:		kaiwang27 [1]
- Fix a memory leak in an error handling path inside elf_getdata().
- Use _libelf_allocate_data() in elf_newdata() for consistency.
Modified Paths:
--------------
    projects/libelf/trunk/elf_data.c
    projects/libelf/trunk/elf_getdata.3
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <jk...@us...> - 2008-04-07 12:14:56
      
     | 
| Revision: 9
          http://elftoolchain.svn.sourceforge.net/elftoolchain/?rev=9&view=rev
Author:   jkoshy
Date:     2008-04-07 05:14:54 -0700 (Mon, 07 Apr 2008)
Log Message:
-----------
Remove a superfluous comment.
Modified Paths:
--------------
    projects/libelf/trunk/elf_update.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <kai...@us...> - 2008-04-03 20:59:32
      
     | 
| Revision: 8
          http://elftoolchain.svn.sourceforge.net/elftoolchain/?rev=8&view=rev
Author:   kaiwang27
Date:     2008-04-03 13:59:25 -0700 (Thu, 03 Apr 2008)
Log Message:
-----------
Import a snapshot of elfcopy.
Added Paths:
-----------
    projects/elfcopy/
    projects/elfcopy/branches/
    projects/elfcopy/tags/
    projects/elfcopy/trunk/
    projects/elfcopy/trunk/Makefile
    projects/elfcopy/trunk/elfcopy.h
    projects/elfcopy/trunk/main.c
    projects/elfcopy/trunk/mcs.c
    projects/elfcopy/trunk/sections.c
    projects/elfcopy/trunk/segments.c
    projects/elfcopy/trunk/symbols.c
    projects/elfcopy/trunk/test/
    projects/elfcopy/trunk/test/Makefile
    projects/elfcopy/trunk/test/func.sh
    projects/elfcopy/trunk/test/run.sh
    projects/elfcopy/trunk/test/tc/
    projects/elfcopy/trunk/test/tc/elfcopy-noops-1/
    projects/elfcopy/trunk/test/tc/elfcopy-noops-1/elfcopy-noops-1.err
    projects/elfcopy/trunk/test/tc/elfcopy-noops-1/elfcopy-noops-1.eval
    projects/elfcopy/trunk/test/tc/elfcopy-noops-1/elfcopy-noops-1.out
    projects/elfcopy/trunk/test/tc/elfcopy-noops-1/elfcopy-noops-1.sh
    projects/elfcopy/trunk/test/tc/elfcopy-noops-1/in/
    projects/elfcopy/trunk/test/tc/elfcopy-noops-1/in/elfcopy-noops-1.in.shar
    projects/elfcopy/trunk/test/tc/elfcopy-noops-1/out/
    projects/elfcopy/trunk/test/tc/elfcopy-noops-1/out/elfcopy-noops-1.out.shar
    projects/elfcopy/trunk/test/tc/elfcopy-noops-2/
    projects/elfcopy/trunk/test/tc/elfcopy-noops-2/elfcopy-noops-2.err
    projects/elfcopy/trunk/test/tc/elfcopy-noops-2/elfcopy-noops-2.eval
    projects/elfcopy/trunk/test/tc/elfcopy-noops-2/elfcopy-noops-2.out
    projects/elfcopy/trunk/test/tc/elfcopy-noops-2/elfcopy-noops-2.sh
    projects/elfcopy/trunk/test/tc/elfcopy-noops-2/in/
    projects/elfcopy/trunk/test/tc/elfcopy-noops-2/in/elfcopy-noops-2.in.shar
    projects/elfcopy/trunk/test/tc/elfcopy-noops-2/out/
    projects/elfcopy/trunk/test/tc/elfcopy-noops-2/out/elfcopy-noops-2.out.shar
    projects/elfcopy/trunk/test/tc/elfcopy-noops-3/
    projects/elfcopy/trunk/test/tc/elfcopy-noops-3/elfcopy-noops-3.err
    projects/elfcopy/trunk/test/tc/elfcopy-noops-3/elfcopy-noops-3.eval
    projects/elfcopy/trunk/test/tc/elfcopy-noops-3/elfcopy-noops-3.out
    projects/elfcopy/trunk/test/tc/elfcopy-noops-3/elfcopy-noops-3.sh
    projects/elfcopy/trunk/test/tc/elfcopy-noops-3/in/
    projects/elfcopy/trunk/test/tc/elfcopy-noops-3/in/elfcopy-noops-3.in.shar
    projects/elfcopy/trunk/test/tc/elfcopy-noops-3/out/
    projects/elfcopy/trunk/test/tc/elfcopy-noops-3/out/elfcopy-noops-3.out.shar
    projects/elfcopy/trunk/test/tc/elfcopy-noops-4/
    projects/elfcopy/trunk/test/tc/elfcopy-noops-4/elfcopy-noops-4.err
    projects/elfcopy/trunk/test/tc/elfcopy-noops-4/elfcopy-noops-4.eval
    projects/elfcopy/trunk/test/tc/elfcopy-noops-4/elfcopy-noops-4.out
    projects/elfcopy/trunk/test/tc/elfcopy-noops-4/elfcopy-noops-4.sh
    projects/elfcopy/trunk/test/tc/elfcopy-noops-4/in/
    projects/elfcopy/trunk/test/tc/elfcopy-noops-4/in/elfcopy-noops-4.in.shar
    projects/elfcopy/trunk/test/tc/elfcopy-noops-4/out/
    projects/elfcopy/trunk/test/tc/elfcopy-noops-4/out/elfcopy-noops-4.out.shar
    projects/elfcopy/trunk/test/tc/elfcopy-noops-5/
    projects/elfcopy/trunk/test/tc/elfcopy-noops-5/elfcopy-noops-5.err
    projects/elfcopy/trunk/test/tc/elfcopy-noops-5/elfcopy-noops-5.eval
    projects/elfcopy/trunk/test/tc/elfcopy-noops-5/elfcopy-noops-5.out
    projects/elfcopy/trunk/test/tc/elfcopy-noops-5/elfcopy-noops-5.sh
    projects/elfcopy/trunk/test/tc/elfcopy-noops-5/in/
    projects/elfcopy/trunk/test/tc/elfcopy-noops-5/in/elfcopy-noops-5.in.shar
    projects/elfcopy/trunk/test/tc/elfcopy-noops-5/out/
    projects/elfcopy/trunk/test/tc/elfcopy-noops-5/out/elfcopy-noops-5.out.shar
    projects/elfcopy/trunk/test/tc/strip-all-1/
    projects/elfcopy/trunk/test/tc/strip-all-1/in/
    projects/elfcopy/trunk/test/tc/strip-all-1/in/strip-all-1.in.shar
    projects/elfcopy/trunk/test/tc/strip-all-1/out/
    projects/elfcopy/trunk/test/tc/strip-all-1/out/strip-all-1.out.shar
    projects/elfcopy/trunk/test/tc/strip-all-1/strip-all-1.err
    projects/elfcopy/trunk/test/tc/strip-all-1/strip-all-1.eval
    projects/elfcopy/trunk/test/tc/strip-all-1/strip-all-1.out
    projects/elfcopy/trunk/test/tc/strip-all-1/strip-all-1.sh
    projects/elfcopy/trunk/test/tc/strip-all-2/
    projects/elfcopy/trunk/test/tc/strip-all-2/in/
    projects/elfcopy/trunk/test/tc/strip-all-2/in/strip-all-2.in.shar
    projects/elfcopy/trunk/test/tc/strip-all-2/out/
    projects/elfcopy/trunk/test/tc/strip-all-2/out/strip-all-2.out.shar
    projects/elfcopy/trunk/test/tc/strip-all-2/strip-all-2.err
    projects/elfcopy/trunk/test/tc/strip-all-2/strip-all-2.eval
    projects/elfcopy/trunk/test/tc/strip-all-2/strip-all-2.out
    projects/elfcopy/trunk/test/tc/strip-all-2/strip-all-2.sh
    projects/elfcopy/trunk/test/tc/strip-all-3/
    projects/elfcopy/trunk/test/tc/strip-all-3/in/
    projects/elfcopy/trunk/test/tc/strip-all-3/in/strip-all-3.in.shar
    projects/elfcopy/trunk/test/tc/strip-all-3/out/
    projects/elfcopy/trunk/test/tc/strip-all-3/out/strip-all-3.out.shar
    projects/elfcopy/trunk/test/tc/strip-all-3/strip-all-3.err
    projects/elfcopy/trunk/test/tc/strip-all-3/strip-all-3.eval
    projects/elfcopy/trunk/test/tc/strip-all-3/strip-all-3.out
    projects/elfcopy/trunk/test/tc/strip-all-3/strip-all-3.sh
    projects/elfcopy/trunk/test/tc/strip-all-4/
    projects/elfcopy/trunk/test/tc/strip-all-4/in/
    projects/elfcopy/trunk/test/tc/strip-all-4/in/strip-all-4.in.shar
    projects/elfcopy/trunk/test/tc/strip-all-4/out/
    projects/elfcopy/trunk/test/tc/strip-all-4/out/strip-all-4.out.shar
    projects/elfcopy/trunk/test/tc/strip-all-4/strip-all-4.err
    projects/elfcopy/trunk/test/tc/strip-all-4/strip-all-4.eval
    projects/elfcopy/trunk/test/tc/strip-all-4/strip-all-4.out
    projects/elfcopy/trunk/test/tc/strip-all-4/strip-all-4.sh
    projects/elfcopy/trunk/test/tc/strip-all-5/
    projects/elfcopy/trunk/test/tc/strip-all-5/in/
    projects/elfcopy/trunk/test/tc/strip-all-5/in/strip-all-5.in.shar
    projects/elfcopy/trunk/test/tc/strip-all-5/out/
    projects/elfcopy/trunk/test/tc/strip-all-5/out/strip-all-5.out.shar
    projects/elfcopy/trunk/test/tc/strip-all-5/strip-all-5.err
    projects/elfcopy/trunk/test/tc/strip-all-5/strip-all-5.eval
    projects/elfcopy/trunk/test/tc/strip-all-5/strip-all-5.out
    projects/elfcopy/trunk/test/tc/strip-all-5/strip-all-5.sh
    projects/elfcopy/trunk/test/tcgen.sh
    projects/elfcopy/trunk/utils.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <kai...@us...> - 2008-04-03 20:48:42
      
     | 
| Revision: 7
          http://elftoolchain.svn.sourceforge.net/elftoolchain/?rev=7&view=rev
Author:   kaiwang27
Date:     2008-04-03 13:48:38 -0700 (Thu, 03 Apr 2008)
Log Message:
-----------
Delete junk files.
Removed Paths:
-------------
    projects/ar/trunk/svn-commit.2.tmp
    projects/ar/trunk/svn-commit.3.tmp
    projects/ar/trunk/svn-commit.4.tmp
    projects/ar/trunk/svn-commit.tmp
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <kai...@us...> - 2008-04-03 20:35:52
      
     | 
| Revision: 6
          http://elftoolchain.svn.sourceforge.net/elftoolchain/?rev=6&view=rev
Author:   kaiwang27
Date:     2008-04-03 13:35:44 -0700 (Thu, 03 Apr 2008)
Log Message:
-----------
Import a snapshot of ar(1) from FreeBSD perforce repository.
Added Paths:
-----------
    projects/ar/trunk/Makefile
    projects/ar/trunk/acplex.l
    projects/ar/trunk/acpyacc.y
    projects/ar/trunk/ar.1
    projects/ar/trunk/ar.c
    projects/ar/trunk/ar.h
    projects/ar/trunk/benchmark/
    projects/ar/trunk/benchmark/acp.sh
    projects/ar/trunk/read.c
    projects/ar/trunk/svn-commit.2.tmp
    projects/ar/trunk/svn-commit.3.tmp
    projects/ar/trunk/svn-commit.4.tmp
    projects/ar/trunk/svn-commit.tmp
    projects/ar/trunk/test/
    projects/ar/trunk/test/Makefile
    projects/ar/trunk/test/func.sh
    projects/ar/trunk/test/plugin/
    projects/ar/trunk/test/plugin/Makefile.ardiff
    projects/ar/trunk/test/plugin/Makefile.teraser
    projects/ar/trunk/test/plugin/ardiff.c
    projects/ar/trunk/test/plugin/teraser.c
    projects/ar/trunk/test/run.sh
    projects/ar/trunk/test/tc/
    projects/ar/trunk/test/tc/addself-liba/
    projects/ar/trunk/test/tc/addself-liba/addself-liba.err
    projects/ar/trunk/test/tc/addself-liba/addself-liba.eval
    projects/ar/trunk/test/tc/addself-liba/addself-liba.out
    projects/ar/trunk/test/tc/addself-liba/addself-liba.sh
    projects/ar/trunk/test/tc/addself-liba/in/
    projects/ar/trunk/test/tc/addself-liba/in/addself-liba.in.shar
    projects/ar/trunk/test/tc/addself-liba/out/
    projects/ar/trunk/test/tc/addself-liba/out/addself-liba.out.shar
    projects/ar/trunk/test/tc/archive-liba/
    projects/ar/trunk/test/tc/archive-liba/archive-liba.err
    projects/ar/trunk/test/tc/archive-liba/archive-liba.eval
    projects/ar/trunk/test/tc/archive-liba/archive-liba.out
    projects/ar/trunk/test/tc/archive-liba/archive-liba.sh
    projects/ar/trunk/test/tc/archive-liba/in/
    projects/ar/trunk/test/tc/archive-liba/in/archive-liba.in.shar
    projects/ar/trunk/test/tc/archive-liba/out/
    projects/ar/trunk/test/tc/archive-liba/out/archive-liba.out.shar
    projects/ar/trunk/test/tc/archive-liba-v/
    projects/ar/trunk/test/tc/archive-liba-v/archive-liba-v.err
    projects/ar/trunk/test/tc/archive-liba-v/archive-liba-v.eval
    projects/ar/trunk/test/tc/archive-liba-v/archive-liba-v.out
    projects/ar/trunk/test/tc/archive-liba-v/archive-liba-v.sh
    projects/ar/trunk/test/tc/archive-liba-v/in/
    projects/ar/trunk/test/tc/archive-liba-v/in/archive-liba-v.in.shar
    projects/ar/trunk/test/tc/archive-liba-v/out/
    projects/ar/trunk/test/tc/archive-liba-v/out/archive-liba-v.out.shar
    projects/ar/trunk/test/tc/archive-liblong/
    projects/ar/trunk/test/tc/archive-liblong/archive-liblong.err
    projects/ar/trunk/test/tc/archive-liblong/archive-liblong.eval
    projects/ar/trunk/test/tc/archive-liblong/archive-liblong.out
    projects/ar/trunk/test/tc/archive-liblong/archive-liblong.sh
    projects/ar/trunk/test/tc/archive-liblong/in/
    projects/ar/trunk/test/tc/archive-liblong/in/archive-liblong.in.shar
    projects/ar/trunk/test/tc/archive-liblong/out/
    projects/ar/trunk/test/tc/archive-liblong/out/archive-liblong.out.shar
    projects/ar/trunk/test/tc/archive-libmix-v/
    projects/ar/trunk/test/tc/archive-libmix-v/archive-libmix-v.err
    projects/ar/trunk/test/tc/archive-libmix-v/archive-libmix-v.eval
    projects/ar/trunk/test/tc/archive-libmix-v/archive-libmix-v.out
    projects/ar/trunk/test/tc/archive-libmix-v/archive-libmix-v.sh
    projects/ar/trunk/test/tc/archive-libmix-v/in/
    projects/ar/trunk/test/tc/archive-libmix-v/in/archive-libmix-v.in.shar
    projects/ar/trunk/test/tc/archive-libmix-v/out/
    projects/ar/trunk/test/tc/archive-libmix-v/out/archive-libmix-v.out.shar
    projects/ar/trunk/test/tc/archive-libnonelf-v/
    projects/ar/trunk/test/tc/archive-libnonelf-v/archive-libnonelf-v.err
    projects/ar/trunk/test/tc/archive-libnonelf-v/archive-libnonelf-v.eval
    projects/ar/trunk/test/tc/archive-libnonelf-v/archive-libnonelf-v.out
    projects/ar/trunk/test/tc/archive-libnonelf-v/archive-libnonelf-v.sh
    projects/ar/trunk/test/tc/archive-libnonelf-v/in/
    projects/ar/trunk/test/tc/archive-libnonelf-v/in/archive-libnonelf-v.in.shar
    projects/ar/trunk/test/tc/archive-libnonelf-v/out/
    projects/ar/trunk/test/tc/archive-libnonelf-v/out/archive-libnonelf-v.out.shar
    projects/ar/trunk/test/tc/compbase-liba-v/
    projects/ar/trunk/test/tc/compbase-liba-v/compbase-liba-v.err
    projects/ar/trunk/test/tc/compbase-liba-v/compbase-liba-v.eval
    projects/ar/trunk/test/tc/compbase-liba-v/compbase-liba-v.out
    projects/ar/trunk/test/tc/compbase-liba-v/compbase-liba-v.sh
    projects/ar/trunk/test/tc/compbase-liba-v/in/
    projects/ar/trunk/test/tc/compbase-liba-v/in/compbase-liba-v.in.shar
    projects/ar/trunk/test/tc/compbase-liba-v/out/
    projects/ar/trunk/test/tc/compbase-liba-v/out/compbase-liba-v.out.shar
    projects/ar/trunk/test/tc/compbase_read-liba/
    projects/ar/trunk/test/tc/compbase_read-liba/compbase_read-liba.err
    projects/ar/trunk/test/tc/compbase_read-liba/compbase_read-liba.eval
    projects/ar/trunk/test/tc/compbase_read-liba/compbase_read-liba.out
    projects/ar/trunk/test/tc/compbase_read-liba/compbase_read-liba.sh
    projects/ar/trunk/test/tc/compbase_read-liba/in/
    projects/ar/trunk/test/tc/compbase_read-liba/in/compbase_read-liba.in.shar
    projects/ar/trunk/test/tc/compbase_read-liba/out/
    projects/ar/trunk/test/tc/compbase_read-liba/out/compbase_read-liba.out.shar
    projects/ar/trunk/test/tc/delete-liba-v/
    projects/ar/trunk/test/tc/delete-liba-v/delete-liba-v.err
    projects/ar/trunk/test/tc/delete-liba-v/delete-liba-v.eval
    projects/ar/trunk/test/tc/delete-liba-v/delete-liba-v.out
    projects/ar/trunk/test/tc/delete-liba-v/delete-liba-v.sh
    projects/ar/trunk/test/tc/delete-liba-v/in/
    projects/ar/trunk/test/tc/delete-liba-v/in/delete-liba-v.in.shar
    projects/ar/trunk/test/tc/delete-liba-v/out/
    projects/ar/trunk/test/tc/delete-liba-v/out/delete-liba-v.out.shar
    projects/ar/trunk/test/tc/delete-liblong/
    projects/ar/trunk/test/tc/delete-liblong/delete-liblong.err
    projects/ar/trunk/test/tc/delete-liblong/delete-liblong.eval
    projects/ar/trunk/test/tc/delete-liblong/delete-liblong.out
    projects/ar/trunk/test/tc/delete-liblong/delete-liblong.sh
    projects/ar/trunk/test/tc/delete-liblong/in/
    projects/ar/trunk/test/tc/delete-liblong/in/delete-liblong.in.shar
    projects/ar/trunk/test/tc/delete-liblong/out/
    projects/ar/trunk/test/tc/delete-liblong/out/delete-liblong.out.shar
    projects/ar/trunk/test/tc/delete-libmix-v/
    projects/ar/trunk/test/tc/delete-libmix-v/delete-libmix-v.err
    projects/ar/trunk/test/tc/delete-libmix-v/delete-libmix-v.eval
    projects/ar/trunk/test/tc/delete-libmix-v/delete-libmix-v.out
    projects/ar/trunk/test/tc/delete-libmix-v/delete-libmix-v.sh
    projects/ar/trunk/test/tc/delete-libmix-v/in/
    projects/ar/trunk/test/tc/delete-libmix-v/in/delete-libmix-v.in.shar
    projects/ar/trunk/test/tc/delete-libmix-v/out/
    projects/ar/trunk/test/tc/delete-libmix-v/out/delete-libmix-v.out.shar
    projects/ar/trunk/test/tc/delete_all-liba-v/
    projects/ar/trunk/test/tc/delete_all-liba-v/delete_all-liba-v.err
    projects/ar/trunk/test/tc/delete_all-liba-v/delete_all-liba-v.eval
    projects/ar/trunk/test/tc/delete_all-liba-v/delete_all-liba-v.out
    projects/ar/trunk/test/tc/delete_all-liba-v/delete_all-liba-v.sh
    projects/ar/trunk/test/tc/delete_all-liba-v/in/
    projects/ar/trunk/test/tc/delete_all-liba-v/in/delete_all-liba-v.in.shar
    projects/ar/trunk/test/tc/delete_all-liba-v/out/
    projects/ar/trunk/test/tc/delete_all-liba-v/out/delete_all-liba-v.out.shar
    projects/ar/trunk/test/tc/extract-liba/
    projects/ar/trunk/test/tc/extract-liba/extract-liba.err
    projects/ar/trunk/test/tc/extract-liba/extract-liba.eval
    projects/ar/trunk/test/tc/extract-liba/extract-liba.out
    projects/ar/trunk/test/tc/extract-liba/extract-liba.sh
    projects/ar/trunk/test/tc/extract-liba/in/
    projects/ar/trunk/test/tc/extract-liba/in/extract-liba.in.shar
    projects/ar/trunk/test/tc/extract-liba/out/
    projects/ar/trunk/test/tc/extract-liba/out/extract-liba.out.shar
    projects/ar/trunk/test/tc/extract-liba-v/
    projects/ar/trunk/test/tc/extract-liba-v/extract-liba-v.err
    projects/ar/trunk/test/tc/extract-liba-v/extract-liba-v.eval
    projects/ar/trunk/test/tc/extract-liba-v/extract-liba-v.out
    projects/ar/trunk/test/tc/extract-liba-v/extract-liba-v.sh
    projects/ar/trunk/test/tc/extract-liba-v/in/
    projects/ar/trunk/test/tc/extract-liba-v/in/extract-liba-v.in.shar
    projects/ar/trunk/test/tc/extract-liba-v/out/
    projects/ar/trunk/test/tc/extract-liba-v/out/extract-liba-v.out.shar
    projects/ar/trunk/test/tc/extract-liblong/
    projects/ar/trunk/test/tc/extract-liblong/extract-liblong.err
    projects/ar/trunk/test/tc/extract-liblong/extract-liblong.eval
    projects/ar/trunk/test/tc/extract-liblong/extract-liblong.out
    projects/ar/trunk/test/tc/extract-liblong/extract-liblong.sh
    projects/ar/trunk/test/tc/extract-liblong/in/
    projects/ar/trunk/test/tc/extract-liblong/in/extract-liblong.in.shar
    projects/ar/trunk/test/tc/extract-liblong/out/
    projects/ar/trunk/test/tc/extract-liblong/out/extract-liblong.out.shar
    projects/ar/trunk/test/tc/extract-libmix-v/
    projects/ar/trunk/test/tc/extract-libmix-v/extract-libmix-v.err
    projects/ar/trunk/test/tc/extract-libmix-v/extract-libmix-v.eval
    projects/ar/trunk/test/tc/extract-libmix-v/extract-libmix-v.out
    projects/ar/trunk/test/tc/extract-libmix-v/extract-libmix-v.sh
    projects/ar/trunk/test/tc/extract-libmix-v/in/
    projects/ar/trunk/test/tc/extract-libmix-v/in/extract-libmix-v.in.shar
    projects/ar/trunk/test/tc/extract-libmix-v/out/
    projects/ar/trunk/test/tc/extract-libmix-v/out/extract-libmix-v.out.shar
    projects/ar/trunk/test/tc/extract-libnonelf-v/
    projects/ar/trunk/test/tc/extract-libnonelf-v/extract-libnonelf-v.err
    projects/ar/trunk/test/tc/extract-libnonelf-v/extract-libnonelf-v.eval
    projects/ar/trunk/test/tc/extract-libnonelf-v/extract-libnonelf-v.out
    projects/ar/trunk/test/tc/extract-libnonelf-v/extract-libnonelf-v.sh
    projects/ar/trunk/test/tc/extract-libnonelf-v/in/
    projects/ar/trunk/test/tc/extract-libnonelf-v/in/extract-libnonelf-v.in.shar
    projects/ar/trunk/test/tc/extract-libnonelf-v/out/
    projects/ar/trunk/test/tc/extract-libnonelf-v/out/extract-libnonelf-v.out.shar
    projects/ar/trunk/test/tc/list-lib65536/
    projects/ar/trunk/test/tc/list-lib65536/in/
    projects/ar/trunk/test/tc/list-lib65536/in/list-lib65536.in.shar
    projects/ar/trunk/test/tc/list-lib65536/list-lib65536.err
    projects/ar/trunk/test/tc/list-lib65536/list-lib65536.eval
    projects/ar/trunk/test/tc/list-lib65536/list-lib65536.out
    projects/ar/trunk/test/tc/list-lib65536/list-lib65536.sh
    projects/ar/trunk/test/tc/list-lib65536/out/
    projects/ar/trunk/test/tc/list-lib65536/out/list-lib65536.out.shar
    projects/ar/trunk/test/tc/list-liblong/
    projects/ar/trunk/test/tc/list-liblong/in/
    projects/ar/trunk/test/tc/list-liblong/in/list-liblong.in.shar
    projects/ar/trunk/test/tc/list-liblong/list-liblong.err
    projects/ar/trunk/test/tc/list-liblong/list-liblong.eval
    projects/ar/trunk/test/tc/list-liblong/list-liblong.out
    projects/ar/trunk/test/tc/list-liblong/list-liblong.sh
    projects/ar/trunk/test/tc/list-liblong/out/
    projects/ar/trunk/test/tc/list-liblong/out/list-liblong.out.shar
    projects/ar/trunk/test/tc/list_s-libaS/
    projects/ar/trunk/test/tc/list_s-libaS/in/
    projects/ar/trunk/test/tc/list_s-libaS/in/list_s-libaS.in.shar
    projects/ar/trunk/test/tc/list_s-libaS/list_s-libaS.err
    projects/ar/trunk/test/tc/list_s-libaS/list_s-libaS.eval
    projects/ar/trunk/test/tc/list_s-libaS/list_s-libaS.out
    projects/ar/trunk/test/tc/list_s-libaS/list_s-libaS.sh
    projects/ar/trunk/test/tc/list_s-libaS/out/
    projects/ar/trunk/test/tc/list_s-libaS/out/list_s-libaS.out.shar
    projects/ar/trunk/test/tc/moveafter-liba-v/
    projects/ar/trunk/test/tc/moveafter-liba-v/in/
    projects/ar/trunk/test/tc/moveafter-liba-v/in/moveafter-liba-v.in.shar
    projects/ar/trunk/test/tc/moveafter-liba-v/moveafter-liba-v.err
    projects/ar/trunk/test/tc/moveafter-liba-v/moveafter-liba-v.eval
    projects/ar/trunk/test/tc/moveafter-liba-v/moveafter-liba-v.out
    projects/ar/trunk/test/tc/moveafter-liba-v/moveafter-liba-v.sh
    projects/ar/trunk/test/tc/moveafter-liba-v/out/
    projects/ar/trunk/test/tc/moveafter-liba-v/out/moveafter-liba-v.out.shar
    projects/ar/trunk/test/tc/moveafter-libmix-v/
    projects/ar/trunk/test/tc/moveafter-libmix-v/in/
    projects/ar/trunk/test/tc/moveafter-libmix-v/in/moveafter-libmix-v.in.shar
    projects/ar/trunk/test/tc/moveafter-libmix-v/moveafter-libmix-v.err
    projects/ar/trunk/test/tc/moveafter-libmix-v/moveafter-libmix-v.eval
    projects/ar/trunk/test/tc/moveafter-libmix-v/moveafter-libmix-v.out
    projects/ar/trunk/test/tc/moveafter-libmix-v/moveafter-libmix-v.sh
    projects/ar/trunk/test/tc/moveafter-libmix-v/out/
    projects/ar/trunk/test/tc/moveafter-libmix-v/out/moveafter-libmix-v.out.shar
    projects/ar/trunk/test/tc/moveafter_movepos-liba-v/
    projects/ar/trunk/test/tc/moveafter_movepos-liba-v/in/
    projects/ar/trunk/test/tc/moveafter_movepos-liba-v/in/moveafter_movepos-liba-v.in.shar
    projects/ar/trunk/test/tc/moveafter_movepos-liba-v/moveafter_movepos-liba-v.err
    projects/ar/trunk/test/tc/moveafter_movepos-liba-v/moveafter_movepos-liba-v.eval
    projects/ar/trunk/test/tc/moveafter_movepos-liba-v/moveafter_movepos-liba-v.out
    projects/ar/trunk/test/tc/moveafter_movepos-liba-v/moveafter_movepos-liba-v.sh
    projects/ar/trunk/test/tc/moveafter_movepos-liba-v/out/
    projects/ar/trunk/test/tc/moveafter_movepos-liba-v/out/moveafter_movepos-liba-v.out.shar
    projects/ar/trunk/test/tc/movebefore-liba-v/
    projects/ar/trunk/test/tc/movebefore-liba-v/in/
    projects/ar/trunk/test/tc/movebefore-liba-v/in/movebefore-liba-v.in.shar
    projects/ar/trunk/test/tc/movebefore-liba-v/movebefore-liba-v.err
    projects/ar/trunk/test/tc/movebefore-liba-v/movebefore-liba-v.eval
    projects/ar/trunk/test/tc/movebefore-liba-v/movebefore-liba-v.out
    projects/ar/trunk/test/tc/movebefore-liba-v/movebefore-liba-v.sh
    projects/ar/trunk/test/tc/movebefore-liba-v/out/
    projects/ar/trunk/test/tc/movebefore-liba-v/out/movebefore-liba-v.out.shar
    projects/ar/trunk/test/tc/movebefore-libmix/
    projects/ar/trunk/test/tc/movebefore-libmix/in/
    projects/ar/trunk/test/tc/movebefore-libmix/in/movebefore-libmix.in.shar
    projects/ar/trunk/test/tc/movebefore-libmix/movebefore-libmix.err
    projects/ar/trunk/test/tc/movebefore-libmix/movebefore-libmix.eval
    projects/ar/trunk/test/tc/movebefore-libmix/movebefore-libmix.out
    projects/ar/trunk/test/tc/movebefore-libmix/movebefore-libmix.sh
    projects/ar/trunk/test/tc/movebefore-libmix/out/
    projects/ar/trunk/test/tc/movebefore-libmix/out/movebefore-libmix.out.shar
    projects/ar/trunk/test/tc/movebefore_movepos-liba-v/
    projects/ar/trunk/test/tc/movebefore_movepos-liba-v/in/
    projects/ar/trunk/test/tc/movebefore_movepos-liba-v/in/movebefore_movepos-liba-v.in.shar
    projects/ar/trunk/test/tc/movebefore_movepos-liba-v/movebefore_movepos-liba-v.err
    projects/ar/trunk/test/tc/movebefore_movepos-liba-v/movebefore_movepos-liba-v.eval
    projects/ar/trunk/test/tc/movebefore_movepos-liba-v/movebefore_movepos-liba-v.out
    projects/ar/trunk/test/tc/movebefore_movepos-liba-v/movebefore_movepos-liba-v.sh
    projects/ar/trunk/test/tc/movebefore_movepos-liba-v/out/
    projects/ar/trunk/test/tc/movebefore_movepos-liba-v/out/movebefore_movepos-liba-v.out.shar
    projects/ar/trunk/test/tc/movetail-libmix/
    projects/ar/trunk/test/tc/movetail-libmix/in/
    projects/ar/trunk/test/tc/movetail-libmix/in/movetail-libmix.in.shar
    projects/ar/trunk/test/tc/movetail-libmix/movetail-libmix.err
    projects/ar/trunk/test/tc/movetail-libmix/movetail-libmix.eval
    projects/ar/trunk/test/tc/movetail-libmix/movetail-libmix.out
    projects/ar/trunk/test/tc/movetail-libmix/movetail-libmix.sh
    projects/ar/trunk/test/tc/movetail-libmix/out/
    projects/ar/trunk/test/tc/movetail-libmix/out/movetail-libmix.out.shar
    projects/ar/trunk/test/tc/optionl-liba/
    projects/ar/trunk/test/tc/optionl-liba/in/
    projects/ar/trunk/test/tc/optionl-liba/in/optionl-liba.in.shar
    projects/ar/trunk/test/tc/optionl-liba/optionl-liba.err
    projects/ar/trunk/test/tc/optionl-liba/optionl-liba.eval
    projects/ar/trunk/test/tc/optionl-liba/optionl-liba.out
    projects/ar/trunk/test/tc/optionl-liba/optionl-liba.sh
    projects/ar/trunk/test/tc/optionl-liba/out/
    projects/ar/trunk/test/tc/optionl-liba/out/optionl-liba.out.shar
    projects/ar/trunk/test/tc/print-liblong/
    projects/ar/trunk/test/tc/print-liblong/in/
    projects/ar/trunk/test/tc/print-liblong/in/print-liblong.in.shar
    projects/ar/trunk/test/tc/print-liblong/out/
    projects/ar/trunk/test/tc/print-liblong/out/print-liblong.out.shar
    projects/ar/trunk/test/tc/print-liblong/print-liblong.err
    projects/ar/trunk/test/tc/print-liblong/print-liblong.eval
    projects/ar/trunk/test/tc/print-liblong/print-liblong.out
    projects/ar/trunk/test/tc/print-liblong/print-liblong.sh
    projects/ar/trunk/test/tc/print-liblong-v/
    projects/ar/trunk/test/tc/print-liblong-v/in/
    projects/ar/trunk/test/tc/print-liblong-v/in/print-liblong-v.in.shar
    projects/ar/trunk/test/tc/print-liblong-v/out/
    projects/ar/trunk/test/tc/print-liblong-v/out/print-liblong-v.out.shar
    projects/ar/trunk/test/tc/print-liblong-v/print-liblong-v.err
    projects/ar/trunk/test/tc/print-liblong-v/print-liblong-v.eval
    projects/ar/trunk/test/tc/print-liblong-v/print-liblong-v.out
    projects/ar/trunk/test/tc/print-liblong-v/print-liblong-v.sh
    projects/ar/trunk/test/tc/print-libmix/
    projects/ar/trunk/test/tc/print-libmix/in/
    projects/ar/trunk/test/tc/print-libmix/in/print-libmix.in.shar
    projects/ar/trunk/test/tc/print-libmix/out/
    projects/ar/trunk/test/tc/print-libmix/out/print-libmix.out.shar
    projects/ar/trunk/test/tc/print-libmix/print-libmix.err
    projects/ar/trunk/test/tc/print-libmix/print-libmix.eval
    projects/ar/trunk/test/tc/print-libmix/print-libmix.out
    projects/ar/trunk/test/tc/print-libmix/print-libmix.sh
    projects/ar/trunk/test/tc/print-libmix-v/
    projects/ar/trunk/test/tc/print-libmix-v/in/
    projects/ar/trunk/test/tc/print-libmix-v/in/print-libmix-v.in.shar
    projects/ar/trunk/test/tc/print-libmix-v/out/
    projects/ar/trunk/test/tc/print-libmix-v/out/print-libmix-v.out.shar
    projects/ar/trunk/test/tc/print-libmix-v/print-libmix-v.err
    projects/ar/trunk/test/tc/print-libmix-v/print-libmix-v.eval
    projects/ar/trunk/test/tc/print-libmix-v/print-libmix-v.out
    projects/ar/trunk/test/tc/print-libmix-v/print-libmix-v.sh
    projects/ar/trunk/test/tc/quickadd-liba-v/
    projects/ar/trunk/test/tc/quickadd-liba-v/in/
    projects/ar/trunk/test/tc/quickadd-liba-v/in/quickadd-liba-v.in.shar
    projects/ar/trunk/test/tc/quickadd-liba-v/out/
    projects/ar/trunk/test/tc/quickadd-liba-v/out/quickadd-liba-v.out.shar
    projects/ar/trunk/test/tc/quickadd-liba-v/quickadd-liba-v.err
    projects/ar/trunk/test/tc/quickadd-liba-v/quickadd-liba-v.eval
    projects/ar/trunk/test/tc/quickadd-liba-v/quickadd-liba-v.out
    projects/ar/trunk/test/tc/quickadd-liba-v/quickadd-liba-v.sh
    projects/ar/trunk/test/tc/undefined-libsbrk/
    projects/ar/trunk/test/tc/undefined-libsbrk/in/
    projects/ar/trunk/test/tc/undefined-libsbrk/in/undefined-libsbrk.in.shar
    projects/ar/trunk/test/tc/undefined-libsbrk/out/
    projects/ar/trunk/test/tc/undefined-libsbrk/out/undefined-libsbrk.out.shar
    projects/ar/trunk/test/tc/undefined-libsbrk/undefined-libsbrk.err
    projects/ar/trunk/test/tc/undefined-libsbrk/undefined-libsbrk.eval
    projects/ar/trunk/test/tc/undefined-libsbrk/undefined-libsbrk.out
    projects/ar/trunk/test/tc/undefined-libsbrk/undefined-libsbrk.sh
    projects/ar/trunk/test/tc/usage-ab/
    projects/ar/trunk/test/tc/usage-ab/usage-ab.err
    projects/ar/trunk/test/tc/usage-ab/usage-ab.eval
    projects/ar/trunk/test/tc/usage-ab/usage-ab.out
    projects/ar/trunk/test/tc/usage-ab/usage-ab.sh
    projects/ar/trunk/test/tc/usage-bi/
    projects/ar/trunk/test/tc/usage-bi/usage-bi.err
    projects/ar/trunk/test/tc/usage-bi/usage-bi.eval
    projects/ar/trunk/test/tc/usage-bi/usage-bi.out
    projects/ar/trunk/test/tc/usage-bi/usage-bi.sh
    projects/ar/trunk/test/tc/usage-tx/
    projects/ar/trunk/test/tc/usage-tx/usage-tx.err
    projects/ar/trunk/test/tc/usage-tx/usage-tx.eval
    projects/ar/trunk/test/tc/usage-tx/usage-tx.out
    projects/ar/trunk/test/tc/usage-tx/usage-tx.sh
    projects/ar/trunk/test/tc/weaksymbol-libweak/
    projects/ar/trunk/test/tc/weaksymbol-libweak/in/
    projects/ar/trunk/test/tc/weaksymbol-libweak/in/weaksymbol-libweak.in.shar
    projects/ar/trunk/test/tc/weaksymbol-libweak/out/
    projects/ar/trunk/test/tc/weaksymbol-libweak/out/weaksymbol-libweak.out.shar
    projects/ar/trunk/test/tc/weaksymbol-libweak/weaksymbol-libweak.err
    projects/ar/trunk/test/tc/weaksymbol-libweak/weaksymbol-libweak.eval
    projects/ar/trunk/test/tc/weaksymbol-libweak/weaksymbol-libweak.out
    projects/ar/trunk/test/tc/weaksymbol-libweak/weaksymbol-libweak.sh
    projects/ar/trunk/test/tcgen.sh
    projects/ar/trunk/util.c
    projects/ar/trunk/write.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <jk...@us...> - 2008-04-02 10:38:42
      
     | 
| Revision: 5
          http://elftoolchain.svn.sourceforge.net/elftoolchain/?rev=5&view=rev
Author:   jkoshy
Date:     2008-04-02 03:38:36 -0700 (Wed, 02 Apr 2008)
Log Message:
-----------
Import a snapshot of libelf from FreeBSD's CVS.
Added Paths:
-----------
    projects/libelf/trunk/Makefile
    projects/libelf/trunk/Version.map
    projects/libelf/trunk/_libelf.h
    projects/libelf/trunk/elf.3
    projects/libelf/trunk/elf_begin.3
    projects/libelf/trunk/elf_begin.c
    projects/libelf/trunk/elf_cntl.3
    projects/libelf/trunk/elf_cntl.c
    projects/libelf/trunk/elf_data.c
    projects/libelf/trunk/elf_end.3
    projects/libelf/trunk/elf_end.c
    projects/libelf/trunk/elf_errmsg.3
    projects/libelf/trunk/elf_errmsg.c
    projects/libelf/trunk/elf_errno.c
    projects/libelf/trunk/elf_fill.3
    projects/libelf/trunk/elf_fill.c
    projects/libelf/trunk/elf_flag.c
    projects/libelf/trunk/elf_flagdata.3
    projects/libelf/trunk/elf_getarhdr.3
    projects/libelf/trunk/elf_getarhdr.c
    projects/libelf/trunk/elf_getarsym.3
    projects/libelf/trunk/elf_getarsym.c
    projects/libelf/trunk/elf_getbase.3
    projects/libelf/trunk/elf_getbase.c
    projects/libelf/trunk/elf_getdata.3
    projects/libelf/trunk/elf_getident.3
    projects/libelf/trunk/elf_getident.c
    projects/libelf/trunk/elf_getphnum.3
    projects/libelf/trunk/elf_getscn.3
    projects/libelf/trunk/elf_getshnum.3
    projects/libelf/trunk/elf_getshstrndx.3
    projects/libelf/trunk/elf_hash.3
    projects/libelf/trunk/elf_hash.c
    projects/libelf/trunk/elf_kind.3
    projects/libelf/trunk/elf_kind.c
    projects/libelf/trunk/elf_memory.3
    projects/libelf/trunk/elf_memory.c
    projects/libelf/trunk/elf_next.3
    projects/libelf/trunk/elf_next.c
    projects/libelf/trunk/elf_phnum.c
    projects/libelf/trunk/elf_rand.3
    projects/libelf/trunk/elf_rand.c
    projects/libelf/trunk/elf_rawfile.3
    projects/libelf/trunk/elf_rawfile.c
    projects/libelf/trunk/elf_scn.c
    projects/libelf/trunk/elf_shnum.c
    projects/libelf/trunk/elf_shstrndx.c
    projects/libelf/trunk/elf_strptr.3
    projects/libelf/trunk/elf_strptr.c
    projects/libelf/trunk/elf_types.m4
    projects/libelf/trunk/elf_update.3
    projects/libelf/trunk/elf_update.c
    projects/libelf/trunk/elf_version.3
    projects/libelf/trunk/elf_version.c
    projects/libelf/trunk/gelf.3
    projects/libelf/trunk/gelf.h
    projects/libelf/trunk/gelf_cap.c
    projects/libelf/trunk/gelf_checksum.3
    projects/libelf/trunk/gelf_checksum.c
    projects/libelf/trunk/gelf_dyn.c
    projects/libelf/trunk/gelf_ehdr.c
    projects/libelf/trunk/gelf_fsize.3
    projects/libelf/trunk/gelf_fsize.c
    projects/libelf/trunk/gelf_getcap.3
    projects/libelf/trunk/gelf_getclass.3
    projects/libelf/trunk/gelf_getclass.c
    projects/libelf/trunk/gelf_getdyn.3
    projects/libelf/trunk/gelf_getehdr.3
    projects/libelf/trunk/gelf_getmove.3
    projects/libelf/trunk/gelf_getphdr.3
    projects/libelf/trunk/gelf_getrel.3
    projects/libelf/trunk/gelf_getrela.3
    projects/libelf/trunk/gelf_getshdr.3
    projects/libelf/trunk/gelf_getsym.3
    projects/libelf/trunk/gelf_getsyminfo.3
    projects/libelf/trunk/gelf_getsymshndx.3
    projects/libelf/trunk/gelf_move.c
    projects/libelf/trunk/gelf_newehdr.3
    projects/libelf/trunk/gelf_newphdr.3
    projects/libelf/trunk/gelf_phdr.c
    projects/libelf/trunk/gelf_rel.c
    projects/libelf/trunk/gelf_rela.c
    projects/libelf/trunk/gelf_shdr.c
    projects/libelf/trunk/gelf_sym.c
    projects/libelf/trunk/gelf_syminfo.c
    projects/libelf/trunk/gelf_symshndx.c
    projects/libelf/trunk/gelf_update_ehdr.3
    projects/libelf/trunk/gelf_xlate.c
    projects/libelf/trunk/gelf_xlatetof.3
    projects/libelf/trunk/libelf.c
    projects/libelf/trunk/libelf.h
    projects/libelf/trunk/libelf_align.c
    projects/libelf/trunk/libelf_allocate.c
    projects/libelf/trunk/libelf_ar.c
    projects/libelf/trunk/libelf_checksum.c
    projects/libelf/trunk/libelf_convert.m4
    projects/libelf/trunk/libelf_data.c
    projects/libelf/trunk/libelf_ehdr.c
    projects/libelf/trunk/libelf_extended.c
    projects/libelf/trunk/libelf_fsize.m4
    projects/libelf/trunk/libelf_msize.m4
    projects/libelf/trunk/libelf_phdr.c
    projects/libelf/trunk/libelf_shdr.c
    projects/libelf/trunk/libelf_xlate.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <jk...@us...> - 2008-04-02 09:46:35
      
     | 
| Revision: 4
          http://elftoolchain.svn.sourceforge.net/elftoolchain/?rev=4&view=rev
Author:   jkoshy
Date:     2008-04-02 02:46:30 -0700 (Wed, 02 Apr 2008)
Log Message:
-----------
Add an implementation of size(1) contributed by Sam Arun Raj.
Added Paths:
-----------
    projects/size/trunk/Makefile
    projects/size/trunk/size.1
    projects/size/trunk/size.c
Added: projects/size/trunk/Makefile
===================================================================
--- projects/size/trunk/Makefile	                        (rev 0)
+++ projects/size/trunk/Makefile	2008-04-02 09:46:30 UTC (rev 4)
@@ -0,0 +1,8 @@
+# 
+
+PROG=   size
+WARNS?= 6
+LDADD=  -lelf
+
+.include <bsd.prog.mk>
+
Added: projects/size/trunk/size.1
===================================================================
--- projects/size/trunk/size.1	                        (rev 0)
+++ projects/size/trunk/size.1	2008-04-02 09:46:30 UTC (rev 4)
@@ -0,0 +1,132 @@
+.\" Copyright (c) 2007 S.Sam Arun Raj
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 25, 2007
+.Dt SIZE 1
+.Os
+.Sh NAME
+.Nm size
+.Nd "display section sizes and total size in"
+.Tn ELF
+files.
+.Sh SYNOPSIS
+.Nm
+.Op Fl Adhotx
+.Op Ar
+.Sh DESCRIPTION
+The
+.Nm
+utility
+lists the size of various sections and total size (if choosen) for each input
+.Ar file.
+The
+.Nm
+utility can operate on ELF object,
+.Xr ar 1
+archives, and core dumps.
+.Pp
+If no file name is specified in the input, "a.out" is assumed.
+.Pp
+The following options are available:
+.Bl -tag -width indent
+.It Fl A
+The output of
+.Nm
+will resemble output from System V
+.Nm .
+By default, one line of output is generated for each ELF object or each module
+in an archive, if this option is not choosen.
+.It Fl t
+Shows cumulative totals of section sizes from all objects. Not available when
+System V output format
+.Fl A
+is choosen.
+.It Fl d | Fl o | Fl x
+The section sizes can be displayed either in decimal, octal or hexadecimal by
+choosing one of these options. Totals
+.Fl t
+are always displayed in two radixes; decimal and hexadecimal for
+.Fl d
+or
+.Fl x
+output, or octal and hexadecimal if
+.Fl o
+is choosen.
+.It Fl h
+This prints a usage summary and exits.
+.El
+.Sh EXIT STATUS
+.Ex -std
+.Sh EXAMPLES
+The following are examples of typical usage
+of the
+.Nm
+command:
+.Pp
+.Dl "$ size /bin/ls"
+.Dl "text       data       bss        dec        hex        filename"
+.Dl "20975      540        392        21907      5593        /bin/ls"
+.Pp
+.Dl "$ size -tx /bin/ls /bin/dd"
+.Dl "text       data       bss        dec        hex        filename"
+.Dl "0x51ef     0x21c      0x188      21907      5593        /bin/ls"
+.Dl "0x3df5     0x170      0x200      16741      4165        /bin/dd"
+.Dl "0x8fe4     0x38c      0x388      38648      96f8       (TOTALS)"
+.Sh SEE ALSO
+.Xr ar 1 ,
+.Xr objdump 1 ,
+.Xr readelf 1
+.Rs
+.%A "AT&T Unix Systems Labs"
+.%T "System V Application Binary Interface"
+.%O http://www.sco.com/developers/gabi/
+.Re
+.Sh HISTORY
+The
+.Nm
+utility first appeared in
+.At v6.
+The last FreeBSD 
+.Nm
+was discontinued in 
+.Fx v5 ,
+when i386-only a.out format was dropped in favor of ELF.
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+utility was re-written by
+.An S.Sam Arun Raj Aq sam...@gm...
+This manual page was written by
+.An S.Sam Arun Raj Aq sam...@gm...
+.Sh LIMITATIONS
+Unlike the GNU
+.Nm
+this doesn't support multiple object file formats, only ELF using the
+.Xr elf 3
+and
+.Xr gelf 3
+API's.
Added: projects/size/trunk/size.c
===================================================================
--- projects/size/trunk/size.c	                        (rev 0)
+++ projects/size/trunk/size.c	2008-04-02 09:46:30 UTC (rev 4)
@@ -0,0 +1,762 @@
+/*-
+ * Copyright (c) 2007 S.Sam Arun Raj
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <err.h>
+#include <fcntl.h>
+#include <getopt.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sysexits.h>
+#include <unistd.h>
+
+#include <libelf.h>
+#include <gelf.h>
+
+#define BUF_SIZE	40
+#define ELF_ALIGN(val,x) \
+	(((val) + (x) - 1) > (val) ? (((val)+(x)-1) & ~((x)-1)) : ~0)
+
+#ifndef NT_AUXV
+#define NT_AUXV 6
+#endif
+#ifndef NT_LWPSTATUS
+#define NT_LWPSTATUS 16
+#endif
+#ifndef NT_PRFPREG
+#define NT_PRFPREG 2
+#endif
+#ifndef NT_PSTATUS
+#define NT_PSTATUS 10
+#endif
+#ifndef NT_PSINFO
+#define NT_PSINFO 13
+#endif
+#ifndef NT_PRXFPREG
+#define NT_PRXFPREG 0x46e62b7f
+#endif
+#ifndef PT_GNU_EH_FRAME
+#define PT_GNU_EH_FRAME	(PT_LOOS + 0x474e550)
+#endif
+#ifndef PT_GNU_STACK
+#define PT_GNU_STACK (PT_LOOS + 0x474e551)
+#endif
+
+enum output_style {
+	STYLE_BERKELEY,
+	STYLE_SYSV
+};
+
+enum radix_style {
+	RADIX_OCTAL,
+	RADIX_DECIMAL,
+	RADIX_HEX 
+};
+
+size_t sec_name_len;
+uint32_t bss_size_total, data_size_total, text_size_total;
+uint32_t bss_size, data_size, text_size, total_size;
+int show_totals;
+enum radix_style radix;
+enum output_style style;
+const char default_name[] = "a.out";
+
+int	handle_elf(char const *);
+int	handle_core(char const *, Elf *elf, GElf_Ehdr *);
+void	handle_core_note(Elf *, GElf_Ehdr *, GElf_Phdr *, char **);
+void	handle_phdr(Elf *, GElf_Ehdr *, GElf_Phdr *, uint32_t,
+    	    const char *);
+void	usage(void);
+void	print_number(int, uint32_t, enum radix_style, char);
+void	berkeley_header(void);
+void	berkeley_footer(const char *, const char *, const char *);
+void	berkeley_calc(GElf_Shdr *);
+void	berkeley_totals(void);
+void	sysv_header(const char *, Elf_Arhdr *);
+void	sysv_footer(void);
+void	sysv_calc(Elf *, GElf_Ehdr *, GElf_Shdr *, int);
+
+/*
+ * size utility using elf(3) and gelf(3) API to list section sizes and
+ * total in elf files. Supports only elf files (core dumps in elf
+ * included) that can be opened by libelf, other formats are not supported.
+ */
+int
+main(int argc, char *argv[])
+{
+	int ch, exit_code;
+
+	sec_name_len = 19;
+	exit_code = EX_OK;
+	style = STYLE_BERKELEY;
+	radix = RADIX_DECIMAL;
+	if (elf_version(EV_CURRENT) == EV_NONE)
+		errx(EX_SOFTWARE, "ELF library initialization failed: %s",
+		    elf_errmsg(-1));
+
+	while ((ch = getopt(argc, argv, "Adhotx")) != -1)
+		switch((char)ch) {
+		case 'A':
+			style = STYLE_SYSV;
+			break;
+		case 'd':
+			radix = RADIX_DECIMAL;
+			break;
+		case 't':
+			show_totals = 1;
+			break;
+		case 'o':
+			radix = RADIX_OCTAL;
+			break;
+		case 'x':
+			radix = RADIX_HEX;
+			break;
+		case 'h':
+		case '?':
+		default:
+			usage();
+			/* NOTREACHED */
+		}
+	argc -= optind;
+	argv += optind;
+
+	if (!*argv) {
+		exit_code = handle_elf(default_name);
+		if (exit_code == EX_SOFTWARE || exit_code == EX_DATAERR) 
+			warnx("%s: File format not recognized", default_name);
+		if (exit_code == EX_NOINPUT)
+			warnx("'%s': No such file", default_name);
+	}
+	else while (*argv) {
+		exit_code = handle_elf(*argv);
+		if (exit_code == EX_SOFTWARE || exit_code == EX_DATAERR)
+			warnx("%s: File format not recognized", *argv);
+		if (exit_code == EX_NOINPUT)
+			warnx("'%s': No such file", *argv);
+		argv++;
+	}
+	if (style == STYLE_BERKELEY)
+		berkeley_totals();
+        return (exit_code);
+}
+
+static Elf_Data *
+xlatetom(Elf *elf, GElf_Ehdr *elfhdr, void *_src, void *_dst,
+    Elf_Type type, size_t size)
+{
+	Elf_Data src, dst;
+
+	src.d_buf = _src;
+	src.d_type = type;
+	src.d_version = elfhdr->e_version;
+	src.d_size = size;
+	dst.d_buf = _dst;
+	dst.d_version = elfhdr->e_version;
+	dst.d_size = size;
+	return gelf_xlatetom(elf, &dst, &src, elfhdr->e_ident[EI_DATA]);
+}
+
+#define NOTE_OFFSET_32(nhdr, namesz, offset) 			\
+	((char *)nhdr + sizeof(Elf32_Nhdr) +			\
+	    ELF_ALIGN((int32_t)namesz, 4) + offset)
+
+#define NOTE_OFFSET_64(nhdr, namesz, offset) 			\
+	((char *)nhdr + sizeof(Elf32_Nhdr) +			\
+	    ELF_ALIGN((int32_t)namesz, 8) + offset)
+
+#define PID32(nhdr, namesz, offset) 				\
+	(pid_t)*((int *)((uintptr_t)NOTE_OFFSET_32(nhdr,	\
+	    namesz, offset)));
+
+#define PID64(nhdr, namesz, offset) 				\
+	(pid_t)*((int *)((uintptr_t)NOTE_OFFSET_64(nhdr,	\
+	    namesz, offset)));
+
+#define NEXT_NOTE(elfhdr, descsz, namesz, offset) do {		\
+	if (elfhdr->e_ident[EI_CLASS] == ELFCLASS32) { 		\
+		offset += ELF_ALIGN((int32_t)descsz, 4) + 	\
+		    sizeof(Elf32_Nhdr) + 			\
+		        ELF_ALIGN((int32_t)namesz, 4); 		\
+	} else {						\
+		offset += ELF_ALIGN((int32_t)descsz, 8) + 	\
+		    sizeof(Elf32_Nhdr) + 			\
+		        ELF_ALIGN((int32_t)namesz, 8); 		\
+	}							\
+} while (0)
+
+/*
+ * Parse individual note entries inside a PT_NOTE segment.
+ */
+void
+handle_core_note(Elf *elf, GElf_Ehdr *elfhdr, GElf_Phdr *phdr,
+    char **cmd_line)
+{
+	size_t max_size;
+	uint64_t raw_size;
+	GElf_Off offset;
+	static pid_t pid;
+	uintptr_t ver;			
+	Elf32_Nhdr *nhdr, nhdr_l;
+	static int reg_pseudo = 0, reg2_pseudo = 0, regxfp_pseudo = 0;
+	char buf[BUF_SIZE], *data, *name;
+
+ 	if (elf == NULL || elfhdr == NULL || phdr == NULL)
+		return;
+	
+	data = elf_rawfile(elf, &max_size);
+	offset = phdr->p_offset;
+	while (data != NULL && offset < phdr->p_offset + phdr->p_filesz) {
+		nhdr = (Elf32_Nhdr *)(uintptr_t)((char*)data + offset);
+		memset(&nhdr_l, 0, sizeof(Elf32_Nhdr));
+		if (!xlatetom(elf, elfhdr, &nhdr->n_type, &nhdr_l.n_type,
+			ELF_T_WORD, sizeof(Elf32_Word)) ||
+		    !xlatetom(elf, elfhdr, &nhdr->n_descsz, &nhdr_l.n_descsz,
+			ELF_T_WORD, sizeof(Elf32_Word)) ||
+		    !xlatetom(elf, elfhdr, &nhdr->n_namesz, &nhdr_l.n_namesz,
+			ELF_T_WORD, sizeof(Elf32_Word)))
+			break;
+
+		name = (char *)((char *)nhdr + sizeof(Elf32_Nhdr));
+		switch (nhdr_l.n_type) {
+		case NT_PRSTATUS: {
+			raw_size = 0;
+			if (elfhdr->e_ident[EI_OSABI] == ELFOSABI_FREEBSD &&
+			    nhdr_l.n_namesz == 0x8 &&
+			    !strcmp(name,"FreeBSD")) {
+				if (elfhdr->e_ident[EI_CLASS] == ELFCLASS32) {
+					raw_size = (uint64_t)*((uint32_t *)
+					    (uintptr_t)(name + 
+						ELF_ALIGN((int32_t)
+						nhdr_l.n_namesz, 4) + 8));
+					ver = (uintptr_t)NOTE_OFFSET_32(nhdr,
+					    nhdr_l.n_namesz,0);
+					if (*((int *)ver) == 1)
+						pid = PID32(nhdr,
+						    nhdr_l.n_namesz, 24);
+				} else {
+					raw_size = *((uint64_t *)(uintptr_t)
+					    (name + ELF_ALIGN((int32_t)
+						nhdr_l.n_namesz, 8) + 16));
+					ver = (uintptr_t)NOTE_OFFSET_64(nhdr,
+					    nhdr_l.n_namesz,0);
+					if (*((int *)ver) == 1)
+						pid = PID64(nhdr,
+						    nhdr_l.n_namesz, 40);
+				}
+				xlatetom(elf, elfhdr, &raw_size, &raw_size,
+				    ELF_T_WORD, sizeof(uint64_t));
+				xlatetom(elf, elfhdr, &pid, &pid, ELF_T_WORD,
+				    sizeof(pid_t));
+			}
+			
+			if (raw_size != 0 && style == STYLE_SYSV) {
+				(void) snprintf(buf, BUF_SIZE, "%s/%d",
+				    ".reg", pid);
+				(void) printf("%-18s ", buf);
+				print_number(10, (uint32_t)raw_size,
+				    radix, ' ');
+				print_number(10, (uint32_t)0,
+				    radix, '\n');
+				if (!reg_pseudo) {
+					(void) printf("%-18s ", ".reg");
+					print_number(10, (uint32_t)raw_size,
+					    radix, ' ');
+					print_number(10, (uint32_t)0, radix,
+					    '\n');
+					reg_pseudo = 1;
+					text_size_total += raw_size;	
+				}				
+				text_size_total += raw_size;
+			}			
+		}	
+		break;
+		case NT_PRFPREG: /* same as NT_FPREGSET */
+			if (style == STYLE_SYSV) {
+				(void) snprintf(buf, BUF_SIZE,
+				    "%s/%d", ".reg2", pid);
+				(void) printf("%-18s ", buf);
+				print_number(10, (uint32_t)nhdr_l.n_descsz,
+				    radix, ' ');
+				print_number(10, (uint32_t)0, radix, '\n');
+				if (!reg2_pseudo) {
+					(void) printf("%-18s ", ".reg2");
+					print_number(10,
+					    (uint32_t)nhdr_l.n_descsz,
+					    radix, ' ');
+					print_number(10, (uint32_t)0, radix,
+					    '\n');
+					reg2_pseudo = 1;
+					text_size_total += nhdr_l.n_descsz;
+				}
+				text_size_total += nhdr_l.n_descsz;
+			}
+			break;
+		case NT_AUXV:
+			if (style == STYLE_SYSV) {
+				(void) printf("%-18s ", ".auxv");
+				print_number(10, (uint32_t)nhdr_l.n_descsz,
+				    radix, ' ');
+				print_number(10, (uint32_t)0, radix, '\n');
+				text_size_total += nhdr_l.n_descsz;
+			}
+			break;
+		case NT_PRXFPREG:
+			if (style == STYLE_SYSV) {
+				(void) snprintf(buf, BUF_SIZE,
+				    "%s/%d", ".reg-xfp", pid);
+				(void) printf("%-18s ", buf);
+				print_number(10, (uint32_t)nhdr_l.n_descsz,
+				    radix, ' ');
+				print_number(10, (uint32_t)0, radix, '\n');
+				if (!regxfp_pseudo) {
+					(void) printf("%-18s ", ".reg-xfp");
+					print_number(10,
+					    (uint32_t)nhdr_l.n_descsz,
+					    radix, ' ');
+					print_number(10, (uint32_t)0,
+					    radix, '\n');
+					regxfp_pseudo = 1;
+					text_size_total += nhdr_l.n_descsz;
+				}
+				text_size_total += nhdr_l.n_descsz;
+			}
+			break;
+		case NT_PSINFO:
+		case NT_PRPSINFO: {
+			/* FreeBSD 64-bit */
+			if (nhdr_l.n_descsz == 0x78 &&
+				!strcmp(name,"FreeBSD")) {
+				*cmd_line = strdup(NOTE_OFFSET_64(nhdr,
+				    nhdr_l.n_namesz, 33));
+			/* FreeBSD 32-bit */
+			} else if (nhdr_l.n_descsz == 0x6c &&
+				!strcmp(name,"FreeBSD")) {
+				*cmd_line = strdup(NOTE_OFFSET_32(nhdr,
+				    nhdr_l.n_namesz, 25));
+			}
+			/* Strip any trailing spaces */
+			if (*cmd_line != NULL) {
+				char *s;
+
+				s = *cmd_line + strlen(*cmd_line);
+				while (s > *cmd_line) {
+					if (*(s-1) != 0x20) break;
+					s--;
+				}
+				*s = 0;
+			}
+			break;
+		}			
+		case NT_PSTATUS:
+		case NT_LWPSTATUS:
+		default:
+			break;
+		}
+		NEXT_NOTE(elfhdr, nhdr_l.n_descsz, nhdr_l.n_namesz, offset);
+	}
+}
+
+/*
+ * Handles program headers except for PT_NOTE, when sysv output stlye is 
+ * choosen, prints out the segment name and length. For berkely output 
+ * style only PT_LOAD segments are handled, and text,
+ * data, bss size is calculated for them.
+ */
+void
+handle_phdr(Elf *elf, GElf_Ehdr *elfhdr, GElf_Phdr *phdr,
+    uint32_t idx, const char *name)
+{	
+	uint32_t addr, size;
+	int split;
+	char buf[BUF_SIZE];	
+
+	if (elf == NULL || elfhdr == NULL || phdr == NULL)
+		return;
+
+	size = addr = 0;
+	split = (phdr->p_memsz > 0) && 	(phdr->p_filesz > 0) && 
+	    (phdr->p_memsz > phdr->p_filesz);
+
+	if (style == STYLE_SYSV) {
+		(void) snprintf(buf, BUF_SIZE,
+		    "%s%d%s", name, idx, (split ? "a" : ""));
+		(void) printf("%-18s ", buf);
+		print_number(10, (uint32_t)phdr->p_filesz, radix, ' ');
+		print_number(10, (uint32_t)phdr->p_vaddr, radix, '\n');
+		text_size_total += phdr->p_filesz;
+		if (split) {
+			size = (uint32_t)(phdr->p_memsz - phdr->p_filesz);
+			addr = (uint32_t)(phdr->p_vaddr + phdr->p_filesz);
+			(void) snprintf(buf, BUF_SIZE, "%s%d%s", name,
+			    idx, "b");
+			text_size_total += phdr->p_memsz - phdr->p_filesz;
+			(void) printf("%-18s ", buf);
+			print_number(10, size, radix, ' ');
+			print_number(10, addr, radix, '\n');
+		}
+	} else {
+		if (phdr->p_type != PT_LOAD)
+			return;
+		if ((phdr->p_flags & PF_W) && !(phdr->p_flags & PF_X)) {
+			data_size += phdr->p_filesz;
+			if (split)
+				data_size += phdr->p_memsz - phdr->p_filesz;
+		} else {
+			text_size += phdr->p_filesz;
+			if (split)
+				text_size += phdr->p_memsz - phdr->p_filesz;
+		}
+	}
+}
+
+/*
+ * Given a core dump file, this function maps program headers to segments.
+ */
+int
+handle_core(char const *name, Elf *elf, GElf_Ehdr *elfhdr)
+{
+	GElf_Phdr phdr;
+	uint32_t i;	
+	char *core_cmdline;
+	const char *seg_name;
+
+	if (name == NULL || elf == NULL || elfhdr == NULL)
+		return (EX_DATAERR);
+	if  (elfhdr->e_shnum != 0 || elfhdr->e_type != ET_CORE)
+		return (EX_DATAERR);
+	
+	seg_name = core_cmdline = NULL;
+	if (style == STYLE_SYSV)
+		sysv_header(name, NULL);
+	else
+		berkeley_header();
+
+	for (i = 0; i < elfhdr->e_phnum; i++) {
+		if (gelf_getphdr(elf, i, &phdr) != NULL) {
+			if (phdr.p_type == PT_NOTE) {
+				handle_phdr(elf, elfhdr, &phdr, i, "note");
+				handle_core_note(elf, elfhdr, &phdr,
+				    &core_cmdline);
+			} else {
+				switch(phdr.p_type) {
+				case PT_NULL:
+					seg_name = "null";
+					break;
+				case PT_LOAD:
+					seg_name = "load";
+					break;
+				case PT_DYNAMIC:
+					seg_name = "dynamic";
+					break;
+				case PT_INTERP:
+					seg_name = "interp";
+					break;
+				case PT_SHLIB:
+					seg_name = "shlib";
+					break;
+				case PT_PHDR:
+					seg_name = "phdr";
+					break;
+				case PT_GNU_EH_FRAME:
+					seg_name = "eh_frame_hdr";
+					break;
+				case PT_GNU_STACK:
+					seg_name = "stack";
+					break;
+				default:
+					seg_name = "segment";
+				}
+				handle_phdr(elf, elfhdr, &phdr, i, seg_name);
+			}
+		}
+	}
+
+	if (style == STYLE_BERKELEY) {
+		if (core_cmdline != NULL) {
+			berkeley_footer(core_cmdline, name,
+			    "core file invoked as");
+		} else {
+			berkeley_footer(core_cmdline, name, "core file");
+		}
+	} else {
+		sysv_footer();
+		if (core_cmdline != NULL) {
+			(void) printf(" (core file invoked as %s)\n\n",
+			    core_cmdline);
+		} else {
+			(void) printf(" (core file)\n\n");
+		}
+	}
+	free(core_cmdline);
+	return (EX_OK);
+}
+
+/*
+ * Given an elf object,ar(1) filename, and based on the output style 
+ * and radix format the various sections and their length will be printed
+ * or the size of the text, data, bss sections will be printed out.
+ */
+int
+handle_elf(char const *name)
+{
+	GElf_Ehdr elfhdr;
+	GElf_Shdr shdr;
+	Elf *elf, *elf1;
+	Elf_Arhdr *arhdr;
+	Elf_Scn *scn;
+	Elf_Cmd elf_cmd;
+	int exit_code, fd;
+
+	if (name == NULL)
+		return (EX_NOINPUT);
+
+	if ((fd = open(name, O_RDONLY, 0)) < 0)
+		return (EX_NOINPUT);
+
+	elf_cmd = ELF_C_READ;
+	elf1 = elf_begin(fd, elf_cmd, NULL);
+	while ((elf = elf_begin(fd, elf_cmd, elf1)) != NULL) {
+		arhdr = elf_getarhdr(elf);
+		if (elf_kind(elf) == ELF_K_NONE && arhdr == NULL) {
+			(void) elf_end(elf);
+			(void) elf_end(elf1);
+			(void) close(fd);
+			return (EX_DATAERR);
+		}
+		if (elf_kind(elf) != ELF_K_ELF ||
+			(gelf_getehdr(elf, &elfhdr) == NULL)) {
+			elf_cmd = elf_next(elf);
+			(void) elf_end(elf);
+			warnx("%s: File format not recognized",
+			    arhdr->ar_name);
+			continue;
+		}
+		/* Core dumps are handled seperately */
+		if (elfhdr.e_shnum == 0 && elfhdr.e_type == ET_CORE) {
+			exit_code = handle_core(name, elf, &elfhdr);
+			(void) elf_end(elf);
+			(void) elf_end(elf1);
+			(void) close(fd);
+			return (exit_code);
+		} else {
+			scn = NULL;
+			if (style == STYLE_BERKELEY) {
+				berkeley_header();
+				while ((scn = elf_nextscn(elf, scn)) != NULL) {
+					if (gelf_getshdr(scn, &shdr) != NULL)
+						berkeley_calc(&shdr);
+				}
+			} else {
+				/*
+				 * Perform a dry run to find the length of
+				 * the largest segment name.
+				 */
+				while ((scn = elf_nextscn(elf, scn)) != NULL) {
+					if (gelf_getshdr(scn, &shdr) !=	NULL) {
+						sysv_calc(elf, &elfhdr,
+						    &shdr, 1);
+					}
+				}
+				sysv_header(name, arhdr);
+				scn = NULL;
+				while ((scn = elf_nextscn(elf, scn)) != NULL) {
+					if (gelf_getshdr(scn, &shdr) !=	NULL)
+						sysv_calc(elf, &elfhdr,
+						    &shdr, 0);
+				}
+			}
+			if (style == STYLE_BERKELEY) {
+				if (arhdr != NULL) {
+					berkeley_footer(name, arhdr->ar_name,
+					    "ex");
+				} else {
+					berkeley_footer(name, NULL, "ex");
+				}
+			} else {
+				sysv_footer();
+			}
+		}
+		elf_cmd = elf_next(elf);
+		(void) elf_end(elf);
+	}
+	(void) elf_end(elf1);
+	(void) close(fd);
+	return (EX_OK);
+}
+
+void
+print_number(int width, uint32_t num, enum radix_style rad, char c)
+{
+	char buffer[BUF_SIZE];
+
+	(void) snprintf(buffer, BUF_SIZE, (rad == RADIX_DECIMAL ? "%lu" :
+	    ((rad == RADIX_OCTAL) ? "0%lo" : "0x%lx")),
+	    (unsigned long int)num);
+	(void) printf("%-*s%c", width, buffer, c);
+}
+
+/*
+ * Sysv formatting helper functions.
+ */
+void
+sysv_header(const char *name, Elf_Arhdr *arhdr)
+{
+	text_size_total = 0;
+	if (arhdr != NULL) {
+		(void) printf("%s   (ex %s):\n%-*s%-10s %-10s\n",
+		    arhdr->ar_name, name, (int)sec_name_len,
+		    "section","size","addr");
+	} else {
+		(void) printf("%s  :\n%-*s%-10s %-10s\n",
+		    name, (int)sec_name_len, "section",
+		    "size", "addr");
+	}
+}
+
+void
+sysv_calc(Elf *elf, GElf_Ehdr *elfhdr, GElf_Shdr *shdr, int dry_run)
+{
+	char *section_name;
+
+	section_name = elf_strptr(elf, elfhdr->e_shstrndx,
+					(size_t)shdr->sh_name);
+	if (!dry_run) {
+		if ((shdr->sh_type == SHT_SYMTAB ||
+		    shdr->sh_type == SHT_STRTAB || shdr->sh_type == SHT_RELA ||
+		    shdr->sh_type == SHT_REL) && shdr->sh_addr == 0) 
+			return;
+		(void) printf("%-*s", (int)sec_name_len, section_name);
+		print_number(10, (uint32_t)shdr->sh_size, radix, ' ');
+		print_number(10, (uint32_t)shdr->sh_addr, radix, '\n');
+		text_size_total += shdr->sh_size;
+	} else {
+		if (sec_name_len < strlen(section_name))
+			sec_name_len = strlen(section_name) + 3;
+	} 
+}
+
+void
+sysv_footer()
+{
+	(void) printf("%-*s", (int)sec_name_len, "Total");
+	print_number(10, text_size_total, radix, '\n');
+	(void) printf("\n");
+}
+
+/*
+ * berkeley style output formatting helper functions.
+ */
+void
+berkeley_header()
+{
+	text_size = data_size = bss_size = 0;
+}
+
+void
+berkeley_calc(GElf_Shdr *shdr)
+{
+	if (shdr != NULL) {
+		if (!(shdr->sh_flags & SHF_ALLOC)) 
+			return;
+		if ((shdr->sh_flags & SHF_ALLOC) && 
+		    ((shdr->sh_flags & SHF_EXECINSTR) ||
+		    !(shdr->sh_flags & SHF_WRITE)))
+			text_size += shdr->sh_size;
+		else if ((shdr->sh_flags & SHF_ALLOC) && 
+		    (shdr->sh_flags & SHF_WRITE) &&
+		    (shdr->sh_type != SHT_NOBITS))
+			data_size += shdr->sh_size;
+		else
+			bss_size += shdr->sh_size;
+	}
+}
+
+void
+berkeley_totals(void)
+{
+	long unsigned int grand_total;
+
+	if (show_totals) {
+		grand_total = text_size_total + data_size_total +
+		    bss_size_total;
+		print_number(10, text_size_total, radix, ' ');
+		print_number(10, data_size_total, radix, ' ');
+		print_number(10, bss_size_total, radix, ' ');
+		if (radix == RADIX_OCTAL)
+			print_number(10, grand_total, RADIX_OCTAL, ' ');
+		else
+			print_number(10, grand_total, RADIX_DECIMAL, ' ');
+		(void) printf("%-10lx (TOTALS)\n", grand_total);
+	}
+}
+
+void
+berkeley_footer(const char *name, const char *ar_name, const char *msg)
+{
+	static int header_printed;
+	const char *col_name;
+
+	if (!header_printed) {
+		(radix == RADIX_OCTAL) ? (col_name = "oct") :
+		    (col_name = "dec");
+		(void) printf("%-10s %-10s %-10s %-10s %-10s filename\n",
+		    "text","data","bss",col_name,"hex");
+		header_printed = 1;
+	}
+
+	total_size = text_size + data_size + bss_size;
+	if (show_totals) {
+		text_size_total += text_size;
+		bss_size_total += bss_size;
+		data_size_total += data_size;
+	}
+
+	print_number(10, text_size, radix, ' ');
+	print_number(10, data_size, radix, ' ');
+	print_number(10, bss_size, radix, ' ');
+	if (radix == RADIX_OCTAL)
+		print_number(10, total_size, RADIX_OCTAL, ' ');
+	else
+		print_number(10, total_size, RADIX_DECIMAL, ' ');
+	(void) printf("%-10lx\t", (long unsigned int)total_size);
+	if (ar_name != NULL && name != NULL)
+		(void) printf("%s (%s %s)\n", ar_name, msg, name);
+	else if (ar_name != NULL && name == NULL)
+		(void) printf("%s (%s)\n", ar_name, msg);
+	else
+		(void) printf("%s\n", name);
+}
+
+void
+usage()
+{
+	(void) fprintf(stderr, "usage: size [-Adhotx] file ...\n");
+	exit(EX_USAGE);
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <jk...@us...> - 2008-04-02 09:44:30
      
     | 
| Revision: 3
          http://elftoolchain.svn.sourceforge.net/elftoolchain/?rev=3&view=rev
Author:   jkoshy
Date:     2008-04-02 02:44:26 -0700 (Wed, 02 Apr 2008)
Log Message:
-----------
Add an implementation of strings(1) contributed by Sam Arun Raj.
Added Paths:
-----------
    projects/strings/trunk/Makefile
    projects/strings/trunk/strings.1
    projects/strings/trunk/strings.c
Added: projects/strings/trunk/Makefile
===================================================================
--- projects/strings/trunk/Makefile	                        (rev 0)
+++ projects/strings/trunk/Makefile	2008-04-02 09:44:26 UTC (rev 3)
@@ -0,0 +1,8 @@
+#
+
+PROG=   strings
+WARNS?= 6
+LDADD=  -lelf
+
+.include <bsd.prog.mk>
+
Added: projects/strings/trunk/strings.1
===================================================================
--- projects/strings/trunk/strings.1	                        (rev 0)
+++ projects/strings/trunk/strings.1	2008-04-02 09:44:26 UTC (rev 3)
@@ -0,0 +1,141 @@
+.\" Copyright (c) 2007 S.Sam Arun Raj
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 15, 2007
+.Dt STRINGS 1
+.Os
+.Sh NAME
+.Nm strings
+.Nd "print the strings of printable characters in files"
+.Sh SYNOPSIS
+.Nm
+.Op Fl afho
+.Op Fl e Ar encoding
+.Op Fl n Ar number 
+.Op Fl t Ar radix
+.Op Ar
+.Sh DESCRIPTION
+Fo each 
+.Ar file 
+given, the
+.Nm
+utility prints any contiguous seqeunce of printable 
+characters of atleast 'n' characters long (the default is 4 characters)
+followed by an unprintable character.
+.Nm
+only scans the initialized and loaded sections of ELF objects; for other
+file types, the entire file is scanned.
+The
+.Nm
+utility is mainly useful for determining the contents of non-text files.
+.Pp
+If no file name is specified in the input, standard input is read from.
+.Pp
+The following options are available:
+.Bl -tag -width indent
+.It Fl a
+This option instructs
+.Nm
+to scan the entire file. This is useful to override the default behaviour of
+scanning only initialized and loaded section of ELF objects.
+.It Fl e Ar encoding
+Select the character encoding to be used while searching for strings. 
+The encoding depends on the single character argument which speicifes 
+the encoding;
+.Ar s
+for single 7-bit-byte characters (ASCII, ISO 8859, etc., default).
+.Ar S
+for single 8-bit-byte characters.
+.Ar l
+for 16-bit littleendian.
+.Ar b
+for 16-bit bigendian.
+.Ar L
+for 32-bit littleendian.
+.Ar B
+for 32-bit bigendian.
+.It Fl f
+Print the name of the file before each string.
+.It Fl t Ar radix
+Print the offset from the start of the file before each string. The 
+format depends on the single character argument which specifies the 
+radix of the offset;
+.Ar d
+for decimal,
+.Ar o
+for octal,
+.Ar x
+for hexadecimal.
+.It Fl n Ar number
+Print the contiguous character sequence of alteast
+.Ar number
+characters long, instead of default 4 characters.
+.It Fl o
+This is same as -t o.
+.It Fl h
+This prints a usage summary and exits.
+.El
+.Sh EXIT STATUS
+.Ex -std
+.Sh EXAMPLES
+The following are examples of typical usage
+of the
+.Nm
+command:
+.Dl ""
+.Dl "$ strings /bin/ls"
+.Dl "$ strings -a /bin/ln"
+.Dl "$ strings -a -f -t x /bin/cat"
+.Sh SEE ALSO
+.Xr ar 1 ,
+.Xr nm 1 ,
+.Xr objdump 1 ,
+.Xr ranlib ,
+.Xr readelf 1
+.Sh HISTORY
+The first FreeBSD
+.Nm
+utility appeared in
+.Fx v3.
+It was later discontinued in
+.Fx v5 ,
+when i386-only a.out format was dropped in favor of ELF.
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+utility was re-written by
+.An S.Sam Arun Raj Aq sam...@gm...
+This manual page was written by
+.An S.Sam Arun Raj Aq sam...@gm...
+.Sh LIMITATIONS
+Unlike the GNU
+.Nm
+this doesn't support multiple object file formats, only ELF using the
+.Xr elf 3
+and
+.Xr gelf 3
+API's.
Added: projects/strings/trunk/strings.c
===================================================================
--- projects/strings/trunk/strings.c	                        (rev 0)
+++ projects/strings/trunk/strings.c	2008-04-02 09:44:26 UTC (rev 3)
@@ -0,0 +1,411 @@
+/*-
+ * Copyright (c) 2007 S.Sam Arun Raj
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#include <ctype.h>
+#include <err.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <getopt.h>
+#include <inttypes.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sysexits.h>
+#include <unistd.h>
+
+#include <libelf.h>
+#include <gelf.h>
+
+enum radix_style {
+	RADIX_DECIMAL,
+	RADIX_HEX,
+	RADIX_OCTAL
+};
+
+enum encoding_style {
+	ENCODING_7BIT,
+	ENCODING_8BIT,
+	ENCODING_16BIT_BIG,
+	ENCODING_16BIT_LITTLE,
+	ENCODING_32BIT_BIG,
+	ENCODING_32BIT_LITTLE
+};
+
+#define PRINTABLE(c)						\
+      ((c) >= 0 && (c) <= 255 && 				\
+	  ((c) == '\t' || isprint((c)) ||			\
+	      (encoding == ENCODING_8BIT && (c) > 127)))
+
+
+int encoding_size, entire_file, min_len, show_filename, show_loc;
+enum encoding_style encoding;
+enum radix_style radix;
+
+long	getcharacter(void);
+int	handle_file(const char *);
+int	handle_elf(const char *, int);
+int	handle_binary(const char *, int);
+int	find_strings(const char *, off_t, off_t);
+void	usage(void);
+
+/*
+ * strings(1) extracts text(contiguous printable characters)
+ * from elf and binary files.
+ */
+int
+main(int argc, char **argv)
+{
+	int ch, rc;
+
+	rc = EX_OK;
+	min_len = 0;
+	encoding_size = 1;
+	if (elf_version(EV_CURRENT) == EV_NONE)
+		errx(EX_SOFTWARE, "ELF library initialization failed: %s",
+		    elf_errmsg(-1));
+
+	while ((ch = getopt(argc, argv, "1234567890ae:fhn:ot:")) != -1)
+		switch((char)ch) {
+		case 'a':
+			entire_file = 1;
+			break;
+		case 'e':
+			if (*optarg == 's') {
+				encoding = ENCODING_7BIT;
+			} else if (*optarg == 'S') {
+				encoding = ENCODING_8BIT;
+			} else if (*optarg == 'b') {
+				encoding = ENCODING_16BIT_BIG;
+				encoding_size = 2;
+			} else if (*optarg == 'B') {
+				encoding = ENCODING_32BIT_BIG;
+				encoding_size = 4;
+			} else if (*optarg == 'l') {
+				encoding = ENCODING_16BIT_LITTLE;
+				encoding_size = 2;
+			} else if (*optarg == 'L') {
+				encoding = ENCODING_32BIT_LITTLE;
+				encoding_size = 4;
+			} else
+				usage();
+			        /* NOTREACHED */
+			break;
+		case 'f':
+			show_filename = 1;
+			break;
+		case 'n':
+			min_len = (int)strtoimax(optarg, (char**)NULL, 10);
+			break;
+		case 'o':
+			show_loc = 1;
+			radix = RADIX_OCTAL;
+			break;
+		case 't':
+			show_loc = 1;			
+			if (*optarg == 'd')
+				radix = RADIX_DECIMAL;
+			else if (*optarg == 'o')
+				radix = RADIX_OCTAL;
+			else if (*optarg == 'x')
+				radix = RADIX_HEX;
+			else
+				usage();
+			        /* NOTREACHED */
+			break;
+		case '0':
+	        case '1':
+		case '2':
+		case '3':
+		case '4':
+		case '5':
+		case '6':
+		case '7':
+		case '8':
+		case '9':
+			min_len *= 10;
+			min_len += ch - '0';
+			break;
+		case 'h':
+		case '?':
+		default:
+			usage();
+			/* NOTREACHED */			
+		}
+	argc -= optind;
+	argv += optind;
+
+	if (!min_len)
+		min_len = 4;
+	if (!*argv)
+		rc = handle_file("{standard input}");
+	else while (*argv) {
+		rc = handle_file(*argv);
+		argv++;
+	}
+	return(rc);
+}
+
+int
+handle_file(const char *name)
+{
+	int fd, rt;
+	
+	if (name == NULL)
+		return(EX_NOINPUT);
+	if (strcmp("{standard input}", name) != 0) {
+		if (freopen(name, "rb", stdin) == NULL) {
+			warnx("'%s': %s", name, strerror(errno));
+			return(EX_NOINPUT);	
+		}
+	} else {
+		return find_strings(name, (off_t)0, (off_t)0);
+	}
+
+	fd = fileno(stdin);	
+	if (fd < 0)
+		return(EX_NOINPUT);
+	rt = handle_elf(name, fd);
+	return(rt);
+}
+
+/*
+ * Files not understood by handle_elf, will be passed off here and will
+ * treated as a binary file. This would include text file, core dumps ...
+ */
+int
+handle_binary(const char *name, int fd)
+{
+	struct stat buf;
+
+	memset(&buf, 0, sizeof(struct stat));
+	(void) lseek(fd, (off_t)0, SEEK_SET);
+	if (!fstat(fd, &buf))
+		return find_strings(name, (off_t)0, buf.st_size);
+	return(EX_SOFTWARE);
+}
+
+/*
+ * Will analyse a file to see if it ELF, other files including ar(1),
+ * core dumps are passed off and treated as flat binary files. Unlike
+ * GNU size in FreeBSD this routine will not treat ELF object from 
+ * different archs as flat binary files(has to overridden using -a).
+ */
+int
+handle_elf(const char *name, int fd)
+{
+	GElf_Ehdr elfhdr;
+	GElf_Shdr shdr;
+	Elf *elf;
+	Elf_Scn *scn;
+	int rc;
+	
+	rc = EX_OK;
+	/* If entire file is choosen, treat it as a binary file */
+	if (entire_file)
+		return handle_binary(name, fd);
+		
+	(void) lseek(fd, (off_t)0, SEEK_SET);
+	elf = elf_begin(fd, ELF_C_READ, NULL);
+	if (elf_kind(elf) != ELF_K_ELF) {
+		(void) elf_end(elf);
+		return handle_binary(name, fd);    	
+	}
+
+	if (gelf_getehdr(elf, &elfhdr) == NULL) {
+		(void) elf_end(elf);
+		warnx("%s: ELF file could not be processed", name);
+		return(EX_SOFTWARE);	
+	}
+	
+	if (elfhdr.e_shnum == 0 && elfhdr.e_type == ET_CORE) {
+		(void) elf_end(elf);
+		return handle_binary(name, fd);
+	} else {
+		scn = NULL;
+		while ((scn = elf_nextscn(elf, scn)) != NULL) {
+			if (gelf_getshdr(scn, &shdr) == NULL)
+				continue;			       
+			if (shdr.sh_type != SHT_NOBITS &&
+			    (shdr.sh_flags & SHF_ALLOC) != 0) {
+				rc = find_strings(name, shdr.sh_offset,
+				    shdr.sh_size);
+			}
+		}
+	}
+	(void) elf_end(elf);
+	return(rc);
+}
+
+/*
+ * Retrieves a character from input stream based on the encoding
+ * type requested.
+ */
+long
+getcharacter()
+{
+	long rt;
+	int i;	
+	char buf[4], c;
+	
+	rt = EOF;
+	for(i = 0; i < encoding_size; i++) {
+		c = getc(stdin);
+		if (feof(stdin))
+			return(EOF);
+		buf[i] = c;		
+	}
+	
+	switch(encoding) {
+	case ENCODING_7BIT:
+	case ENCODING_8BIT:
+		rt = buf[0];
+		break;
+	case ENCODING_16BIT_BIG:
+		rt = (buf[0] << 8) | buf[1];
+		break;
+	case ENCODING_16BIT_LITTLE:
+		 rt = buf[0] | (buf[1] << 8);
+		 break;
+	case ENCODING_32BIT_BIG:
+		rt = ((long) buf[0] << 24) | ((long) buf[1] << 16) |
+           	    ((long) buf[2] << 8) | buf[3];
+           	break;	
+	case ENCODING_32BIT_LITTLE:
+		rt = buf[0] | ((long) buf[1] << 8) | ((long) buf[2] << 16) |
+        	    ((long) buf[3] << 24);
+           	break;		
+	}
+	return(rt);
+}
+
+/*
+ * Input stream stdin is read until the end of file is reached or until 
+ * the section size is reached in case of ELF files. Contiguous 
+ * characters of >= min_size(default 4) will be displayed.
+ */
+int
+find_strings(const char *name, off_t offset, off_t size)
+{
+	off_t cur_off, start_off;
+	char *obuf;
+	long c;
+	int i;
+
+	if ((obuf = (char*)calloc(1, min_len + 1)) == NULL) {
+		(void) fprintf(stderr, "Unable to allocate memory: %s\n",
+		     strerror(errno));
+		return(EX_SOFTWARE);
+	}
+	
+	(void) fseeko(stdin, offset, SEEK_SET);
+	cur_off = offset;
+	start_off = 0;
+	while(1) {
+		if ((offset + size) && (cur_off >= offset + size))
+			break;
+		start_off = cur_off;
+		memset(obuf, 0, min_len+1);
+		for(i = 0; i < min_len; i++) {
+			c = getcharacter();
+			if (c == EOF && feof(stdin))
+				goto _exit1;
+		 	if (PRINTABLE(c)) {
+		 		obuf[i] = c;
+		 		obuf[i+1] = 0;
+		 		cur_off += encoding_size;
+		 	} else {
+				if (encoding == ENCODING_8BIT &&
+				    (uint8_t)c > 127) {
+			 		obuf[i] = c;
+			 		obuf[i+1] = 0;
+			 		cur_off += encoding_size;
+			 		continue;
+			 	}
+	 			cur_off += encoding_size;
+	 			break;
+		 	}
+		}
+		
+		if (i >= min_len && ((cur_off <= offset + size) ||
+		    !(offset + size))) {			    	
+			if (show_filename)
+				printf ("%s: ", name);
+			if (show_loc) {
+				switch(radix) {
+				case RADIX_DECIMAL:
+					(void) printf("%7Ld ",
+					    (uint64_t)start_off);
+					break;
+				case RADIX_HEX:
+					(void) printf("%7Lx ",
+					    (uint64_t)start_off);
+					break;
+				case RADIX_OCTAL:
+					(void) printf("%7Lo ",
+					    (uint64_t)start_off);
+					break;
+				}
+			}			    	
+			printf("%s", obuf);
+			
+			while(1) {
+				if ((offset + size) &&
+				    (cur_off >= offset + size))
+					break;
+				c = getcharacter();
+				cur_off += encoding_size;
+				if (encoding == ENCODING_8BIT &&
+				    (uint8_t)c > 127) {
+			 		putchar(c);
+			 		continue;
+			 	}
+				if (!PRINTABLE(c) || c == EOF)
+					break;
+				putchar(c);
+			}
+			putchar('\n');
+		}
+	}
+_exit1:
+	free(obuf);
+	return(EX_OK);
+}
+
+void
+usage()
+{
+	(void) fprintf(stderr,
+	    "strings [-afho] [-e s|S|l|L|b|B] [-n #] [-t o|x|d] file ...\n");
+	exit(EX_USAGE);
+}
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 |