public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@bigpond.net.au>
To: Paul Brook <paul@codesourcery.com>
Cc: binutils@sources.redhat.com
Subject: Re: [patch] VxWorks x86 shared library support.
Date: Fri, 15 Apr 2005 07:09:00 -0000	[thread overview]
Message-ID: <20050415070921.GI31303@bubble.modra.org> (raw)
In-Reply-To: <200504141458.26110.paul@codesourcery.com>

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

  reply	other threads:[~2005-04-15  7:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-14 13:58 Paul Brook
2005-04-15  7:09 ` Alan Modra [this message]
2005-04-15 12:19   ` Daniel Jacobowitz
2005-04-15 22:20     ` Alan Modra

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=20050415070921.GI31303@bubble.modra.org \
    --to=amodra@bigpond.net.au \
    --cc=binutils@sources.redhat.com \
    --cc=paul@codesourcery.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).