aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/ppc32elf.em
diff options
context:
space:
mode:
Diffstat (limited to 'ld/emultempl/ppc32elf.em')
-rw-r--r--ld/emultempl/ppc32elf.em13
1 files changed, 11 insertions, 2 deletions
diff --git a/ld/emultempl/ppc32elf.em b/ld/emultempl/ppc32elf.em
index 4e71a7802cc..3007fb2f801 100644
--- a/ld/emultempl/ppc32elf.em
+++ b/ld/emultempl/ppc32elf.em
@@ -271,7 +271,7 @@ if test -z "$VXWORKS_BASE_EM_FILE" ; then
{ "bss-plt", no_argument, NULL, OPTION_OLD_PLT },
{ "speculate-indirect-jumps", no_argument, NULL, OPTION_SPECULATE_INDIRECT_JUMPS },
{ "no-speculate-indirect-jumps", no_argument, NULL, OPTION_NO_SPECULATE_INDIRECT_JUMPS },
- { "plt-align", no_argument, NULL, OPTION_PLT_ALIGN },
+ { "plt-align", optional_argument, NULL, OPTION_PLT_ALIGN },
{ "no-plt-align", no_argument, NULL, OPTION_NO_PLT_ALIGN },
{ "sdata-got", no_argument, NULL, OPTION_OLD_GOT },'
fi
@@ -369,7 +369,16 @@ PARSE_AND_LIST_ARGS_CASES=${PARSE_AND_LIST_ARGS_CASES}'
break;
case OPTION_PLT_ALIGN:
- params.plt_stub_align = 5;
+ if (optarg != NULL)
+ {
+ char *end;
+ unsigned long val = strtoul (optarg, &end, 0);
+ if (*end || val > 5)
+ einfo (_("%P%F: invalid --plt-align `%s'\''\n"), optarg);
+ params.plt_stub_align = val;
+ }
+ else
+ params.plt_stub_align = 5;
break;
case OPTION_NO_PLT_ALIGN: