This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[patch] S/390: Optimize 64-bit local relocs -> section relocs [with the patch now]
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Martin Schwidefsky <schwidefsky at de dot ibm dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 14 Apr 2008 22:39:42 +0200
- Subject: [patch] S/390: Optimize 64-bit local relocs -> section relocs [with the patch now]
- References: <20080414203845.GA9405@host0.dyn.jankratochvil.net>
Hi,
in the patch
http://sources.redhat.com/ml/binutils/2002-07/msg00036.html
you disallowed non-pc-rel relocs to merge sections for both 31-bit and 64-bit
S/390.
But the comment there references only unspecific 31-bit problems.
Is it safe to permit again the non-pc-rel relocs at least on 64-bit s/390?
Linux kernel built with this patch runs fine but not sure about other programs.
The patch reduces s390x Linux kernel rpms size base+debuginfo 25M+66M -> 6M+60M.
(Some of the info was found by Jakub Jelinek.)
Regards,
Jan
2008-04-14 Jan Kratochvil <jan.kratochvil@redhat.com>
* config/tc-s390.c (tc_s390_fix_adjustable): Permit an adjustment to
symbols in merge sections for 64-bit non pc-relative ones.
--- gas/config/tc-s390.c 19 Mar 2008 10:29:17 -0000 1.55
+++ gas/config/tc-s390.c 10 Apr 2008 20:06:59 -0000
@@ -1856,8 +1856,10 @@ int
tc_s390_fix_adjustable (fixP)
fixS *fixP;
{
- /* Don't adjust references to merge sections. */
- if ((S_GET_SEGMENT (fixP->fx_addsy)->flags & SEC_MERGE) != 0)
+ /* Don't adjust pc-relative references to merge sections but for the 32-bit
+ mode moreover disallow any relocations to the merge sections. */
+ if ((S_GET_SEGMENT (fixP->fx_addsy)->flags & SEC_MERGE) != 0
+ && (s390_arch_size == 32 || fixP->fx_pcrel))
return 0;
/* adjust_reloc_syms doesn't know about the GOT. */
if ( fixP->fx_r_type == BFD_RELOC_16_GOTOFF