aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/alphaelf.em
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-11-26 13:45:25 +0000
committerNick Clifton <nickc@redhat.com>2009-11-26 13:45:25 +0000
commit28d5f6774058f4c7d5141b1dda8b76ee81f8cf4f (patch)
treed2a5b9ce35ec5ae61d04c98564ff51460d3ec818 /ld/emultempl/alphaelf.em
parentf1b9c60a8f8a6471f328fd1e1744c8592f63dd59 (diff)
downloadgdb-28d5f6774058f4c7d5141b1dda8b76ee81f8cf4f.zip
gdb-28d5f6774058f4c7d5141b1dda8b76ee81f8cf4f.tar.gz
gdb-28d5f6774058f4c7d5141b1dda8b76ee81f8cf4f.tar.bz2
PR ld/10956
* ld.h (struct args_type): Rename 'relax' field to 'disable_target_specific_optimizations' and turn it into a tri-state variable. (RELAXATION_DISABLED_BY_DEFAULT): New macro. (RELAXATION_DISABLED_BY_USER): New macro. (RELAXATION_ENABLED): New macro. (DISABLE_RELAXATION): New macro. (ENABLE_RELAXATION): New macro. * lexsup (enum option_values): Add OPTION_NO_RELAX. (struct ld_options): Add --no-relax. (parse_args): Handle OPTION_NO_RELAX. Use DISABLE_RELAXATION and ENABLE_RELAXATION macros. * ldlang.c (lang_relax_sections): Use RELAXATION_ENABLED macro. (lang_process): Likewise. * ldmain.c (main): Initialise disable_target_specific_optimizations field. (multiple_definition): Use RELAXATION_ENABLED macro. * ld.texinfo: Document new command line option. * emultempl/alphaelf.em: Remove --no-relax option. (before_allocation): Test RELAXATION_DISABLED_BY_USER macro. Use ENABLE_RELAXATION macro. * emultempl/avrelf.em: (after_allocation): Test RELAXATION_ENABLED macro. * emultempl/cr16elf.em: Remove --no-relax option. (before_allocation): Test RELAXATION_DISABLED_BY_USER macro. Use ENABLE_RELAXATION macro. * emultempl/crxelf.em: Remove --no-relax option. (before_allocation): Test RELAXATION_DISABLED_BY_USER macro. Use ENABLE_RELAXATION macro. * emultempl/mmix-elfnmmo.em: (before_allocation): Use ENABLE_RELAXATION macro. * emultempl/needrelax.em: (before_allocation): Use ENABLE_RELAXATION macro. * emultempl/ppc32elf.em: (before_allocation): Test RELAXATION_DISABLED_BY_DEFAULT macro. Use ENABLE_RELAXATION macro. * emultempl/sh64elf.em: (before_allocation): Test RELAXATION_ENABLED macro. Use DISABLE_RELAXATION macro. * emultempl/xtensaelf.em: Remove --no-relax option. (before_allocation): Test RELAXATION_ENABLED macro. Use ENABLE_RELAXATION macro.
Diffstat (limited to 'ld/emultempl/alphaelf.em')
-rw-r--r--ld/emultempl/alphaelf.em13
1 files changed, 3 insertions, 10 deletions
diff --git a/ld/emultempl/alphaelf.em b/ld/emultempl/alphaelf.em
index 864e699..7b7c8d7 100644
--- a/ld/emultempl/alphaelf.em
+++ b/ld/emultempl/alphaelf.em
@@ -30,7 +30,6 @@ fragment <<EOF
#include "elf-bfd.h"
static bfd_boolean limit_32bit;
-static bfd_boolean disable_relaxation;
extern bfd_boolean elf64_alpha_use_secureplt;
@@ -91,8 +90,8 @@ alpha_before_allocation (void)
gld${EMULATION_NAME}_before_allocation ();
/* Add -relax if -O, not -r, and not explicitly disabled. */
- if (link_info.optimize && !link_info.relocatable && !disable_relaxation)
- command_line.relax = TRUE;
+ if (link_info.optimize && !link_info.relocatable && ! RELAXATION_DISABLED_BY_USER)
+ ENABLE_RELAXATION;
}
static void
@@ -110,14 +109,12 @@ EOF
#
PARSE_AND_LIST_PROLOGUE='
#define OPTION_TASO 300
-#define OPTION_NO_RELAX (OPTION_TASO + 1)
-#define OPTION_SECUREPLT (OPTION_NO_RELAX + 1)
+#define OPTION_SECUREPLT (OPTION_TASO + 1)
#define OPTION_NO_SECUREPLT (OPTION_SECUREPLT + 1)
'
PARSE_AND_LIST_LONGOPTS='
{ "taso", no_argument, NULL, OPTION_TASO },
- { "no-relax", no_argument, NULL, OPTION_NO_RELAX },
{ "secureplt", no_argument, NULL, OPTION_SECUREPLT },
{ "no-secureplt", no_argument, NULL, OPTION_NO_SECUREPLT },
'
@@ -126,7 +123,6 @@ PARSE_AND_LIST_OPTIONS='
fprintf (file, _("\
--taso Load executable in the lower 31-bit addressable\n\
virtual address range.\n\
- --no-relax Do not relax call and gp sequences.\n\
--secureplt Force PLT in text segment.\n\
--no-secureplt Force PLT in data segment.\n\
"));
@@ -136,9 +132,6 @@ PARSE_AND_LIST_ARGS_CASES='
case OPTION_TASO:
limit_32bit = 1;
break;
- case OPTION_NO_RELAX:
- disable_relaxation = TRUE;
- break;
case OPTION_SECUREPLT:
elf64_alpha_use_secureplt = TRUE;
break;