mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-21 18:39:34 +08:00
fix undefined reference to bfd_link_plugin_object_p during link
When configured with the default options, GDB currently fails to link, due to an undefined reference to bfd_link_plugin_object_p, coming from elflink.c: #ifdef BFD_SUPPORTS_PLUGINS || (abfd->plugin_format == bfd_plugin_unknown && bfd_link_plugin_object_p (abfd)) #endif This is because BFD_SUPPORTS_PLUGINS is always defined. It is its value that determines whether plugin support is enabled or not. bfd/ChangeLog: * elflink.c: Check the value of BFD_SUPPORTS_PLUGINS rather than its existance.
This commit is contained in:
@ -28,7 +28,7 @@
|
|||||||
#include "safe-ctype.h"
|
#include "safe-ctype.h"
|
||||||
#include "libiberty.h"
|
#include "libiberty.h"
|
||||||
#include "objalloc.h"
|
#include "objalloc.h"
|
||||||
#ifdef BFD_SUPPORTS_PLUGINS
|
#if BFD_SUPPORTS_PLUGINS
|
||||||
#include "plugin.h"
|
#include "plugin.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -3134,7 +3134,7 @@ elf_link_is_defined_archive_symbol (bfd * abfd, carsym * symdef)
|
|||||||
object file is an IR object, give linker LTO plugin a chance to
|
object file is an IR object, give linker LTO plugin a chance to
|
||||||
get the correct symbol table. */
|
get the correct symbol table. */
|
||||||
if (abfd->plugin_format == bfd_plugin_yes
|
if (abfd->plugin_format == bfd_plugin_yes
|
||||||
#ifdef BFD_SUPPORTS_PLUGINS
|
#if BFD_SUPPORTS_PLUGINS
|
||||||
|| (abfd->plugin_format == bfd_plugin_unknown
|
|| (abfd->plugin_format == bfd_plugin_unknown
|
||||||
&& bfd_link_plugin_object_p (abfd))
|
&& bfd_link_plugin_object_p (abfd))
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user