This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ld-elf/exclude1.s, exclude.exp


On Mon, 18 Oct 2004, Hans-Peter Nilsson wrote:

> On Mon, 18 Oct 2004, Daniel Jacobowitz wrote:
> > On Mon, Oct 18, 2004 at 02:59:32PM -0400, Hans-Peter Nilsson wrote:
> > > Wait... I take that back: the code is going into a DSO, so an
> > > absolute reloc is going to get problems with targets where ld
> > > complains about the result being textrel: "you probably meant to
> > > compile with -fPIC" and similar.
> >
> > I knew there a reason I wanted to use a PC-relative relocation...
> > however, this would work just as well if you put it into .data instead.
> > Does that work?
>
> That'd work (from inspection, not by testing) and it seems no
> further changes would be needed. I thought you had a reason to
> put this in .text, but didn't bother to check...

Hmm.  I don't know what you're trying to test here (hint:
missing comment), but it seems use of include_sym is important
due to its globalness.  Strange: this isn't really a PC-relative
reloc;  another DSO or the executable should be able to override
include_sym and I don't see how that could work for any normal
ELF target.  Let's include exclude1.s for completeness:
---
        .globl include_sym
include_sym:
        .long   exclude_sym - include_sym
---

Are you really testing what you want here?  Did really mean
to mark include_sym as global, or did you perhaps mean
 .long exclude_sym - .
?

In the meantime, I've disabled this test for cris-*-elf, since
that action is within my "jurisdiction".

If you really mean the code is ok, I'd rather go with the patch
(at <URL:http://sources.redhat.com/ml/binutils/2004-10/msg00286.html>).
If so, can I have an ok on it?

brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]