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 Tue, Oct 19, 2004 at 12:57:02AM -0400, Hans-Peter Nilsson wrote:
> 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

Hint: it's in the .exp file.

# Make sure that ld can hide symbols from libraries when building a shared
# library.

Yes, the globalness is important; we need to verify that the one symbol
was exported and the other wasn't.

> 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:

Yeah, I've been wondering a little about that.  I believe gas defines
the thing on the right side of the relocation to be locally bound (in
fact, it has to be defined in the same .o - no other way to represent
it).

In any case I've verified that cris-linux now passes with HJ's changes. 
This is reminding me why we have so very few shared library tests that
run when cross - it's a real pain to write them.

-- 
Daniel Jacobowitz


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