From 12b9ff6c8bf7bd8040dfdd5a05bcf24672b30b3e Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 7 Sep 2005 05:01:53 +0000 Subject: [PATCH] 2005-09-06 H.J. Lu PR ld/1263 * emultempl/elf32.em (gld${EMULATION_NAME}_load_symbols): Check --just-symbols on DSO. --- ld/ChangeLog | 6 ++++++ ld/emultempl/elf32.em | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/ld/ChangeLog b/ld/ChangeLog index 7f12bc7d5bc..f703b31e3c5 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2005-09-06 H.J. Lu + + PR ld/1263 + * emultempl/elf32.em (gld${EMULATION_NAME}_load_symbols): Check + --just-symbols on DSO. + 2005-08-18 Alan Modra * scripttempl/elf.sc: Remove commented out defines. diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index 2764a59d968..15d27227fbc 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -124,6 +124,11 @@ gld${EMULATION_NAME}_load_symbols (lang_input_statement_type *entry) if (!entry->add_needed) class |= DYN_NO_ADD_NEEDED; + if (entry->just_syms_flag + && (bfd_get_file_flags (entry->the_bfd) & DYNAMIC) != 0) + einfo (_("%P%F: --just-symbols may not be used on DSO: %B\n"), + entry->the_bfd); + if (!class || (bfd_get_file_flags (entry->the_bfd) & DYNAMIC) == 0) return FALSE;