This is the mail archive of the mailing list for the glibc 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: mips64 elf64 reloc data structures

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:


Alexandre Oliva   Enjoy Guarana', see
Red Hat GCC Developer                 aoliva at {redhat dot com,}
CS PhD student at IC-Unicamp        oliva at {lsd dot ic dot unicamp dot br,}
Free Software Evangelist                Professional serial bug killer

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