This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: undefined symbols in shared libraries
- From: Robert Schweikert <Robert dot Schweikert at abaqus dot com>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: nickc at redhat dot com, binutils <binutils at sources dot redhat dot com>
- Date: 12 Mar 2004 16:51:07 -0500
- Subject: Re: PATCH: undefined symbols in shared libraries
- Organization: ABAQUS
- References: <20040311211808.GA5075@lucon.org>
Thanks,
This patch does the trick. I will now test whether there are any
negative side effects and if not I will make the linker with this patch
the default.
Thanks again,
Robert
On Thu, 2004-03-11 at 16:18, H. J. Lu wrote:
> RELOC_FOR_GLOBAL_SYMBOL is used to relocate sections in objects. It
> should report error if unresolved symbols in objects aren't allowed.
> It shouldn't check unresolved_syms_in_shared_libs since the undefined
> symbol is in objects, not in the input shared libraries.
>
>
> H.J.
> ----
> 2004-03-11 H.J. Lu <hongjiu.lu@intel.com>
>
> * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
> unresolved symbols in objects aren't allowed.
>
> --- bfd/elf-bfd.h.defs 2004-02-29 21:07:42.000000000 -0800
> +++ bfd/elf-bfd.h 2004-03-11 13:05:22.000000000 -0800
> @@ -1766,8 +1766,7 @@ extern bfd_boolean _sh_elf_set_mach_from
> if (! info->callbacks->undefined_symbol \
> (info, h->root.root.string, input_bfd, \
> input_section, rel->r_offset, \
> - ((info->shared && info->unresolved_syms_in_shared_libs == RM_GENERATE_ERROR) \
> - || (!info->shared && info->unresolved_syms_in_objects == RM_GENERATE_ERROR) \
> + (info->unresolved_syms_in_objects == RM_GENERATE_ERROR \
> || ELF_ST_VISIBILITY (h->other)) \
> )) \
> return FALSE; \
--
Robert Schweikert <Robert.Schweikert@abaqus.com>
ABAQUS