This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
RE: [PATCHv2, MIPS] Add support for O32 FPXX and program header based ABI information
- From: Matthew Fortune <Matthew dot Fortune at imgtec dot com>
- To: Will Newton <will dot newton at linaro dot org>
- Cc: Joseph Myers <joseph at codesourcery dot com>, Andrew Pinski <pinskia at gmail dot com>, 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, 15 May 2014 06:41:43 +0000
- Subject: RE: [PATCHv2, MIPS] Add support for O32 FPXX and program header based ABI information
- Authentication-results: sourceware.org; auth=none
- References: <6D39441BF12EF246A7ABCE6654B0235352F38D at LEMAIL01 dot le dot imgtec dot org> <CANu=DmiQuUePBw9N8mL2u1SQqPG9SYU2kxbszMZmvUFyKXdJMA at mail dot gmail dot com>
> On 14 May 2014 15:46, Matthew Fortune <Matthew.Fortune@imgtec.com> wrote:
>
> Hi Matthew,
> > +/* Return nonzero iff ELF program headers are compatible with the
> running
> > + host. */
> > +static inline int
> > +elf_machine_phdr_check (const ElfW(Phdr) *phdr, ElfW(Half) phnum,
> > + char * buf, int len, int fd, struct link_map *
> map)
> > +{
> > + return 1;
> > +}
>
> I'm wondering whether the types could be improved here:
>
> 1. Should it return bool?
> 2. Should buf be const?
> 3. Should len be ssize_t?
> 4. The spacing around '*' is inconsistent.
All good points. I knew Iâd end up needing to change all the stubs again.
I think the answer is yes to all. The types (except const'ness) were just
following the types of the data which are being passed in from dl-load and
also the convention used for return types of other hooks.
If I change the type of len then I expect I should change the type of the
original variable in dl-load as well.
Regards,
Matthew