diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2016-07-12 15:33:47 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2016-07-12 15:33:47 -0700 |
commit | 37567a2cdd8823c5700ec83b757179083446bf07 (patch) | |
tree | 7f039edd70571cba2798dd5321322bfcfd32c1dd /bfd/elf64-x86-64.c | |
parent | e0f3fd7c44cebec7d787893b9c800e7de509cb32 (diff) | |
download | gdb-37567a2cdd8823c5700ec83b757179083446bf07.zip gdb-37567a2cdd8823c5700ec83b757179083446bf07.tar.gz gdb-37567a2cdd8823c5700ec83b757179083446bf07.tar.bz2 |
Align x86-64 .got/.got.plt sections to 8 bytes
Align x86-64 .got and .got.plt sections to their entry size.
* elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
.got/.got.plt sections to 8 bytes.
Diffstat (limited to 'bfd/elf64-x86-64.c')
-rw-r--r-- | bfd/elf64-x86-64.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index f920208..c8bbed8 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -1162,6 +1162,17 @@ elf_x86_64_create_dynamic_sections (bfd *dynobj, || !bfd_set_section_alignment (dynobj, htab->plt_eh_frame, 3)) return FALSE; } + + /* Align .got section to its entry size. */ + if (htab->elf.sgot != NULL + && !bfd_set_section_alignment (dynobj, htab->elf.sgot, 3)) + return FALSE; + + /* Align .got.plt section to its entry size. */ + if (htab->elf.sgotplt != NULL + && !bfd_set_section_alignment (dynobj, htab->elf.sgotplt, 3)) + return FALSE; + return TRUE; } |