This is the mail archive of the binutils@sourceware.org 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]

[patch] s390: tls linker relaxation bug.


Hi,
the s390 linker relaxation for local dynamic to local exec is broken.
The tls block offset of a local dynamic tls access is a literal pool
entry. The check if the input section of the R_390_TLS_LDO32
relocation is a code section is bogus since the literal pool in
general is part of the rodata section. The patch that remove the check
has been added the the cvs.

-- 
blue skies,
  Martin.

Martin Schwidefsky
Linux for zSeries Development & Services
IBM Deutschland Entwicklung GmbH

"Reality continues to ruin my life." - Calvin.

---

2006-09-20  Martin Schwidefsky  <schwidefsky@de.ibm.com>

	* elf32-s390.c (elf_s390_relocate_section): Remove check for code
	section in LD to LE linker relaxation for R_390_TLS_LDO32.
	* elf64-s390.c (elf_s390_relocate_section): Likewise for
	R_390_TLS_LDO64.

diff -urpN src/bfd/elf32-s390.c src-s390/bfd/elf32-s390.c
--- src/bfd/elf32-s390.c	2006-07-11 17:34:12.000000000 +0200
+++ src-s390/bfd/elf32-s390.c	2006-09-04 13:01:56.000000000 +0200
@@ -2927,7 +2927,7 @@ elf_s390_relocate_section (output_bfd, i
 	  continue;
 
 	case R_390_TLS_LDO32:
-	  if (info->shared || (input_section->flags & SEC_CODE) == 0)
+	  if (info->shared)
 	    relocation -= dtpoff_base (info);
 	  else
 	    /* When converting LDO to LE, we must negate.  */
diff -urpN src/bfd/elf64-s390.c src-s390/bfd/elf64-s390.c
--- src/bfd/elf64-s390.c	2006-07-11 17:34:13.000000000 +0200
+++ src-s390/bfd/elf64-s390.c	2006-09-04 13:01:51.000000000 +0200
@@ -2909,7 +2909,7 @@ elf_s390_relocate_section (output_bfd, i
 	  continue;
 
 	case R_390_TLS_LDO64:
-	  if (info->shared || (input_section->flags & SEC_CODE) == 0)
+	  if (info->shared)
 	    relocation -= dtpoff_base (info);
 	  else
 	    /* When converting LDO to LE, we must negate.  */


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