This is the mail archive of the libc-alpha@sourceware.org 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: [PATCHv2, MIPS] Add support for O32 FPXX and program header based ABI information


> 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

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