CVS commit: src/libexec/ld.elf_so/arch/powerpc

2023-04-09 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Apr  9 17:24:48 UTC 2023

Modified Files:
src/libexec/ld.elf_so/arch/powerpc: Makefile.inc
Removed Files:
src/libexec/ld.elf_so/arch/powerpc: ld.so.script

Log Message:
ld.elf_so powerpc: remove bogus ldscript

This ldscript is not needed and actually makes things worse by putting
everything in one LOAD section, which then needs to have rwx permission.
Remove it so that we get two LOAD sections with better permissions.
Fixes PR 57323.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/libexec/ld.elf_so/arch/powerpc/Makefile.inc
cvs rdiff -u -r1.4 -r0 src/libexec/ld.elf_so/arch/powerpc/ld.so.script

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/libexec/ld.elf_so/arch/powerpc/Makefile.inc
diff -u src/libexec/ld.elf_so/arch/powerpc/Makefile.inc:1.16 src/libexec/ld.elf_so/arch/powerpc/Makefile.inc:1.17
--- src/libexec/ld.elf_so/arch/powerpc/Makefile.inc:1.16	Tue Apr  3 21:10:27 2018
+++ src/libexec/ld.elf_so/arch/powerpc/Makefile.inc	Sun Apr  9 17:24:48 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.16 2018/04/03 21:10:27 joerg Exp $
+#	$NetBSD: Makefile.inc,v 1.17 2023/04/09 17:24:48 chs Exp $
 
 SRCS+=		ppc_reloc.c
 LDFLAGS+=	-Wl,-e,_rtld_start
@@ -12,5 +12,4 @@ CPPFLAGS+=	-DELFSIZE=64
 .else
 SRCS+=		rtld_start.S
 CPPFLAGS+=	-DELFSIZE=32
-LDFLAGS+=	-Wl,--script,${.CURDIR}/arch/powerpc/ld.so.script
 .endif



CVS commit: src/libexec/ld.elf_so/arch/powerpc

2023-04-09 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Apr  9 17:24:48 UTC 2023

Modified Files:
src/libexec/ld.elf_so/arch/powerpc: Makefile.inc
Removed Files:
src/libexec/ld.elf_so/arch/powerpc: ld.so.script

Log Message:
ld.elf_so powerpc: remove bogus ldscript

This ldscript is not needed and actually makes things worse by putting
everything in one LOAD section, which then needs to have rwx permission.
Remove it so that we get two LOAD sections with better permissions.
Fixes PR 57323.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/libexec/ld.elf_so/arch/powerpc/Makefile.inc
cvs rdiff -u -r1.4 -r0 src/libexec/ld.elf_so/arch/powerpc/ld.so.script

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/libexec/ld.elf_so/arch/powerpc

2022-07-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jul  6 17:35:20 UTC 2022

Modified Files:
src/libexec/ld.elf_so/arch/powerpc: ppc_reloc.c

Log Message:
Fix copy & pasto: DTPREL relocations do not need to allocate a static
TLS index. Patch from joerg@


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c
diff -u src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c:1.61 src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c:1.62
--- src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c:1.61	Sun May 24 02:33:11 2020
+++ src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c	Wed Jul  6 17:35:20 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: ppc_reloc.c,v 1.61 2020/05/24 02:33:11 macallan Exp $	*/
+/*	$NetBSD: ppc_reloc.c,v 1.62 2022/07/06 17:35:20 martin Exp $	*/
 
 /*-
  * Copyright (C) 1998	Tsubai Masanari
@@ -30,7 +30,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: ppc_reloc.c,v 1.61 2020/05/24 02:33:11 macallan Exp $");
+__RCSID("$NetBSD: ppc_reloc.c,v 1.62 2022/07/06 17:35:20 martin Exp $");
 #endif /* not lint */
 
 #include 
@@ -313,9 +313,6 @@ _rtld_relocate_nonplt_objects(Obj_Entry 
 			break;
 
 		case R_TYPE(DTPREL):
-			if (!defobj->tls_done && _rtld_tls_offset_allocate(obj))
-return -1;
-
 			*where = (Elf_Addr)(def->st_value + rela->r_addend
 			- TLS_DTV_OFFSET);
 			rdbg(("DTPREL32 %s in %s --> %p in %s",



CVS commit: src/libexec/ld.elf_so/arch/powerpc

2022-07-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jul  6 17:35:20 UTC 2022

Modified Files:
src/libexec/ld.elf_so/arch/powerpc: ppc_reloc.c

Log Message:
Fix copy & pasto: DTPREL relocations do not need to allocate a static
TLS index. Patch from joerg@


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/libexec/ld.elf_so/arch/powerpc

2011-11-01 Thread Chuck Silvers
On Fri, Oct 28, 2011 at 07:53:22AM +0100, David Laight wrote:
 On Wed, Oct 26, 2011 at 03:56:58PM +, Chuck Silvers wrote:
  Module Name:src
  Committed By:   chs
  Date:   Wed Oct 26 15:56:58 UTC 2011
  
  Modified Files:
  src/libexec/ld.elf_so/arch/powerpc: Makefile.inc
  
  Log Message:
  avoid linker warnings with the new binutils by not forcing ld.elf_so
  to be soft-float.  the floating-point usage in ld.elf_so is only
  because of stdarg functions like printf(), and gcc 4.5 is good
  about not actually executing the FP instructions in such functions
  unless FP values are passed to them, which ld.elf_so doesn't do.
 
 I thought gcc had a habit of using FP registers for memory copy?
 (Or some other integer-only action)
 Or is that only a problem with specific architectures due to the
 way the instruction set has been defined to gcc.

that kind of thing is always platform-specific.
the only FP instructions that I see in ld.elf_so on powerpc are for stdarg 
stuff,
so it doesn't look like it's a problem here.

-Chuck


Re: CVS commit: src/libexec/ld.elf_so/arch/powerpc

2011-10-28 Thread David Laight
On Wed, Oct 26, 2011 at 03:56:58PM +, Chuck Silvers wrote:
 Module Name:  src
 Committed By: chs
 Date: Wed Oct 26 15:56:58 UTC 2011
 
 Modified Files:
   src/libexec/ld.elf_so/arch/powerpc: Makefile.inc
 
 Log Message:
 avoid linker warnings with the new binutils by not forcing ld.elf_so
 to be soft-float.  the floating-point usage in ld.elf_so is only
 because of stdarg functions like printf(), and gcc 4.5 is good
 about not actually executing the FP instructions in such functions
 unless FP values are passed to them, which ld.elf_so doesn't do.

I thought gcc had a habit of using FP registers for memory copy?
(Or some other integer-only action)
Or is that only a problem with specific architectures due to the
way the instruction set has been defined to gcc.

David

-- 
David Laight: da...@l8s.co.uk