From owner-freebsd-hackers Thu Dec 19 5:47:30 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D8A6737B401 for ; Thu, 19 Dec 2002 05:47:28 -0800 (PST) Received: from mail01.svc.cra.dublin.eircom.net (mail01.svc.cra.dublin.eircom.net [159.134.118.17]) by mx1.FreeBSD.org (Postfix) with SMTP id A7C3943E4A for ; Thu, 19 Dec 2002 05:47:27 -0800 (PST) (envelope-from pmedwards@eircom.net) Received: (qmail 43826 messnum 426964 invoked from network[159.134.237.78/wendell.eircom.net]); 19 Dec 2002 13:19:27 -0000 Received: from wendell.eircom.net (HELO webmail.eircom.net) (159.134.237.78) by mail01.svc.cra.dublin.eircom.net (qp 43826) with SMTP; 19 Dec 2002 13:19:27 -0000 From: "Peter Edwards" To: lev@serebryakov.spb.ru Cc: freebsd@cs.tin.it, hackers@freebsd.org Subject: Re[2]: dlinfo() from sunOS, _DYNAMIC from Linux: did we have something like this? Date: Thu, 19 Dec 2002 13:19:27 +0000 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit X-Originating-IP: 62.17.151.61 X-Mailer: Eircom Net CRC Webmail (http://www.eircom.net/) Organization: Eircom Net (http://www.eircom.net/) Message-Id: <20021219134727.A7C3943E4A@mx1.FreeBSD.org> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, Actually, the FreeBSD linker does put _DYNAMIC int executables, it's just not declared in any headerfile, so I assume some config script isn't picking it up. You can declare it as #include extern Elf_Dyn DYNAMIC[]; (The FreeBSD ELF headers will typedef Elf_Dyn from either Elf32_Dyn, or Elf64_Dyn, depending on your platform.) To hack the offending code into working, you could do something like this at the top. #ifdef __FreeBSD__ #include extern Elf_Dyn DYNAMIC[]; #undef HAVE_DECL__DYNAMIC #undef HAVE_ELF32_DYN #undef HAVE_ELF64_DYN #define HAVE_DECL__DYNAMIC 1 #if __ELF_WORD_SIZE == 32 #define HAVE_ELF32_DYN 1 #define HAVE_ELF64_DYN 0 #else #define HAVE_ELF64_DYN 1 #define HAVE_ELF32_DYN 0 #endif .. and cross your fingers before compiling. -- Peter Edwards. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message