From: Ian Lance Taylor Date: Fri, 5 Apr 1996 21:22:31 +0000 (+0000) Subject: * emultempl/elf32.em (gld${EMULATION_NAME}_check_ld_so_conf): New X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6cc7365e2b682389efdaf16431189f7762805bc3;p=binutils-gdb.git * emultempl/elf32.em (gld${EMULATION_NAME}_check_ld_so_conf): New static function, if ${host} = ${target}. (gld${EMULATION_NAME}_after_open): Call check_ld_so_conf to find a needed shared library if ${host} = $[target}. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 00e4a41010d..3a08e5d8605 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,14 @@ Fri Apr 5 14:30:14 1996 Ian Lance Taylor + * emultempl/elf32.em (gld${EMULATION_NAME}_check_ld_so_conf): New + static function, if ${host} = ${target}. + (gld${EMULATION_NAME}_after_open): Call check_ld_so_conf to find a + needed shared library if ${host} = $[target}. + + * configure.host (i[345]86-*-linux*): Add -dynamic-linker to + HOSTING_CRT0. Search -lgcc both before and after -lc in + HOSTING_LIBS. + * configure.tgt: Add i[345]86-*-freebsdelf* target; from John Polstra . diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index 728b8d394ac..71e34b5abc0 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -131,6 +131,93 @@ gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry) return true; } +EOF +if [ "x${host}" = "x${target}" ] ; then +cat >>e${EMULATION_NAME}.c <= alloc) + { + alloc *= 2; + b = (char *) xrealloc (b, alloc); + } + if (c != ':' + && c != ' ' + && c != '\t' + && c != '\n' + && c != ',') + { + b[len] = c; + ++len; + } + else + { + if (len > 0 && b[len - 1] != ':') + { + b[len] = ':'; + ++len; + } + } + } + + if (len > 0 && b[len - 1] == ':') + --len; + + if (len > 0) + b[len] = '\0'; + else + { + free (b); + b = NULL; + } + + fclose (f); + + ld_so_conf = b; + } + + initialized = true; + } + + if (ld_so_conf == NULL) + return false; + + return gld${EMULATION_NAME}_search_needed (ld_so_conf, name); +} + +EOF +fi +cat >>e${EMULATION_NAME}.c <>e${EMULATION_NAME}.c <>e${EMULATION_NAME}.c <name)) + continue; +EOF +fi +cat >>e${EMULATION_NAME}.c <name, l->by); @@ -596,7 +691,7 @@ gld${EMULATION_NAME}_find_exp_assignment (exp) break; case etree_trinary: - gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.lhs); + gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.cond); gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.lhs); gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.rhs); break;