From dd307afc686e725facd2ef2c4a58db196d159956 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 13 Jun 2002 02:43:23 +0000 Subject: [PATCH] 2002-06-12 H.J. Lu * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Return false if xvec doesn't match. --- ld/ChangeLog | 5 +++++ ld/emultempl/elf32.em | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/ld/ChangeLog b/ld/ChangeLog index f1701025b..6fb172aa1 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2002-06-12 H.J. Lu + + * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Return + false if xvec doesn't match. + 2002-06-10 Richard Sandiford * ldlang.c (lang_size_sections_1): Skip removed output sections. diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index e854c2a3f..cfd0409be 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -281,6 +281,13 @@ gld${EMULATION_NAME}_try_needed (name, force) return false; } + /* For DT_NEEDED, they have to match. */ + if (abfd->xvec != output_bfd->xvec) + { + bfd_close (abfd); + return false; + } + /* Check whether this object would include any conflicting library versions. If FORCE is set, then we skip this check; we use this the second time around, if we couldn't find any compatible -- 2.11.4.GIT