This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fwd: s390x fixes for binutils-2.12.


I checked in two fixes for s/390 today. The latest linux binutils-2.12.90.0.12
misbehaved on 31 & 64 bit s/390. The 64 bit problem is the section
aligment of rela.dyn which needs to be 8 and not 4. I changed the
section alignment of .got to 8 as well. Makes more sense.

2002-07-02  Martin Schwidefsky  <schwidefsky@de.ibm.com>

	* elf64-s390.c (create_got_section): Set .got section alignment to
	8 bytes.
	(elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.

Index: elf64-s390.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-s390.c,v
retrieving revision 1.27
diff -u -r1.27 elf64-s390.c
--- elf64-s390.c	1 Jul 2002 08:06:45 -0000	1.27
+++ elf64-s390.c	2 Jul 2002 08:49:52 -0000
@@ -471,7 +471,7 @@
 				  (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
 				   | SEC_IN_MEMORY | SEC_LINKER_CREATED
 				   | SEC_READONLY))
-      || ! bfd_set_section_alignment (dynobj, htab->srelgot, 2))
+      || ! bfd_set_section_alignment (dynobj, htab->srelgot, 3))
     return false;
   return true;
 }
@@ -776,7 +776,7 @@
 			flags |= SEC_ALLOC | SEC_LOAD;
 		      if (sreloc == NULL
 			  || ! bfd_set_section_flags (dynobj, sreloc, flags)
-			  || ! bfd_set_section_alignment (dynobj, sreloc, 2))
+			  || ! bfd_set_section_alignment (dynobj, sreloc, 3))
 			return false;
 		    }
 		  elf_section_data (sec)->sreloc = sreloc;

The 31 bit problem is the adjustement of merge section relocations. It turned
out that it is not enough to prevent only pc-relative relcoations in
tc_s390_fix_adjustable. I get warnings about accesses beyond the end of
merged sections if non pc-relative relocations can be adjusted.

2002-07-02  Martin Schwidefsky  <schwidefsky@de.ibm.com>

	* config/tc-s390.c (tc_s390_fix_adjustable): Prevent any adjustment
	to symbols in merge sections, even non pc-relative ones.

Index: tc-s390.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-s390.c,v
retrieving revision 1.19
diff -u -r1.19 tc-s390.c
--- tc-s390.c	8 Jun 2002 07:37:15 -0000	1.19
+++ tc-s390.c	2 Jul 2002 08:52:10 -0000
@@ -1633,9 +1633,8 @@
     return 0;
   if (S_IS_WEAK (fixP->fx_addsy))
     return 0;
-  /* Don't adjust pc-relative references to merge sections.  */
-  if ((S_GET_SEGMENT (fixP->fx_addsy)->flags & SEC_MERGE) != 0
-      && fixP->fx_pcrel)
+  /* Don't adjust references to merge sections.  */
+  if ((S_GET_SEGMENT (fixP->fx_addsy)->flags & SEC_MERGE) != 0)
     return 0;
   /* adjust_reloc_syms doesn't know about the GOT.  */
   if (   fixP->fx_r_type == BFD_RELOC_32_GOTOFF


-------------------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]