diff options
author | Marcin Kościelnicki <koriakin@0x04.net> | 2016-06-03 16:39:15 +0200 |
---|---|---|
committer | Marcin Kościelnicki <koriakin@0x04.net> | 2016-06-07 18:14:15 +0200 |
commit | 3b67f09464f771466473e64d44aa258f832d8b2d (patch) | |
tree | 49e8354a9ddacabb7aa69924e817d5520aae54eb | |
parent | 1aec0b6ad6eae1fa97bb1a4a47959ff204aa15a2 (diff) | |
download | binutils-gdb-3b67f09464f771466473e64d44aa258f832d8b2d.tar.gz |
bfd/s390: Misc minor fixes.
The only non-comment fix here is in the code writing out the 3 fixed
.got.plt entries - it mistakenly put a 64-bit 0 at offsets 8 and 12
instead of 8 and 16.
bfd/ChangeLog:
* elf32-s390.c (elf_s390_finish_dynamic_symbol): Fix comment.
* elf64-s390.c (elf_s390x_plt_entry): Fix comment.
(elf_s390_relocate_section): Fix comment.
(elf_s390_finish_dynamic_sections): Fix initialization of fixed
.got.plt entries.
-rw-r--r-- | bfd/ChangeLog | 8 | ||||
-rw-r--r-- | bfd/elf32-s390.c | 2 | ||||
-rw-r--r-- | bfd/elf64-s390.c | 8 |
3 files changed, 13 insertions, 5 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 7e4eb92e675..cb44986043d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,11 @@ +2016-06-07 Marcin Kościelnicki <koriakin@0x04.net> + + * elf32-s390.c (elf_s390_finish_dynamic_symbol): Fix comment. + * elf64-s390.c (elf_s390x_plt_entry): Fix comment. + (elf_s390_relocate_section): Fix comment. + (elf_s390_finish_dynamic_sections): Fix initialization of fixed + .got.plt entries. + 2016-06-07 Ulrich Weigand <ulrich.weigand@de.ibm.com> * elf64-s390.c (elf_s390_finish_dynamic_sections): Subtract plt diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c index f3ee40c0f7b..9480f7258ac 100644 --- a/bfd/elf32-s390.c +++ b/bfd/elf32-s390.c @@ -3691,7 +3691,7 @@ elf_s390_finish_dynamic_symbol (bfd *output_bfd, /* Put in the GOT offset as displacement value. The 0xc000 value comes from the first word of the plt entry. Look - at the elf_s390_plt_pic16_entry content. */ + at the elf_s390_plt_pic12_entry content. */ bfd_put_16 (output_bfd, (bfd_vma)0xc000 | got_offset, htab->elf.splt->contents + h->plt.offset + 2); diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c index 91600680422..cf174f8675d 100644 --- a/bfd/elf64-s390.c +++ b/bfd/elf64-s390.c @@ -492,8 +492,8 @@ elf_s390_is_local_label_name (bfd *abfd, const char *name) The GOT holds the address in the PLT to be executed. The loader then gets: - 24(15) = Pointer to the structure describing the object. - 28(15) = Offset in symbol table + 48(15) = Pointer to the structure describing the object. + 56(15) = Offset in symbol table The loader must then find the module where the function is and insert the address in the GOT. @@ -2479,7 +2479,7 @@ elf_s390_relocate_section (bfd *output_bfd, PLT_ENTRY_SIZE; /* Offset in GOT is PLT index plus GOT headers(3) - times 4, addr & GOT addr. */ + times 8, addr & GOT addr. */ relocation = (plt_index + 3) * GOT_ENTRY_SIZE; if (r_type == R_390_GOTPLTENT) relocation += htab->elf.sgot->output_section->vma; @@ -3805,7 +3805,7 @@ elf_s390_finish_dynamic_sections (bfd *output_bfd, /* One entry for shared object struct ptr. */ bfd_put_64 (output_bfd, (bfd_vma) 0, htab->elf.sgotplt->contents + 8); /* One entry for _dl_runtime_resolve. */ - bfd_put_64 (output_bfd, (bfd_vma) 0, htab->elf.sgotplt->contents + 12); + bfd_put_64 (output_bfd, (bfd_vma) 0, htab->elf.sgotplt->contents + 16); } elf_section_data (htab->elf.sgot->output_section) |