diff options
author | Alan Modra <amodra@gmail.com> | 2014-11-24 12:41:33 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2014-11-24 12:56:59 +1030 |
commit | e05fa0bad203f7236cfe374181e1bd72ccbcaa35 (patch) | |
tree | b3b4df2711cbd31ef2d8f596f40ec56f6f80b18d /ld/emultempl/ppc64elf.em | |
parent | 1ae92035c29475c97a0795e3f93f068f8e612f25 (diff) | |
download | gdb-e05fa0bad203f7236cfe374181e1bd72ccbcaa35.zip gdb-e05fa0bad203f7236cfe374181e1bd72ccbcaa35.tar.gz gdb-e05fa0bad203f7236cfe374181e1bd72ccbcaa35.tar.bz2 |
PowerPC64 --plt-align
Alignment of plt stubs was broken, firstly because the option was
being dropped due to the alignment value not being set in the "params"
struct used in elf64-ppc.c, and secondly due to not calculating the
number of alignment boundary crossings correctly.
bfd/
* elf64-ppc.c (plt_stub_pad): Correct.
ld/
* ld.texinfo: Correct --plt-align documentation.
* emultempl/ppc64elf.em (plt_stub_align): Delete. Use and set
params.plt_stub_align instead.
Diffstat (limited to 'ld/emultempl/ppc64elf.em')
-rw-r--r-- | ld/emultempl/ppc64elf.em | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em index 59ea786..9646903 100644 --- a/ld/emultempl/ppc64elf.em +++ b/ld/emultempl/ppc64elf.em @@ -62,9 +62,6 @@ static int no_toc_opt = 0; /* Whether to sort input toc and got sections. */ static int no_toc_sort = 0; -/* Set if individual PLT call stubs should be aligned. */ -static int plt_stub_align = 0; - static asection *toc_section = 0; /* This is called before the input files are opened. We create a new @@ -377,7 +374,9 @@ ppc_add_stub_section (const char *stub_sec_name, asection *input_section) stub_sec_name, flags); if (stub_sec == NULL || !bfd_set_section_alignment (stub_file->the_bfd, stub_sec, - plt_stub_align > 5 ? plt_stub_align : 5)) + (params.plt_stub_align > 5 + ? params.plt_stub_align + : 5))) goto err_ret; output_section = input_section->output_section; @@ -800,14 +799,14 @@ PARSE_AND_LIST_ARGS_CASES=${PARSE_AND_LIST_ARGS_CASES}' unsigned long val = strtoul (optarg, &end, 0); if (*end || val > 8) einfo (_("%P%F: invalid --plt-align `%s'\''\n"), optarg); - plt_stub_align = val; + params.plt_stub_align = val; } else - plt_stub_align = 5; + params.plt_stub_align = 5; break; case OPTION_NO_PLT_ALIGN: - plt_stub_align = 0; + params.plt_stub_align = 0; break; case OPTION_STUBSYMS: |