From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12415 invoked by alias); 15 Apr 2005 07:09:29 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 12360 invoked from network); 15 Apr 2005 07:09:23 -0000 Received: from unknown (HELO gizmo04ps.bigpond.com) (144.140.71.14) by sourceware.org with SMTP; 15 Apr 2005 07:09:23 -0000 Received: (qmail 29673 invoked from network); 15 Apr 2005 07:09:21 -0000 Received: from unknown (HELO psmam12.bigpond.com) (144.135.25.103) by gizmo04ps.bigpond.com with SMTP; 15 Apr 2005 07:09:21 -0000 Received: from cpe-144-136-221-26.sa.bigpond.net.au ([144.136.221.26]) by psmam12.bigpond.com(MAM REL_3_4_2a 234/13334236) with SMTP id 13334236; Fri, 15 Apr 2005 17:09:21 +1000 Received: by bubble.modra.org (Postfix, from userid 500) id A9C401A8D94; Fri, 15 Apr 2005 16:39:21 +0930 Date: Fri, 15 Apr 2005 07:09:00 -0000 From: Alan Modra To: Paul Brook Cc: binutils@sources.redhat.com Subject: Re: [patch] VxWorks x86 shared library support. Message-ID: <20050415070921.GI31303@bubble.modra.org> Mail-Followup-To: Paul Brook , binutils@sources.redhat.com References: <200504141458.26110.paul@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200504141458.26110.paul@codesourcery.com> User-Agent: Mutt/1.4i X-SW-Source: 2005-04/txt/msg00407.txt.bz2 I don't like any of your hacks to the generic ELF linker code. With a little thought, you should be able to eliminate most of them. On Thu, Apr 14, 2005 at 02:58:25PM +0100, Paul Brook wrote: > * elf-bfd.h (struct elf_backend_data): Add is_vxworks. > (RELOC_FOR_GLOBAL_SYMBOL): Ignore VxWorks magic GOT symbols. No way is this RELOC_FOR_GLOBAL_SYMBOL hack acceptable. Instead, do something about giving these magic symbols a value. See, for example, elf32_hppa_set_gp. > * elf.c (assign_section_numbers): Add special handling for VxWorks > .plt.unloaded section. Well, maybe this is OK. > * elflink.c (_bfd_elf_create_dynamic_sections): Mark VxWorks PLT > symbols as functions. Do this in backend code, by looking up the sym and changing its type. > (elf_link_adjust_relocs): Convert SHN_UNDEF relocs for PLT stubs > into section relative relocs. Yikes! You say + /* This is a relocation from an executable or shared library + against a symbol in a different shared library. We are + createing a definition in the output file but it does not come + from any of out normal (.o) files. ie. a PLT stub. So this is presumably a linker created reloc. Why can't you create it such that it doesn't need this horrible hack? > (elf_link_output_extsym): Ignore undefined VxWorks GOTT symbols. This shouldn't be needed if you give these syms a value. -- Alan Modra IBM OzLabs - Linux Technology Centre