Skip to content
Snippets Groups Projects
  • Alan Modra's avatar
    160f2007
    Re: Move nm.c cached line number info to bfd usrdata · 160f2007
    Alan Modra authored
    Commit e3f450f3 resulted in a nm -l segfault on object files
    without undefined symbols.  Fix that, and be paranoid about bfd
    section count changing.
    
    	* nm.c (struct lineno_cache): Add seccount.
    	(free_lineno_cache): Don't segfault on NULL lc->relocs.
    	(print_symbol): Stash section count when creating arrays.
    160f2007
    History
    Re: Move nm.c cached line number info to bfd usrdata
    Alan Modra authored
    Commit e3f450f3 resulted in a nm -l segfault on object files
    without undefined symbols.  Fix that, and be paranoid about bfd
    section count changing.
    
    	* nm.c (struct lineno_cache): Add seccount.
    	(free_lineno_cache): Don't segfault on NULL lc->relocs.
    	(print_symbol): Stash section count when creating arrays.