From: Richard Hirst <rhirst@linuxcare.com>
To: parisc-linux@lists.parisc-linux.org
Subject: [parisc-linux] ldd under 2.4.7 kernel
Date: Fri, 10 Aug 2001 17:47:51 +0100 [thread overview]
Message-ID: <20010810174751.G23676@linuxcare.com> (raw)
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;
reply other threads:[~2001-08-10 16:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010810174751.G23676@linuxcare.com \
--to=rhirst@linuxcare.com \
--cc=parisc-linux@lists.parisc-linux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox