This is the mail archive of the
mailing list for the glibc project.
Re: [RFC, PATCH, MIPS] Add support for O32 FPXX and program header based ABI information
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Matthew Fortune <Matthew dot Fortune at imgtec dot com>
- Cc: Richard Sandiford <rdsandiford at googlemail dot com>, Rich Fuhler <Rich dot Fuhler at imgtec dot com>, "macro at codesourcery dot com" <macro at codesourcery dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Date: Thu, 1 May 2014 22:07:13 +0000
- Subject: Re: [RFC, PATCH, MIPS] Add support for O32 FPXX and program header based ABI information
- Authentication-results: sourceware.org; auth=none
- References: <6D39441BF12EF246A7ABCE6654B0235351E3D7 at LEMAIL01 dot le dot imgtec dot org>
We don't want to introduce new internal interfaces using #ifdef, because
of the risk of typos being undetected. Thus, ELF_MACHINE_NEEDS_PHDR_CHECK
should be a macro that all architectures define to either 0 or 1, tested
with #if not #ifdef. Or, even better, have most architectures define a
dummy version of elf_machine_phdr_check to which the call just gets
optimized out, so no conditional code is needed in dl-load.c at all.
We don't want to introduce new uses of __builtin_expect; use
__glibc_likely / __glibc_unlikely instead.
To avoid -Wundef warnings, and in line with the principle about avoiding
#ifdef interfaces, make HAVE_MIPS_MODULE_FPXX_DIRECTIVE a 1/0 macro rather
than a defined/undefined one. (Right now you have it defined/undefined
but also test with #if, leading to warnings in the undefined case.)
Joseph S. Myers