Fix an attempt to free a static pointer when using objcopy's symbol addition feature.
authorNick Clifton <nickc@redhat.com>
Thu, 9 Jan 2020 16:51:04 +0000 (16:51 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 9 Jan 2020 16:51:04 +0000 (16:51 +0000)
commitffebb0bbde7deae978ab3e4d3d3d90acf52b7d69
tree946ffa070c8a85a538d86c3576a6e7fab0eedd22
parentb899eb3bb807be1094fde9a2f1c8628232bc0743
Fix an attempt to free a static pointer when using objcopy's symbol addition feature.

PR 25220
* objcopy.c (empty_name): New variable.
(need_sym_before): Prevent an attempt to free a static variable.
(filter_symbols): Avoid strcmp test by checking for pointer
equality.
binutils/ChangeLog
binutils/objcopy.c