[PATCH v2] MIPS: Change all E_MIPS_* to EF_MIPS_*
Nick Clifton
nickc@redhat.com
Fri Nov 10 14:12:36 GMT 2023
Hi Ying Huang,
> Ping,
Sorry for the delay in reviewing your patch.
>> Now MIPS has two macro definitions for ELF file header flags,
>> respectively E_ and EF_. It is difficult to decide which style macro
>> we should use when we want to add new ELF file header flags.
>>
>> We can refer to this message coming from the lost world:
>> .
>> Clearly IRIX and the Linux kernel used to use EF_* macros.
>> So we should use EF_* to keep same style with the beginning.
I agree that having inconsistent naming schemes for the macros
is annoying. But I dislike the idea of a backwards incompatible
change. It is not only the binutils, gdb and glibc that use these
macros but other programs as well.
To that end I have amended your patch so that the changes to
include/elf/mips.h and elfcpp/mips.h also keep the old definitions
of the constants. This means that other users of these files
will not have to change their code unless they want to.
>> And we also have submitted this change to glibc.
You will also need to submit the changes to gdb/mips-tdep.c
and sim/mips/interp.c to the gdb mailing list as these files
are not maintained by the Binutils project.
>> bfd/elf32-mips.c | 4 +-
>> bfd/elfxx-mips.c | 224 +++++++++++++++++++++----------------------
>> binutils/readelf.c | 76 +++++++--------
>> elfcpp/mips.h | 74 +++++++-------
>> gas/config.in | 6 +-
>> gas/config/tc-mips.c | 10 +-
>> gas/configure | 8 +-
>> gas/configure.ac | 10 +-
>> gold/mips.cc | 168 ++++++++++++++++----------------
>> include/elf/mips.h | 74 +++++++-------
Approved and applied - with the change mentioned above.
One other thing - your email program appears to have mangled
the patch, removing lots of whitespace. This made the patch
impossible to apply automatically and instead I had to apply
it by hand. In the future, please could you supply the patch
as an attachment, rather than inline ?
Cheers
Nick
More information about the Binutils
mailing list