This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] S/390: correct plt entry size for 31bit
- From: Andreas Krebbel <Andreas dot Krebbel at de dot ibm dot com>
- To: binutils at sourceware dot org
- Cc: schwidefsky dot de dot ibm dot com at blc4eb430604175 dot ibm dot com
- Date: Wed, 14 Feb 2007 11:28:23 +0100
- Subject: [PATCH] S/390: correct plt entry size for 31bit
Hi,
I've noticed that the entry size value in the section header for a s390
(31bit) plt section is wrong - currently it is always set to 4.
I've discussed that already with Martin and he wasn't sure whether
that can be changed safely. Hopefully someone on that list might give us a
hint.
Obviously that change leads to coexisting binaries which according to
readelf have different plt entry sizes.
I don't see a problem here but maybe there are tools relying on that
value which we aren't aware of.
So here is the trivial patch. I've tested it by building a 31bit executable
and checking whether readelf returns the correct value for its plt entry sizes.
Bye,
-Andreas-
2007-02-14 Andreas Krebbel <krebbel1@de.ibm.com>
* bfd/elf32-s390.c (elf_s390_finish_dynamic_sections): Set sh_entsize
to PLT_ENTRY_SIZE.
Index: bfd/elf32-s390.c
===================================================================
*** bfd/elf32-s390.c.orig 2006-05-26 18:34:05.000000000 +0200
--- bfd/elf32-s390.c 2007-02-14 11:03:49.000000000 +0100
*************** elf_s390_finish_dynamic_sections (output
*** 3468,3474 ****
htab->splt->contents + 24);
}
elf_section_data (htab->splt->output_section)
! ->this_hdr.sh_entsize = 4;
}
}
--- 3468,3474 ----
htab->splt->contents + 24);
}
elf_section_data (htab->splt->output_section)
! ->this_hdr.sh_entsize = PLT_ENTRY_SIZE;
}
}