This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: mips64 elf64 reloc data structures
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Roland McGrath <roland at redhat dot com>
- Cc: libc-alpha at sources dot redhat dot com
- Date: 14 Mar 2003 05:27:10 -0300
- Subject: Re: mips64 elf64 reloc data structures
- Organization: GCC Team, Red Hat
- References: <200303140811.h2E8BGK23193@magilla.sf.frob.com>
On Mar 14, 2003, Roland McGrath <roland at redhat dot com> wrote:
> I meant some place that defines these in elf.h, not a private interface
> like BFD (BFD is not part of the stable system-wide API).
I don't know of any such place. But then, Uli suggested adding the
structures to the installed elf.h would be nice for other applications
that wanted to support the mips elf64 relocation format, even though
the macros wouldn't be automatically correct for them. I wouldn't
mind moving all of the structures to some glibc-private, or even
mips-specific headers, if it turned out to be possible.
>> Sorry, I don't see a naming convention I'm supposed to follow.
> Then don't use public names. If the internal types can't be anonymous
> because they are used more than once, use __ names or _Elf names or
> something to keep it clean.
_Elf will do.
>> Anything that uses ELF_R_TYPE needs the mips elf64-specific version of
>> the macro to work on little-endian. That's a lot of code in elf/, as
>> well as sysdeps/mips/dl-machine.h.
> Can you put these hacks in sysdeps/mips/ldsodefs.h and cover everything?
I distinctly remember having tried a number of alternatives to get all
bases covered, and nothing other than tweaking elf.h itself had the
right effect everywhere. Basically, I need a header that is included
whenever elf.h is included, but never before it, such that the macro
overriding can take effect properly. ldsodefs.h is not such a header
(*), but I can't tell for sure that it was one of the alternatives I
had tried. And then, even if it actually worked, I find it way too
risky to expect this property to remain stable.
* here's a list of files that include elf.h but not ldsodefs.h:
./elf/check-textrel.c
./elf/dynamic-link.h
./elf/ldconfig.c
./elf/link.h
./elf/readlib.c
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva at {redhat dot com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva at {lsd dot ic dot unicamp dot br, gnu.org}
Free Software Evangelist Professional serial bug killer