All of lore.kernel.org
 help / color / mirror / Atom feed
* [parisc-linux] ldd under 2.4.7 kernel
@ 2001-08-10 16:47 Richard Hirst
  0 siblings, 0 replies; only message in thread
From: Richard Hirst @ 2001-08-10 16:47 UTC (permalink / raw)
  To: parisc-linux

ldd doesn't work under a 2.4.7 kernel; Willy is working on the proper
fix, but I thought it useful to post my work-around, as I'm about to take
two weeks holiday.

Richard


Index: fs/binfmt_elf.c
===================================================================
RCS file: /home/cvs/parisc/linux/fs/binfmt_elf.c,v
retrieving revision 1.20
diff -u -r1.20 binfmt_elf.c
--- binfmt_elf.c	2001/08/01 15:26:52	1.20
+++ binfmt_elf.c	2001/08/10 16:41:56
@@ -9,6 +9,8 @@
  * Copyright 1993, 1994: Eric Youngdale (ericy@cais.com).
  */
 
+#define RGH_FIX
+
 #include <linux/module.h>
 
 #include <linux/fs.h>
@@ -153,6 +155,10 @@
 	 */
 	ARCH_DLINFO;
 #endif
+#ifdef RGH_FIX
+	if (exec)
+#endif
+	{
 	NEW_AUX_ENT(AT_PHDR, load_addr + exec->e_phoff);
 	NEW_AUX_ENT(AT_PHENT, sizeof (struct elf_phdr));
 	NEW_AUX_ENT(AT_PHNUM, exec->e_phnum);
@@ -163,6 +169,7 @@
 	NEW_AUX_ENT(AT_EUID, current->euid);
 	NEW_AUX_ENT(AT_GID, current->gid);
 	NEW_AUX_ENT(AT_EGID, current->egid);
+	}
 	NEW_AUX_ENT(AT_HWCAP, ELF_HWCAP);
 	NEW_AUX_ENT(AT_PAGESZ, ELF_EXEC_PAGESIZE);
 	NEW_AUX_ENT(AT_CLKTCK, CLOCKS_PER_SEC);
@@ -714,8 +721,14 @@
 
 	compute_creds(bprm);
 	current->flags &= ~PF_FORKNOEXEC;
+#ifdef RGH_FIX
+	create_elf_tables(bprm, (interpreter_type == INTERPRETER_ELF ? &elf_ex : NULL),
+			(interpreter_type == INTERPRETER_AOUT),
+			load_addr, interp_load_addr);
+#else
 	create_elf_tables(bprm, &elf_ex, (interpreter_type == INTERPRETER_AOUT),
 			load_addr, interp_load_addr);
+#endif
 	/* N.B. passed_fileno might not be initialized? */
 	if (interpreter_type == INTERPRETER_AOUT)
 		current->mm->arg_start += strlen(passed_fileno) + 1;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-08-10 16:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-10 16:47 [parisc-linux] ldd under 2.4.7 kernel Richard Hirst

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.