mips64 elf64 reloc data structures
Alexandre Oliva
aoliva@redhat.com
Fri Mar 14 08:28:00 GMT 2003
On Mar 14, 2003, Roland McGrath <roland@redhat.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@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer
More information about the Libc-alpha
mailing list