This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH/RFA] sh-elf: Unnecessary relocations
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- Cc: binutils at sources dot redhat dot com
- Date: Fri, 27 Sep 2002 14:01:01 -0400 (EDT)
- Subject: Re: [PATCH/RFA] sh-elf: Unnecessary relocations
On Fri, 27 Sep 2002, kaz Kojima wrote:
> Hans-Peter Nilsson <hp@bitrange.com> wrote:
> >> +#objdump: -r
> >> +#name: PC-relative loads
> >> +
> >> +.*: file format .*sh.*
> >> diff -urN ORIG/src/gas/testsuite/gas/sh/pcrel2.s TMP/src/gas/testsuite/gas/sh/pcrel2.s
> >
> > Something is missing in the pcrel2.d file, it seems. Other than
> > that, it seems ok.
>
> I thought it checks that there is no relocations made.
I did not pay attention and missed the "-r". Sorry about that.
Please check this in. Thanks.
> > A thought here. Isn't this commonly generated by gcc in the
> > absence of -fpic/-fPIC? If so, then I guess -fpic/-fPIC is
> > required for DSO:s and there's no support for DT_TEXTREL.
> > Is that the case? (I don't mind, though; -fpic/-fPIC is
> > required for CRIS but elf32-cris.c emits an error message in
> > elf_backend_check_relocs when bad relocs are found when
> > -shared.)
>
> SH gcc generates such expressions for the switch statement in
> non-pic case. I'm not sure about another cases without -fpic,
> though.
On the other hand, since switch case expressions never refer to
global labels that shouldn't matter. Thanks for considering
this.
brgds, H-P