config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`;
config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`;
link_info.check_relocs_after_open_input = TRUE;
+EOF
+if test -n "$COMMONPAGESIZE"; then
+fragment <<EOF
link_info.relro = DEFAULT_LD_Z_RELRO;
+EOF
+fi
+fragment <<EOF
link_info.separate_code = DEFAULT_LD_Z_SEPARATE_CODE;
}
return FALSE;
case OPTION_BUILD_ID:
- if (ldelf_emit_note_gnu_build_id != NULL)
- {
- free ((char *) ldelf_emit_note_gnu_build_id);
- ldelf_emit_note_gnu_build_id = NULL;
- }
+ free ((char *) ldelf_emit_note_gnu_build_id);
+ ldelf_emit_note_gnu_build_id = NULL;
if (optarg == NULL)
optarg = DEFAULT_BUILD_ID_STYLE;
if (strcmp (optarg, "none"))
case OPTION_GROUP:
link_info.flags_1 |= (bfd_vma) DF_1_GROUP;
/* Groups must be self-contained. */
- link_info.unresolved_syms_in_objects = RM_GENERATE_ERROR;
- link_info.unresolved_syms_in_shared_libs = RM_GENERATE_ERROR;
+ link_info.unresolved_syms_in_objects = RM_DIAGNOSE;
+ link_info.unresolved_syms_in_shared_libs = RM_DIAGNOSE;
break;
case OPTION_EXCLUDE_LIBS:
fragment <<EOF
case 'z':
if (strcmp (optarg, "defs") == 0)
- link_info.unresolved_syms_in_objects = RM_GENERATE_ERROR;
+ link_info.unresolved_syms_in_objects = RM_DIAGNOSE;
else if (strcmp (optarg, "undefs") == 0)
link_info.unresolved_syms_in_objects = RM_IGNORE;
else if (strcmp (optarg, "muldefs") == 0)
{
link_info.flags_1 |= DF_1_GLOBAUDIT;
}
+ else if (CONST_STRNEQ (optarg, "start-stop-visibility="))
+ {
+ if (strcmp (optarg, "start-stop-visibility=default") == 0)
+ link_info.start_stop_visibility = STV_DEFAULT;
+ else if (strcmp (optarg, "start-stop-visibility=internal") == 0)
+ link_info.start_stop_visibility = STV_INTERNAL;
+ else if (strcmp (optarg, "start-stop-visibility=hidden") == 0)
+ link_info.start_stop_visibility = STV_HIDDEN;
+ else if (strcmp (optarg, "start-stop-visibility=protected") == 0)
+ link_info.start_stop_visibility = STV_PROTECTED;
+ else
+ einfo (_("%F%P: invalid visibility in \`-z %s'; "
+ "must be default, internal, hidden, or protected"),
+ optarg);
+ }
EOF
if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
link_info.combreloc = FALSE;
else if (strcmp (optarg, "nocopyreloc") == 0)
link_info.nocopyreloc = TRUE;
+EOF
+if test -n "$COMMONPAGESIZE"; then
+fragment <<EOF
else if (strcmp (optarg, "relro") == 0)
link_info.relro = TRUE;
else if (strcmp (optarg, "norelro") == 0)
link_info.relro = FALSE;
+EOF
+fi
+fragment <<EOF
else if (strcmp (optarg, "separate-code") == 0)
link_info.separate_code = TRUE;
else if (strcmp (optarg, "noseparate-code") == 0)
else if (strcmp (optarg, "nocommon") == 0)
link_info.elf_stt_common = no_elf_stt_common;
else if (strcmp (optarg, "text") == 0)
- link_info.error_textrel = TRUE;
+ link_info.textrel_check = textrel_check_error;
else if (strcmp (optarg, "notext") == 0)
- link_info.error_textrel = FALSE;
+ link_info.textrel_check = textrel_check_none;
else if (strcmp (optarg, "textoff") == 0)
- link_info.error_textrel = FALSE;
+ link_info.textrel_check = textrel_check_none;
EOF
fi
${LDEMUL_NEW_VERS_PATTERN-NULL},
${LDEMUL_EXTRA_MAP_FILE_TEXT-NULL},
${LDEMUL_EMIT_CTF_EARLY-NULL},
- ${LDEMUL_EXAMINE_STRTAB_FOR_CTF-NULL}
+ ${LDEMUL_EXAMINE_STRTAB_FOR_CTF-NULL},
+ ${LDEMUL_PRINT_SYMBOL-NULL}
};
EOF