From d4ae5fb0b5d1ae4270b3343509e8bd2d529aa291 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 14 Mar 2014 11:25:59 +1030 Subject: Remove search path from -l:namespec DT_NEEDED For libraries without a soname, -l:libfoo.so set DT_NEEDED to the search dir plus filename, while gold and -lfoo just use the filename. This patch fixes the inconsistency. * ldlang.h (full_name_provided): New input flag. * ldlang.c (new_afile): Don't use lang_input_file_is_search_file_enum for -l:namespec. Instead use lang_input_file_is_l_enum with full_name_provided flag. * ldlfile.c (ldfile_open_file_search): Don't complete lib name if full_name_provided flag is set. * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive): Handle full_name_provided libraries. Tidy EXTRA_SHLIB_EXTENSION support. Set DT_NEEDED for -l:namespec as namespec. * emultempl/aix.em (ppc_after_open_output): Handle full_name_provided. * emultempl/linux.em (gld${EMULATION_NAME}_open_dynamic_archive): Don't handle full_name_provided libraries. * emultempl/pe.em (gld${EMULATION_NAME}_open_dynamic_archive): Ditto. * emultempl/pep.em (gld${EMULATION_NAME}_open_dynamic_archive): Ditto. * emultempl/vms.em (gld${EMULATION_NAME}_open_dynamic_archive): Ditto. --- ld/emultempl/vms.em | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ld/emultempl/vms.em') diff --git a/ld/emultempl/vms.em b/ld/emultempl/vms.em index 08650f5..b1f61d5 100644 --- a/ld/emultempl/vms.em +++ b/ld/emultempl/vms.em @@ -57,7 +57,7 @@ gld${EMULATION_NAME}_open_dynamic_archive (const char *arch ATTRIBUTE_UNUSED, { char *string; - if (! entry->flags.maybe_archive) + if (! entry->flags.maybe_archive || entry->flags.full_name_provided) return FALSE; string = (char *) xmalloc (strlen (search->name) -- cgit v1.1