From 4724d37ec271a50c31dbebb13c424881b057e8d5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 21 Nov 2012 19:56:38 +0000 Subject: ld/ * ld.h (ld_config_type): New flag member separate_code. * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set it based on $SEPARATE_CODE. * ldlang.c (ldlang_override_segment_assignment): If it's set, then always return TRUE when SEC_CODE differs between the sections. --- ld/emultempl/elf32.em | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'ld/emultempl') diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index acb01e5..6c84b82 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -104,6 +104,7 @@ gld${EMULATION_NAME}_before_parse (void) ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`); input_flags.dynamic = ${DYNAMIC_LINK-TRUE}; 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`; } EOF @@ -140,7 +141,7 @@ gld${EMULATION_NAME}_load_symbols (lang_input_statement_type *entry) return FALSE; bfd_elf_set_dyn_lib_class (entry->the_bfd, - (enum dynamic_lib_link_class) link_class); + (enum dynamic_lib_link_class) link_class); /* Continue on with normal load_symbols processing. */ return FALSE; @@ -1104,7 +1105,7 @@ gld${EMULATION_NAME}_after_open (void) { struct elf_obj_tdata *t = elf_tdata (link_info.output_bfd); struct build_id_info *b = - (struct build_id_info *) xmalloc (sizeof *b); + (struct build_id_info *) xmalloc (sizeof *b); b->style = link_info.emit_note_gnu_build_id; b->sec = s; @@ -1439,7 +1440,7 @@ if test x"$LDEMUL_BEFORE_ALLOCATION" != xgld"$EMULATION_NAME"_before_allocation; fragment <