* elf.c (bfd_section_from_shdr): Remove extraneous breaks.
[binutils.git] / ld / emultempl / vxworks.em
blob349fa548c578c89017144c4aba172d9e5d097a55
1 if test -n "$VXWORKS_BASE_EM_FILE" ; then
2 . "${srcdir}/emultempl/${VXWORKS_BASE_EM_FILE}.em"
3 fi
5 cat >>e${EMULATION_NAME}.c <<EOF
7 static int force_dynamic;
9 static void
10 vxworks_after_open (void)
12   ${LDEMUL_AFTER_OPEN-gld${EMULATION_NAME}_after_open} ();
14   if (force_dynamic
15       && link_info.input_bfds
16       && output_bfd->xvec->flavour == bfd_target_elf_flavour
17       && !_bfd_elf_link_create_dynamic_sections (link_info.input_bfds,
18                                                  &link_info))
19     einfo ("%X%P: Cannot create dynamic sections %E\n");
21   if (!force_dynamic
22       && !link_info.shared
23       && output_bfd->xvec->flavour == bfd_target_elf_flavour
24       && elf_hash_table (&link_info)->dynamic_sections_created)
25     einfo ("%X%P: Dynamic sections created in non-dynamic link\n");
28 EOF
30 PARSE_AND_LIST_PROLOGUE=$PARSE_AND_LIST_PROLOGUE'
31 enum {
32   OPTION_FORCE_DYNAMIC = 501
36 PARSE_AND_LIST_LONGOPTS=$PARSE_AND_LIST_LONGOPTS'
37   {"force-dynamic", no_argument, NULL, OPTION_FORCE_DYNAMIC},
40 PARSE_AND_LIST_OPTIONS=$PARSE_AND_LIST_OPTIONS'
41   fprintf (file, _("\
42   --force-dynamic       Always create dynamic sections\n"));
45 PARSE_AND_LIST_ARGS_CASES=$PARSE_AND_LIST_ARGS_CASES'
46     case OPTION_FORCE_DYNAMIC:
47       force_dynamic = 1;
48       break;
51 LDEMUL_AFTER_OPEN=vxworks_after_open