public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Clarke, Stephen" <stephen.clarke@superh.com>
To: <binutils@sources.redhat.com>
Cc: "Stephen Clarke" <stephen.clarke@earthling.net>
Subject: RE: [Patch] sh64: Handle SHmedia PC-relative relocs as dynamic relocs
Date: Fri, 11 Oct 2002 17:02:00 -0000	[thread overview]
Message-ID: <287E4644B5249D449C56FA5409A874AE03C7B0@sh-us-ex01.us.w2k.superh.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1632 bytes --]

Seems this one has been overlooked thus far, so I'll take the
opportunity to update it ...

The original patch omitted the handling of pc-relative relocations
in sh_elf_gc_sweep_hook, so I've added that.

Since refcounting was introduced, it's necessary to handle some
SHmedia absolute relocations in sh_elf_check_relocs, for plt
refcounting when you're linking an absolute program to a shared
library, so I've added those too, together with the corresponding
additions to sh_elf_gc_sweep_hook.

Without this absolute relocation plt refcounting you got a linker
error, so I've added a test case for that (ld-sh/sh64/dsolink*),
which in turn requires a mechanism to create a dso to link
against.  Kojima-san recently added this to ld-sh/rd-sh.exp,
so I've duplicated his work in ld-sh/sh64/rd-sh64.exp.

The updated patch is attached.  The changelog info is:

bfd:

	* elf32-sh.c (sh_elf_relocate_section): Handle SHmedia
	PC-relative relocations as dynamic relocations.
	(sh_elf_gc_sweep_hook): Handle SHmedia PC-relative
	relocations and SHmedia R_SH_IMM_xxx absolute relocations.
	(sh_elf_check_relocs): Likewise.
	* elf64-sh64.c (sh_elf64_relocate_section): Handle SHmedia
	PC-relative relocations as dynamic relocations.
	(sh_elf64_check_relocs): Likewise.

ld/testsuite:

	* ld-sh/sh64/dsolink-0-dso.d, ld-sh/sh64/dsolink-1.d,
	ld-sh/sh64/dsolink-1.s, ld-sh/sh64/dsolinklib.s: New test.
	* ld-sh/sh64/rd-sh64.exp: Add the dso-creating functionality
	from ld-sh/rd-sh.exp.
	* ld-sh/sh64/shpcrel.d, ld-sh/sh64/shpcrel.s,
	ld-sh/sh64/shpcrel64.d, ld-sh/sh64/shpcrel64.s: New test.

Steve.

[-- Attachment #2: pcrel-patch.gz --]
[-- Type: application/x-gzip, Size: 3730 bytes --]

             reply	other threads:[~2002-10-12  0:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-11 17:02 Clarke, Stephen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-08-23 22:26 Stephen Clarke

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=287E4644B5249D449C56FA5409A874AE03C7B0@sh-us-ex01.us.w2k.superh.com \
    --to=stephen.clarke@superh.com \
    --cc=binutils@sources.redhat.com \
    --cc=stephen.clarke@earthling.net \
    /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).