Commit Graph

10 Commits

Author SHA1 Message Date
Bryan Drewery
64ee145b7d Tweak BSS symbol handling from r281811 to not consider them unresolved 2015-04-21 05:41:56 +00:00
Bryan Drewery
5f6c4518c8 Support libraries linked by path.
Sponsored by:	EMC / Isilon Storage Division
2015-04-21 05:10:18 +00:00
Bryan Drewery
3554283a7b - For executables search for matching (B) global uninitialized BSS symbols from
linked libraries. Only do this for BSS symbols that have a size which avoids
  __bss_start. Without this some libraries would be considered unneeded even
  though they were providing a B symbol.
- Add in the symbols from crt1.o to cover a handful of common unresolved symbols.
- Consider (C) common data symbols as provided by libraries/crt1.
- Move libkey() function to more appropriate place.

Sponsored by:	EMC / Isilon Storage Division
2015-04-21 03:29:03 +00:00
Bryan Drewery
60b38ce2b5 Revert r281805 for now as it breaks due to spaces in output 2015-04-21 03:06:58 +00:00
Bryan Drewery
c668010e3f Pass full path to ldd(1) so it works on files in cwd. 2015-04-21 02:02:25 +00:00
Bryan Drewery
9d273a1ffc Support demangling C++ symbols with -D flag.
Sponsored by:	EMC / Isilon Storage Division
2015-04-21 01:37:14 +00:00
Bryan Drewery
3844bbe29e - Speedup significantly by not using subshells for data already fetched.
Ran against /usr/local/sbin/pkg:
   Before:  25.12 real        12.41 user        33.14 sys
   After:   0.53 real         0.49 user         0.13 sys
- Exit with 1 if any missing or unresolved symbol is detected.
- Add option '-U' to skip looking up unresolved symbols.
- Don't consider provided weak objects as unresolved (nm V).

Sponsored by:	EMC / Isilon Storage Division
2015-04-20 20:51:19 +00:00
Bryan Drewery
972b622794 Fix indentation to use tabs 2015-04-20 20:45:10 +00:00
Bryan Drewery
daa301d1d0 - Fix support with new elftoolchain readelf(1)
- Fix not finding global symbols by checking for D and R.
- Follow symlinks
- Show which matching symbol was used to consider the library needed.

Discussed with:	bapt
2015-04-09 22:16:35 +00:00
Baptiste Daroussin
6276797fcd Add a quick and dirty script to check validity of links in elf files 2014-11-06 22:45:03 +00:00