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: [RFC] Emit OPD reloc for all global symbols and then some.


> > Under hppa-linux:
> > ------------------
> > We want to generate a PLABEL32 (OPD reloc) against all global symbols,
> > and then some. For example it should be possible for an application to
> > call dlsym asking for the address of main, and when compared to main it
> > should match.
> > 
> 
> Does it work on Linux/ia32? If not, why should it work on Linux/hppa?

The linux manpage for dlsym indicates that symbols in the main
program can be looked up with dlsym:

     If filename is a NULL pointer, then the returned handle is
     for the main program.  When given to dlsym(), this  handle
     causes a search for a symbol in the main program, followed
     by all shared libraries loaded  at  program  startup,  and
     then all shared libraries loaded by dlopen() with the flag
     RTLD_GLOBAL.

So, if it doesn't work, that would seem to be a bug in Linux/ia32.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)


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